Accept Merge Request #1293: (feature/update_production_line -> develop)
Merge Request: 修改计划排程时间范围内判断取值向上取整 Created By: @胡嘉莹 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @胡嘉莹 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1293?initial=true
This commit is contained in:
@@ -4,6 +4,7 @@ from collections import defaultdict
|
||||
from odoo import fields, models, api
|
||||
from odoo.addons.resource.models.resource import Intervals
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
import math
|
||||
|
||||
|
||||
class ResWorkcenter(models.Model):
|
||||
@@ -195,7 +196,9 @@ class ResWorkcenter(models.Model):
|
||||
def get_integer_and_decimal_parts(self, value):
|
||||
integer_part = int(value)
|
||||
decimal_part = value - integer_part
|
||||
return int(integer_part), int(decimal_part)
|
||||
if decimal_part > 0:
|
||||
decimal_part = round(decimal_part, 2) * 60
|
||||
return int(integer_part), math.ceil(decimal_part)
|
||||
|
||||
# 处理排程是否超过日产能
|
||||
def deal_available_default_capacity(self, date_planned):
|
||||
|
||||
Reference in New Issue
Block a user