1.修复平台派单采购单无买家问题2.还原获取CNC程序代码
This commit is contained in:
@@ -247,7 +247,7 @@ class MrpProduction(models.Model):
|
||||
'state': 'pending',
|
||||
}]
|
||||
if production.product_id.categ_id.type == '成品':
|
||||
# production.fetchCNC()
|
||||
production.fetchCNC()
|
||||
# 根据加工面板的面数及对应的工序模板生成工单
|
||||
i = 0
|
||||
processing_panel_len = len(production.product_id.model_processing_panel.split(','))
|
||||
|
||||
@@ -128,10 +128,22 @@ class RePurchaseOrder(models.Model):
|
||||
|
||||
check_status = fields.Selection([('pending', '待审核'), ('approved', '已审核'), ('fail', '不通过')], '审核状态')
|
||||
remark = fields.Text('备注')
|
||||
user_id = fields.Many2one(
|
||||
'res.users', string='买家', index=True, tracking=True,
|
||||
compute='_compute_user_id',
|
||||
store=True)
|
||||
|
||||
def button_confirming(self):
|
||||
self.write({'state': 'purchase', 'check_status': 'pending'})
|
||||
|
||||
@api.depends('partner_id')
|
||||
def _compute_user_id(self):
|
||||
if not self.user_id:
|
||||
if self.partner_id:
|
||||
self.user_id = self.partner_id.purchase_user_id.id
|
||||
else:
|
||||
self.user_id = self.env.user.id
|
||||
|
||||
@api.constrains('order_line')
|
||||
def check_order_line(self):
|
||||
for item in self:
|
||||
|
||||
Reference in New Issue
Block a user