Fix on_change_* methods
This commit is contained in:
parent
47608418d0
commit
82de887b04
|
@ -35,11 +35,9 @@ class ProductBom:
|
||||||
|
|
||||||
@fields.depends('process', 'bom', 'route')
|
@fields.depends('process', 'bom', 'route')
|
||||||
def on_change_process(self):
|
def on_change_process(self):
|
||||||
res = {}
|
|
||||||
if self.process:
|
if self.process:
|
||||||
res['bom'] = self.process.bom.id
|
self.bom = self.process.bom
|
||||||
res['route'] = self.process.route.id
|
self.route = self.process.route
|
||||||
return res
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, vlist):
|
def create(cls, vlist):
|
||||||
|
|
|
@ -369,15 +369,11 @@ class Production:
|
||||||
|
|
||||||
@fields.depends(*(BOM_CHANGES + ['process', 'route', 'operations']))
|
@fields.depends(*(BOM_CHANGES + ['process', 'route', 'operations']))
|
||||||
def on_change_process(self):
|
def on_change_process(self):
|
||||||
res = {}
|
|
||||||
if self.process:
|
if self.process:
|
||||||
self.bom = self.process.bom
|
self.bom = self.process.bom
|
||||||
res['bom'] = self.bom.id
|
|
||||||
self.route = self.process.route
|
self.route = self.process.route
|
||||||
res['route'] = self.route.id
|
self.on_change_route()
|
||||||
res.update(self.update_operations())
|
self.explode_bom()
|
||||||
res.update(self.explode_bom())
|
|
||||||
return res
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def compute_request(cls, product, warehouse, quantity, date, company):
|
def compute_request(cls, product, warehouse, quantity, date, company):
|
||||||
|
|
Loading…
Reference in New Issue