new filter for supplier-product_name in product_template view
parent
321692149e
commit
e98f9da5d1
|
|
@ -60,6 +60,8 @@ class ProductTemplate(models.Model):
|
|||
manufacturing_number = fields.Char(string='Herstellnummer')
|
||||
product_color = fields.Char(string='Farbe')
|
||||
|
||||
suppl_ids = fields.One2many('product.supplierinfo', 'product_tmpl_id')
|
||||
|
||||
@api.onchange('length', 'width', 'thickness', 'height')
|
||||
def _onchange_measures(self):
|
||||
if self.length>0 and self.width>0 and self.thickness>0:
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@
|
|||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='categ_id']" position="after">
|
||||
<field name="manufacturing_number" string="Herstellnummer" filter_domain="[('manufacturing_number','ilike',self)]"/>
|
||||
<field name="suppl_ids" string="Lieferanten-Bestellnummer"
|
||||
filter_domain="[('suppl_ids.product_name','ilike',self)]"/>
|
||||
<filter string="Produktart" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Interne Kategorie" domain="[]" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="Materialtyp" domain="[]" context="{'group_by':'material_type_id'}"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue