I want to create many chains of the same type records that keep some data in common.
For example:
report id_r:1-> report id_r:1 yesterday <-> report id_r:1 before yesterday
report id_r:2-> report id_r:2 yesterday -> report id_r:2 before yesterday
They are all the same Model.
'my_module.report'
How to declare it??
class Report():
__name__ = 'mymodule.report'
next_report = fields.One2One( ???
previous_report = fields.One2One( ???
##<fields>
OR
next_report = fields.Many2Many( ???
previous_report = fields.Many2Many( ???
##<fields>
class ChainReports():
next_report = ????
prev_report = ????
I don’t clearly understand how to correctly build such a relation???
Maybe by using a Function field???
Constantine.