You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
459 B

import re
import werkzeug.urls
from odoo import api, fields, models, tools
class Mailing(models.Model):
_inherit = 'mailing.mailing'
operation_id=fields.Many2one('opendons.operation','Operation')
segment_id=fields.Many2one('opendons.segment','Segment')
@api.onchange('operation_id')
def _onchange_operation_id(self):
res = {}
res['domain']={'segment_id':[('operation_id', '=', self.operation_id.id)]}
return res