提交 54b8c5db authored 作者: 贺阳's avatar 贺阳

回写异常原因的优化

上级 26260f7b
......@@ -53,8 +53,9 @@ class AddExceptionInfoWizard(models.TransientModel):
# 更新小包的异常信息
exception_objs = record.exception_ids
package_objs = self.get_order()
for package in package_objs:
package.update_exception_info(exception_objs.ids) # 回写小包的异常信息
if not self._context.get('not_update_ex'):
for package in package_objs:
package.update_exception_info(exception_objs.ids) # 回写小包的异常信息
# 发送邮件通知
if record.send_email:
self.send_email_notification(record, package_objs, exception_objs)
......
......@@ -166,7 +166,7 @@ class OrderController(http.Controller):
if excep_item not in big_package_exception_arr:
big_package_exception_arr[excep_item] = []
big_package_exception_arr[excep_item] += package_obj.ids
# package_obj.update_exception_info(exception_cause_ids) # 修改异常信息
package_obj.update_exception_info(exception_cause_ids) # 修改异常信息
tally_time = package_item.get('tally_time')
if package_type == 'ship':
ship_packages.append({
......@@ -224,7 +224,8 @@ class OrderController(http.Controller):
if big_package:
big_wizard_obj = request.env[
'add.exception.info.wizard'].sudo().with_context({'active_id': big_package,
'active_name': 'cc.big.package'}).create_add_exception_wizard(
'active_name': 'cc.big.package',
'not_update_ex': True}).create_add_exception_wizard(
'big package', [exception_id], big_package_ids=big_package, send_email=True,
email_language=lang)
big_wizard_obj.confirm() # 发送邮件
......@@ -233,7 +234,8 @@ class OrderController(http.Controller):
if ship_package:
ship_wizard_obj = request.env[
'add.exception.info.wizard'].sudo().with_context({'active_id': ship_package,
'active_name': 'cc.ship.package'}).create_add_exception_wizard(
'active_name': 'cc.ship.package',
'not_update_ex': True}).create_add_exception_wizard(
'ship package', [exception_id], ship_package_ids=ship_package, send_email=True,
email_language=lang)
ship_wizard_obj.confirm() # 发送邮件
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论