Josias Pérez
unread,Feb 7, 2018, 5:30:06 PM2/7/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tryton-dev
Hi,
I have a custom module with the a One2Many field:
class Agreement(ModelView, ModelSQL):
"Agreement"
__name__ = 'mod.agreement'
date = fields.Date('Date')
lines = fields.One2Many('disc.agreement.service',
'agreement','Services',
)
class AgreementLine(ModelView, ModelSQL):
"Agreement Line"
__name___ = 'mod.agreement.line'
agreement = fields.Many2One('Agreement')
service = fields.Many2One('mod.service', 'Service')
class Service(ModelView, ModelSQL):
"Service"
__name__ = 'mod.service'
name = fields.Char('Name')
Inside this class I have modified the search classmethod and I want to search Agreements by Service ('mod.service') in Agreement class('mod.agreement'), is this possible?
Thanks for your help and comments!