修改销售,采购,制造,仓库产品设置产品类型为默认分组

This commit is contained in:
hujiaying
2024-09-13 10:15:26 +08:00
parent 4f9ac16a07
commit 6ad2fa80f1
8 changed files with 37 additions and 10 deletions

View File

@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="mrp.product_template_action" model="ir.actions.act_window">
<field name="context">
{"search_default_categ_id":1,"search_default_consumable": 1, 'default_detailed_type': 'product'}
</field>
</record>
<record model="ir.ui.view" id="view_sale_product_template_form_inherit_sf">
<field name="name">product.template.form.inherit.sf</field>
<field name="model">product.template</field>
@@ -88,7 +93,8 @@
</div>
<field name="model_volume" string="体积[mm³]"/>
<field name="product_model_type_id" string="模型类型"/>
<field name="model_processing_panel" placeholder="例如R,U" string="加工面板" readonly="1"/>
<field name="model_processing_panel" placeholder="例如R,U" string="加工面板"
readonly="1"/>
<field name="model_machining_precision"/>
<field name="model_process_parameters_ids" string="表面工艺参数"
widget="many2many_tags"
@@ -103,11 +109,11 @@
'刀具')], 'required': True}
</attribute>
</xpath>
<!-- <xpath expr="//field[@name='default_code']" position="attributes">-->
<!-- <attribute name="attrs">{'readonly': [('categ_type', '=', '刀具')], 'invisible':-->
<!-- [('product_variant_count', '>' , 1)]}-->
<!-- </attribute>-->
<!-- </xpath>-->
<!-- <xpath expr="//field[@name='default_code']" position="attributes">-->
<!-- <attribute name="attrs">{'readonly': [('categ_type', '=', '刀具')], 'invisible':-->
<!-- [('product_variant_count', '>' , 1)]}-->
<!-- </attribute>-->
<!-- </xpath>-->
</field>
</record>

View File

@@ -43,7 +43,7 @@
<label for="default_capacity"/>
<div class="o_row">
<field name="default_capacity" string="产线日产能"/>
</div>
</xpath>
<xpath expr="//field[@name='default_capacity'][last()]" position="before">

View File

@@ -184,5 +184,10 @@
</xpath>
</field>
</record>
<record id="purchase.product_normal_action_puchased" model="ir.actions.act_window">
<field name="context">
{"search_default_categ_id":1,"search_default_filter_to_purchase":1, "purchase_product_template": 1}
</field>
</record>
</data>
</odoo>

View File

@@ -225,5 +225,10 @@
</field>
</field>
</record>
<record id="sale.product_template_action" model="ir.actions.act_window">
<field name="context">{"search_default_categ_id":1,
"search_default_filter_to_sell":1,"sale_multi_pricelist_product_template": 1}
</field>
</record>
</data>
</odoo>

View File

@@ -3,7 +3,7 @@
'name': "sf_stock",
'summary': """
处理代发货业务""",
处理仓库 -代发货业务""",
'description': """
Long description of module's purpose
@@ -25,6 +25,7 @@
'data': [
# 'security/ir.model.access.csv',
'views/stock_picking.xml',
'views/stock_product_template.xml'
],
# only loaded in demonstration mode
'demo': [

View File

@@ -13,8 +13,6 @@ _logger = logging.getLogger(__name__)
class StockPicking(models.Model):
_inherit = 'stock.picking'
cancel_backorder_ids = fields.Boolean(default=False, string='是否取消后置单据')
# 重写验证下发发货到bfm
def button_validate(self):
info = super(StockPicking, self).button_validate()

View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="stock.product_template_action_product" model="ir.actions.act_window">
<field name="context">
{"search_default_categ_id":1,"search_default_consumable": 1, 'default_detailed_type': 'product'}
</field>
</record>
</data>
</odoo>