Skip to content
Permalink
Browse files

[REM]sale_stock: Remove group_route_so_lines group i.e. 'Order-specif…

…ic Routes' from sale_stock this groups was added in res.config.setting of sale and was used to enable route_id field in sale order line, now we will use group stock.group_adv_location i.e. 'Multi-steps Routes', we make route_id field optional so it will be displayed on sale order line in optional fields dropdown and user can temporary enable it

Related to task: #1902765
  • Loading branch information...
msh-odoo committed Mar 25, 2019
1 parent c10ed45 commit 0ac4c6825c44348f06c235b3d68c7dd2632dc216
@@ -8,8 +8,6 @@ class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'

security_lead = fields.Float(related='company_id.security_lead', string="Security Lead Time", readonly=False)
group_route_so_lines = fields.Boolean("Order-Specific Routes",
implied_group='sale_stock.group_route_so_lines')
group_display_incoterm = fields.Boolean("Incoterms", implied_group='sale_stock.group_display_incoterm')
use_security_lead = fields.Boolean(
string="Security Lead Time for Sales",
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<record id="group_route_so_lines" model="res.groups">
<field name="name">Enable Route on Sales Order Line</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>

<data noupdate="0">
<record id="group_display_incoterm" model="res.groups">
<field name="name">Display incoterms on Sales Order and related invoices</field>
<field name="category_id" ref="base.module_category_hidden"/>
@@ -23,22 +23,6 @@
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" title="This allows to apply a special route on sales order lines (e.g. dropshipping, make-to-order) in case of unusual order scenario. To be available in sales orders, routes must have 'Sales Order Line' option checked in their setup form.">
<div class="o_setting_left_pane">
<field name="group_route_so_lines"/>
</div>
<div class="o_setting_right_pane">
<label for="group_route_so_lines"/>
<div class="text-muted">
Apply special routes from orders (e.g. dropshipping, MTO)
</div>
<div class="content-group" attrs="{'invisible': [('group_route_so_lines','=',False)]}">
<div class="mt16">
<button name="%(stock.action_routes_form)d" icon="fa-arrow-right" type="action" string="Routes for Sales Order Lines" class="btn-link" context="{'default_sale_selectable': 1}"/>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
@@ -31,10 +31,10 @@
<field name="product_packaging" attrs="{'invisible': [('product_id', '=', False)]}" context="{'default_product_id': product_id, 'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging" />
</xpath>
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='price_unit']" position="before">
<field name="route_id" groups="sale_stock.group_route_so_lines" options="{'no_create': True}"/>
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='price_unit']" position="before">
<field name="route_id" optional="1" groups="sale_stock.group_route_so_lines" options="{'no_create': True}"/>
<field name="route_id" optional="1" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
</field>
</record>
@@ -45,7 +45,7 @@
<field name="model">sale.order.line</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='price_subtotal']" position="before">
<field name="route_id" groups="sale_stock.group_route_so_lines" options="{'no_create': True}"/>
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
</field>
</record>
@@ -6,7 +6,7 @@
<field name="inherit_id" ref="stock.view_stock_rules_report"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='warehouse_ids']" position="after">
<field name="so_route_ids" widget="many2many_tags" groups="sale_stock.group_route_so_lines"/>
<field name="so_route_ids" widget="many2many_tags" groups="stock.group_stock_adv_location"/>
</xpath>
</field>
</record>

0 comments on commit 0ac4c68

Please sign in to comment.
You can’t perform that action at this time.