Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2296 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

Thank you!

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 24
1300
0
ม.ค. 21
2671
4
ก.พ. 24
3845
1
พ.ย. 22
1848
1
พ.ค. 21
12376