1. zikzakmedia
  2. trytond-product_manufacturer

Commits

Raimon Esteve (Zikzakmedia)  committed 3beb1ba

Remove product_obj in on_change_product

  • Participants
  • Parent commits 7b0be4e
  • Branches default

Comments (0)

Files changed (3)

File move.py

View file
  • Ignore whitespace
 
     def on_change_product(self):
         """When change product, get manufacturer value"""
-        product_obj = Pool().get('product.product')
         res = super(Move, self).on_change_product()
         product = self.product or  False
         res['manufacturer'] = None

File purchase.py

View file
  • Ignore whitespace
 
     def on_change_product(self):
         """When change product, get manufacturer value"""
-        product_obj = Pool().get('product.product')
         res = super(PurchaseLine, self).on_change_product()
         product = self.product or  False
         res['manufacturer'] = None
             res['manufacturer'] = product.manufacturer and \
                     product.manufacturer.id or None
         return res
-

File sale.py

View file
  • Ignore whitespace
 
     def on_change_product(self):
         """When change product, get manufacturer value"""
-        product_obj = Pool().get('product.product')
         res = super(SaleLine, self).on_change_product()
         product = self.product or  False
         res['manufacturer'] = None
             res['manufacturer'] = product.manufacturer and \
                     product.manufacturer.id or None
         return res
-