Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Why does the action_register_payment function of account.move needs the create right?

Avatar
odoo
Avatar
Discard
1 Answer
0
Avatar
odoo
Best Answer

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

1 Comment
Avatar
Discard
Avatar
odoo
-

Thank you!