new filter for supplier-product_name in product_template view

develop
Andreas Osim 2018-12-17 11:54:30 +01:00
parent 321692149e
commit e98f9da5d1
2 changed files with 4 additions and 0 deletions

View File

@ -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:

View File

@ -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'}"/>