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

I have an ir.rule. I want a group only see their own records on account.voucher. 

`account.voucher` didn't have a `user_id` field, so I have to create it. The only way I have to recover the older `user_id` is with `message_follower_ids` field, so I have this new field


class AccountVoucher(models.Model):
_inherit = 'account.voucher'

user_id = fields.Char(string='Salesperson', related="message_follower_ids.name", store=True)

And it's working OK with the new records I'm creating, but I also need the old records to make the ir.rule work

I think the problem is the same with computed fields, they don't get stored on db.
How should I add to accomplish my task? Could you provide some example?









                
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
mar 25
1269
0
sty 25
3337
1
sie 23
14631
change password Rozwiązane
1
sie 23
13278
1
lip 23
10292