[FIX] stock_dropshipping: Updating dropship product
Steps to reproduce the bug: - Install stock_dropshipping module and enable Routes on SO lines - Create a storable product P with a supplier S - Create a SO with P and set this line with the route dropship - Confirm the SO ( a PO has been created to S with P) - Change P on the SO with an other product Bug: The product P stayed on the PO. So a product linked to a PO line cannot be changed on a SO. Do not forward-port in 12.0 and upper opw:2040249 closes odoo/odoo#35454 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -22,7 +22,7 @@ internal transfer document is needed.
|
||||
""",
|
||||
'website': 'https://www.odoo.com/page/warehouse',
|
||||
'depends': ['purchase', 'sale_stock'],
|
||||
'data': ['data/stock_data.xml'],
|
||||
'data': ['data/stock_data.xml', 'views/sale_order_views.xml'],
|
||||
'test': [
|
||||
'../account/test/account_minimal_test.xml',
|
||||
'../stock_account/test/stock_valuation_account.xml',
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Do not forward-port in 12.0 and upper -->
|
||||
<record id="view_order_form_inherit_sale_stock" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.sale.dropshipping</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page/field[@name='order_line']/form//field[@name='product_updatable']" position="after">
|
||||
<field name="purchase_line_ids" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page/field[@name='order_line']/form//field[@name='product_id']" position="attributes">
|
||||
<attribute name="attrs">{'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_ids', '!=', [])]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//page/field[@name='order_line']/tree/field[@name='product_updatable']" position="after">
|
||||
<field name="purchase_line_ids" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page/field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
|
||||
<attribute name="attrs">{'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_ids', '!=', [])]}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user