[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
This commit is contained in:
Denis Ledoux
2015-11-05 17:20:38 +01:00
parent 39c47f92f3
commit e5d5737dde
4 changed files with 9 additions and 7 deletions
-6
View File
@@ -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')
-1
View File
@@ -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"/>
+6
View File
@@ -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):
+3
View File
@@ -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>