Merge branch refs/heads/develop into refs/heads/feature/NC程序和功能刀具校验

This commit is contained in:
禹翔辉
2024-07-22 17:11:41 +08:00
3 changed files with 9 additions and 9 deletions

View File

@@ -237,12 +237,12 @@ class MrpProduction(models.Model):
if result['status'] == 1:
for item in result['programming_list']:
if not self:
production = self.env['mrp.production'].search(
[('state', '=', 'rework'),
('programming_no', '=', item['programming_no'], ('is_rework', '=', True))])
if production:
production.write({'programming_state': '已编程未下发' if item[
'programming_state'] == '已编程' else '编程中'})
for rp in reproduction:
if rp.programming_no == item['programming_no']:
rp.write({'programming_state': '已编程未下发' if item[
'programming_state'] == '已编程' else '编程中'})
logging.info('rp:' % rp.name)
else:
return item
@@ -802,7 +802,7 @@ class MrpProduction(models.Model):
'default_programming_state': cloud_programming['programming_state'],
'default_is_reprogramming': False if (cloud_programming['programming_state'] in ['编程中',
'待编程'] and self.programming_state in [
'编程中'])
'编程中', '已编程'])
or (cloud_programming['programming_state'] in [
'已编程'] and self.programming_state in ['已编程未下发']) else True
}