mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[ADD] mrp_configurable_timing: modulo que hace configurable los decimales de tiempos de ciclo
[ADD] mrp_product_variants_configurable_timing: enlaza mrp_configurable_timing + mrp_operations_extension [IMP] mrp_operations_extension + mrp_product_variants_operations: calculo de ciclos modificados.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields, api, exceptions, _
|
||||
import math
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
@@ -56,6 +57,12 @@ class MrpProduction(models.Model):
|
||||
|
||||
def _get_workorder_in_product_lines(
|
||||
self, workcenter_lines, product_lines, properties=None):
|
||||
for workorder in workcenter_lines:
|
||||
wc = workorder.routing_wc_line
|
||||
cycle = wc.cycle_nbr and int(math.ceil(self.product_qty /
|
||||
wc.cycle_nbr)) or 0
|
||||
workorder.cycle = cycle
|
||||
workorder.hour = wc.hour_nbr * cycle
|
||||
for p_line in product_lines:
|
||||
for bom_line in self.bom_id.bom_line_ids:
|
||||
if bom_line.product_id.id == p_line.product_id.id:
|
||||
|
||||
Reference in New Issue
Block a user