summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-11-05 17:18:11 +0100
committerDenis Ledoux <dle@odoo.com>2015-11-05 17:20:38 +0100
commite5d5737ddec0212c7d3a91cf79ca12bb74f69ef9 (patch)
tree9ac605489c2fc597bc4f9d07b1ea298d45d80ae8
parent39c47f92f3f2af9e0cadfac37d68716c2fb19c15 (diff)
[FIX] sale, sale_stock: incoterms configuration
The incoterms features (and group) are available upon the installation of the `sale_stock` module. The configuration to enable this feature should therefore be in the Sales configuration only when this module is installed. Otherwise, it just has no effect. opw-653970
-rw-r--r--addons/sale/res_config.py6
-rw-r--r--addons/sale/res_config_view.xml1
-rw-r--r--addons/sale_stock/res_config.py6
-rw-r--r--addons/sale_stock/res_config_view.xml3
4 files changed, 9 insertions, 7 deletions
diff --git a/addons/sale/res_config.py b/addons/sale/res_config.py
index b2f2c51e552..2489e377f9a 100644
--- a/addons/sale/res_config.py
+++ b/addons/sale/res_config.py
@@ -34,12 +34,6 @@ class sale_configuration(osv.TransientModel):
(1, 'Allow discounts on sales order lines')
], "Discount",
implied_group='sale.group_discount_per_so_line'),
- 'group_display_incoterm':fields.selection([
- (0, 'No incoterm on reports'),
- (1, 'Show incoterms on sale orders and invoices')
- ], "Incoterms",
- implied_group='sale.group_display_incoterm',
- help="The printed reports will display the incoterms for the sale orders and the related invoices"),
'module_sale_margin': fields.selection([
(0, 'Salespeople do not need to view margins when quoting'),
(1, 'Display margins on quotations and sales orders')
diff --git a/addons/sale/res_config_view.xml b/addons/sale/res_config_view.xml
index 3ff132e5986..96cb7bb5bd4 100644
--- a/addons/sale/res_config_view.xml
+++ b/addons/sale/res_config_view.xml
@@ -15,7 +15,6 @@
</group>
<group string="Quotations &amp; Sales" id="sale">
<field name="group_sale_delivery_address" widget="radio"/>
- <field name="group_display_incoterm" widget="radio"/>
<field name="group_discount_per_so_line" widget="radio"/>
<field name="module_website_quote" widget="radio"/>
<field name="module_sale_margin" widget="radio"/>
diff --git a/addons/sale_stock/res_config.py b/addons/sale_stock/res_config.py
index 6cba692be88..415ac351290 100644
--- a/addons/sale_stock/res_config.py
+++ b/addons/sale_stock/res_config.py
@@ -27,6 +27,12 @@ class SaleConfiguration(models.TransientModel):
(1, 'Choose specific routes on sales order lines (advanced)')
], "Order Routing",
implied_group='sale_stock.group_route_so_lines')
+ group_display_incoterm = fields.Selection([
+ (0, 'No incoterm on reports'),
+ (1, 'Show incoterms on sale orders and invoices')
+ ], "Incoterms",
+ implied_group='sale.group_display_incoterm',
+ help="The printed reports will display the incoterms for the sale orders and the related invoices")
@api.multi
def get_default_sale_config(self):
diff --git a/addons/sale_stock/res_config_view.xml b/addons/sale_stock/res_config_view.xml
index 1babd1df644..b48ae414145 100644
--- a/addons/sale_stock/res_config_view.xml
+++ b/addons/sale_stock/res_config_view.xml
@@ -15,6 +15,9 @@
<field name="group_route_so_lines" widget="radio"/>
<field name="group_mrp_properties" widget="radio" groups="base.group_no_one"/>
</xpath>
+ <field name="group_sale_delivery_address" position="after">
+ <field name="group_display_incoterm" widget="radio"/>
+ </field>
</field>
</record>
</odoo>