23 lines
634 B
Python
23 lines
634 B
Python
from odoo import fields, models, api
|
|
from odoo.exceptions import UserError, ValidationError
|
|
from datetime import datetime, date, time, timedelta
|
|
|
|
|
|
class ChangeOpinionsWizard(models.Model):
|
|
_name = 'change.opinions.wizard'
|
|
_description = '变更意见'
|
|
|
|
node_name = fields.Char(string="节点名称")
|
|
comment_id = fields.Many2one('soong.note', string="意见")
|
|
soong_ids = fields.Many2many('soong.workflow')
|
|
|
|
def confirm(self):
|
|
for soong in self.soong_ids:
|
|
for node in soong.node_ids:
|
|
if node.name == self.node_name:
|
|
node.comment_id = self.comment_id
|
|
|
|
|
|
|
|
|