Merge branch 'refs/heads/release/release_2.7' into feature/part_number
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
'depends': ['purchase', 'base_tier_validation', 'documents', 'purchase_request', 'account', 'purchase_order_approved'],
|
||||
'depends': ['purchase', 'purchase_tier_validation', 'documents', 'purchase_request', 'account', 'purchase_order_approved'],
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
from . import upload_file_wizard
|
||||
from . import comment_wizard
|
||||
15
jikimo_purchase_tier_validation/wizards/comment_wizard.py
Normal file
15
jikimo_purchase_tier_validation/wizards/comment_wizard.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class CommentWizard(models.TransientModel):
|
||||
_inherit = "comment.wizard"
|
||||
|
||||
def add_comment(self):
|
||||
|
||||
rec = self.env[self.res_model].browse(self.res_id)
|
||||
|
||||
self.review_ids = rec.review_ids
|
||||
|
||||
result = super(CommentWizard, self).add_comment()
|
||||
|
||||
return result
|
||||
@@ -330,7 +330,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
return result
|
||||
|
||||
def _get_surface_technics_purchase_ids(self):
|
||||
domain = [('origin', '=', self.production_id.name), ('purchase_type', '=', 'consignment')]
|
||||
domain = [('origin', 'like', '%' + self.production_id.name + '%'), ('purchase_type', '=', 'consignment')]
|
||||
purchase_orders = self.env['purchase.order'].search(domain)
|
||||
purchase_orders_id = self.env['purchase.order']
|
||||
for po in purchase_orders:
|
||||
@@ -1058,17 +1058,19 @@ class ResMrpWorkOrder(models.Model):
|
||||
and workorder.production_id.schedule_state == '已排'
|
||||
and len(workorder.production_id.picking_ids.filtered(
|
||||
lambda w: w.state not in ['done', 'cancel'])) == 0):
|
||||
workorder.state = 'ready'
|
||||
if workorder.is_subcontract is True:
|
||||
purchase_orders_id = self._get_surface_technics_purchase_ids()
|
||||
if purchase_orders_id.state == 'purchase':
|
||||
workorder.state = 'ready'
|
||||
move_out = workorder.move_subcontract_workorder_ids[1]
|
||||
for mo in move_out:
|
||||
if mo.state != 'done':
|
||||
mo.write({'state': 'assigned', 'production_id': False})
|
||||
continue
|
||||
continue
|
||||
else:
|
||||
workorder.state = 'waiting'
|
||||
continue
|
||||
else:
|
||||
workorder.state = 'ready'
|
||||
continue
|
||||
# ================= 如果制造订单刀具状态为[无效刀、缺刀] 或者 制造订单状态为[返工]==========================
|
||||
if (workorder.production_id.tool_state in ['1', '2'] or workorder.production_id.state == 'rework'
|
||||
or workorder.production_id.schedule_state != '已排'
|
||||
@@ -1076,7 +1078,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
if workorder.state != 'waiting':
|
||||
workorder.state = 'waiting'
|
||||
continue
|
||||
if workorder.production_id.programming_state == '已编程' and workorder.technology_design_id.routing_tag != 'special':
|
||||
if workorder.production_id.programming_state == '已编程':
|
||||
workorder.state = 'ready'
|
||||
elif workorder.state != 'waiting':
|
||||
workorder.state = 'waiting'
|
||||
@@ -1091,12 +1093,17 @@ class ResMrpWorkOrder(models.Model):
|
||||
if workorder.is_subcontract is False:
|
||||
workorder.state = 'ready'
|
||||
else:
|
||||
if len(workorder.production_id.picking_ids.filtered(
|
||||
lambda w: w.state not in ['done',
|
||||
'cancel'])) == 0 and workorder.production_id.programming_state == '已编程':
|
||||
workorder.state = 'ready'
|
||||
purchase_orders_id = self._get_surface_technics_purchase_ids()
|
||||
if purchase_orders_id:
|
||||
workorder.state = 'ready' if purchase_orders_id.state == 'purchase' else 'waiting'
|
||||
else:
|
||||
workorder.state = 'waiting'
|
||||
|
||||
if purchase_orders_id.state == 'purchase':
|
||||
move_out = workorder.move_subcontract_workorder_ids[1]
|
||||
for mo in move_out:
|
||||
if mo.state != 'done':
|
||||
mo.write({'state': 'assigned', 'production_id': False})
|
||||
|
||||
# 重写工单开始按钮方法
|
||||
def button_start(self):
|
||||
|
||||
@@ -207,6 +207,7 @@ class WorkpieceDeliveryWizard(models.TransientModel):
|
||||
workorder.production_line_id.id != self.production_ids[0].production_line_id.id):
|
||||
raise UserError(f'该rfid对应的制造订单号为{workorder.production_id.name}的目的生产线不一致')
|
||||
|
||||
if workorder.routing_type == '解除装夹':
|
||||
# 调用打印成品条码方法
|
||||
workorder.print_method()
|
||||
|
||||
|
||||
@@ -2023,6 +2023,11 @@ msgstr "<span class=\"o_stat_text\">损失</span>"
|
||||
msgid "<span class=\"o_stat_text\">Maintenance</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: sf_manufacturing
|
||||
#: model:ir.model.fields.selection,name:sf_manufacturing.selection__mrp_production__state__confirmed
|
||||
msgid "待排程"
|
||||
msgstr "待排程"
|
||||
|
||||
#. module: mrp
|
||||
#: model_terms:ir.ui.view,arch_db:mrp.product_product_form_view_bom_button
|
||||
#: model_terms:ir.ui.view,arch_db:mrp.product_template_form_view_bom_button
|
||||
|
||||
Reference in New Issue
Block a user