Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2290 Näkymät

I created a group which is designed can only click the  action_register_payment button in the account.move out or in form view. I thought that the function does not need the access to create account.move record, but it turns out that it acutally needs the access,why.

It just modify some data of the record,doesn't it? I am confused.Can anybody explain the reason? 

Thank you.

Avatar
Hylkää
Paras vastaus

Hi,

When you record a payment from register payment wizard, it creates a payment entry in the table account.payment which is created by inheriting from account.move model.

class AccountPayment(models.Model):
_name = "account.payment"
_inherits = {'account.move': 'move_id'}

for this reason, you need to create the access right for account.move model, if you need to bypass it, safely you can consider adding the sudo with the function which is responsible for creating the payment entry.


Thanks

Avatar
Hylkää
Tekijä

Thank you!

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
elok. 24
1290
0
tammik. 21
2669
4
helmik. 24
3839
1
marrask. 22
1848
1
toukok. 21
12368