parent
bedcd2127f
commit
d6d38a9d11
|
@ -30,9 +30,9 @@ class Process(DeactivableMixin, ModelSQL, ModelView):
|
||||||
},
|
},
|
||||||
depends=['steps'])
|
depends=['steps'])
|
||||||
inputs = fields.Function(fields.One2Many('production.bom.input', None,
|
inputs = fields.Function(fields.One2Many('production.bom.input', None,
|
||||||
'Inputs'), 'get_bom_field')
|
'Inputs'), 'get_bom_field', setter='_set_bom_field')
|
||||||
outputs = fields.Function(fields.One2Many('production.bom.output', None,
|
outputs = fields.Function(fields.One2Many('production.bom.output', None,
|
||||||
'Outputs'), 'get_bom_field')
|
'Outputs'), 'get_bom_field', setter='_set_bom_field')
|
||||||
output_products = fields.Function(fields.Many2Many('production.bom.output',
|
output_products = fields.Function(fields.Many2Many('production.bom.output',
|
||||||
'bom', 'product', 'Outputs'), 'get_bom_field',
|
'bom', 'product', 'Outputs'), 'get_bom_field',
|
||||||
searcher='search_bom_field')
|
searcher='search_bom_field')
|
||||||
|
@ -46,6 +46,11 @@ class Process(DeactivableMixin, ModelSQL, ModelView):
|
||||||
res += [x.id for x in getattr(self.bom, name)]
|
res += [x.id for x in getattr(self.bom, name)]
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _set_bom_field(cls, processes, name, value):
|
||||||
|
# Prevent NotImplementedError for One2Many
|
||||||
|
pass
|
||||||
|
|
||||||
def get_operations(self, name):
|
def get_operations(self, name):
|
||||||
res = []
|
res = []
|
||||||
if self.route:
|
if self.route:
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
<field name="steps" colspan="4"/>
|
<field name="steps" colspan="4"/>
|
||||||
</page>
|
</page>
|
||||||
<page string="Products" id="products">
|
<page string="Products" id="products">
|
||||||
<field name="inputs" colspan="2"/>
|
<field name="inputs" colspan="2" readonly="1"/>
|
||||||
<field name="outputs" colspan="2"/>
|
<field name="outputs" colspan="2" readonly="1"/>
|
||||||
</page>
|
</page>
|
||||||
<page string="Operations" id="operations">
|
<page string="Operations" id="operations">
|
||||||
<field name="operations" colspan="4"/>
|
<field name="operations" colspan="4"/>
|
||||||
|
|
Loading…
Reference in New Issue