-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] purchase_variant_configurator_on_confirm: Merged into purchase_…
…variant_configurator and migration to 16.0 TT46597
- Loading branch information
1 parent
b7bbaad
commit e1d6c4e
Showing
49 changed files
with
279 additions
and
1,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
from . import purchase_order_line | ||
from . import product_product | ||
from . import product_supplierinfo | ||
from . import product_template | ||
from . import purchase_order | ||
from . import res_company | ||
from . import res_config_settings |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
purchase_variant_configurator/models/purchase_order_line.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2024 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResCompany(models.Model): | ||
_inherit = "res.company" | ||
|
||
po_confirm_create_variant = fields.Boolean( | ||
string="Create variants on confirm", | ||
help="Create product variants when confirming", | ||
default=False, | ||
) |
12 changes: 12 additions & 0 deletions
12
purchase_variant_configurator/models/res_config_settings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2024 Tecnativa - Víctor Martínez | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
po_confirm_create_variant = fields.Boolean( | ||
related="company_id.po_confirm_create_variant", readonly=False | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#. Go to ``Purchase > Configuration > Settings``. | ||
#. Check the "Create variants on confirm" option if you want to delay the creation | ||
of them until the order confirmation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#. Go to a purchase order or create a new one. | ||
#. Create a new line | ||
#. Set in Product Template some product with attributes and variants. | ||
#. All product attributes will be displayed in table mode just below. | ||
#. Set a value for all attributes. | ||
#. A product variant (with the selected options) will be auto-set. | ||
|
||
|
||
Only if the "Create variants on confirm" option in the configuration is set. | ||
|
||
|
||
#. Go to ``Purchase > Products > Product`` and create a new one. | ||
#. Go to the "Attributes & Variants" tab. | ||
#. Set in "Variant creation" the option "Do not create them automatically". | ||
#. Set some attribute and value(s) | ||
#. Go to a purchase order or create a new one. | ||
#. Create a new line | ||
#. Set in Product Template the one created before and select values for attributes. | ||
#. Confirm orden. | ||
#. A product variant (with the selected options) will have been created for the Product Template. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.