summaryrefslogtreecommitdiff
path: root/addons/stock_dropshipping/views
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/stock_dropshipping/views
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/stock_dropshipping/views')
-rw-r--r--addons/stock_dropshipping/views/sale_order_views.xml25
1 files changed, 25 insertions, 0 deletions
diff --git a/addons/stock_dropshipping/views/sale_order_views.xml b/addons/stock_dropshipping/views/sale_order_views.xml
new file mode 100644
index 00000000..1cb225c3
--- /dev/null
+++ b/addons/stock_dropshipping/views/sale_order_views.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<odoo>
+ <data>
+ <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="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
+ <field name="arch" type="xml">
+ <xpath expr="//page/field[@name='order_line']/form//field[@name='product_updatable']" position="after">
+ <field name="purchase_line_count" 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_count', '&gt;', 0)], 'required': [('display_type', '=', False)],}</attribute>
+ </xpath>
+ <xpath expr="//page/field[@name='order_line']/tree/field[@name='product_updatable']" position="after">
+ <field name="purchase_line_count" 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_count', '&gt;', 0)], 'required': [('display_type', '=', False)],}</attribute>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</odoo>