Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4092 Widoki

I have a model called ng.worksheet and it has these two fields:

'machine_id': fields.many2one('ng.machine', 'Széria szám', ondelete='cascade', ),
'worksheet_history_ids' : fields.one2many('ng.worksheet', 'machine_id', 'Munkalap'),

and as for the view i have this:

<page string="Gép Történet">
    <field name="worksheet_history_ids" />
</page>

I wish to make it so that if on the row I'm viewing, has a machine_id set i wish to view all the other ng.worksheet rows that has the same machine_id set. Is this possible?

Awatar
Odrzuć
Najlepsza odpowiedź
  1. add a one2many field on ng.machine which lists the ng.worksheet linked to the machine
  2. add a related field on ng.machine listing all the machines linked to the machine_id of the worksheet
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sty 25
1596
3
lis 24
29892
2
wrz 22
9368
2
kwi 22
4377
1
gru 21
2709