增加制造类型字段,增加依赖

This commit is contained in:
胡尧
2024-11-15 15:29:04 +08:00
parent 9d723c5e00
commit 73c986cd50
8 changed files with 30 additions and 27 deletions

View File

@@ -12,7 +12,7 @@
'data/stock_routes.xml',
'data/product_data.xml',
'views/sale_order_views.xml',
'views/product_product_views.xml',
# 'views/product_product_views.xml',
],'assets': {
# 'web.assets_backend': [
# 'jikimo_sale_multiple_supply_methods/static/src/**/*'

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="product_template_only_form_view" model="ir.ui.view">
<!-- 由于该模块不能依赖sf_dlm_management, 该功能只能在sf_dlm_management中实现并且依赖该模块-->
<record id="view_product_product_form_inherit_sf" model="ir.ui.view">
<field name="name">view.product.template.form.inherit.sf</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="inherit_id" ref="sf_dlm_management.view_sale_product_template_form_inherit_sf"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='uom_id']" position="before">
<field name="categ_type" invisible="1"/>
<field name="is_manual_processing" attrs="{'invisible': [('categ_type', 'not in', ['成品', '坯料'])], 'readonly': True}" />
<xpath expr="//field[@name='manual_quotation']" position="after">
<field name="is_customer_provided" attrs="{'invisible': [('categ_type', 'not in', ['成品', '坯料'])], 'readonly': True}" />
</xpath>
</field>
</record>