Skip to content

Commit

Permalink
[IMP] mrp_operations_extesion: fix warning in log
Browse files Browse the repository at this point in the history
  • Loading branch information
oihane committed May 9, 2017
1 parent 9cf5072 commit 2a5c7b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mrp_operations_extension/models/mrp_bom.py
Expand Up @@ -13,8 +13,9 @@ class MrpBom(models.Model):
def _prepare_wc_line(self, wc_use, level=0, factor=1):
res = super(MrpBom, self)._prepare_wc_line(
wc_use, level=level, factor=factor)
if not self.env['mrp.config.settings']._get_parameter('cycle.by.bom',
False) == 'True':
cycle_by_bom = self.env['mrp.config.settings']._get_parameter(
'cycle.by.bom')
if not (cycle_by_bom and cycle_by_bom.value == 'True'):
production = self.env.context.get('production')
factor = self._factor(production and production.product_qty or 1,
self.product_efficiency,
Expand Down

0 comments on commit 2a5c7b5

Please sign in to comment.