search supplier code
This commit is contained in:
parent
ad1ad2932a
commit
1f6883f0cf
3 changed files with 14 additions and 1 deletions
|
|
@ -0,0 +1,5 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from . import models
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from . import product_product
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class ProductProduct(models.Model):
|
class ProductProduct(models.Model):
|
||||||
_inherit = 'product.product'
|
_inherit = 'product.product'
|
||||||
|
|
||||||
supplier_codes = fields.Char(compute='_compute_supplier_codes', string='Supplier Codes', store=False, search='_search_supplier_codes')
|
supplier_codes = fields.Char(
|
||||||
|
compute='_compute_supplier_codes',
|
||||||
|
string='Supplier Codes',
|
||||||
|
store=True,
|
||||||
|
search='_search_supplier_codes')
|
||||||
|
|
||||||
@api.depends('variant_seller_ids', 'variant_seller_ids.product_code')
|
@api.depends('variant_seller_ids', 'variant_seller_ids.product_code')
|
||||||
def _compute_supplier_codes(self):
|
def _compute_supplier_codes(self):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue