采购,餐饮

This commit is contained in:
李鹏宇
2026-03-11 09:51:42 +08:00
parent 1e5166cb43
commit 32b0a84273
4 changed files with 8 additions and 30 deletions
@@ -210,6 +210,7 @@ class InheritPurchaseOrderLine(models.Model):
_inherit = 'purchase.order.line'
category_id = fields.Many2one('product.category', string="产品分类")
brand_spec = fields.Char(string="品牌/规格")
category_ids = fields.Many2many('product.category', string="产品分类", compute='_compute_category_id')
@api.depends('category_id')
@@ -173,6 +173,9 @@
<field name="category_id" column_invisible="1"/>
<field name="category_ids" widget="many2many_tags" column_invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']//tree//field[@name='product_id']" position="after">
<field name="brand_spec" string="品牌/规格" optional="show"/>
</xpath>
<!-- <xpath expr="//field[@name='order_line']" position="attributes">-->
<!-- <attribute name="context">{'default_category_id': category_id}</attribute>-->
<!-- </xpath>-->