Hi, I duplicated odoo all default accounting user groups and set a user with this group. I can do everything in accounting except in customers->customer->accounting tab I can no see Accounting Entries, Account Receivable and Account Payable. How can i give access to my user group to this fields ? Need help
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Dear Josep
Okay, you've created a custom accounting user group by duplicating the default Odoo accounting groups, but users in this group can't see the "Accounting Entries," "Account Receivable," and "Account Payable" sections in the customer form. This is a common issue related to record rules and field-level access rights. Here's how to troubleshoot and fix it:
Understanding the Problem
The "Accounting Entries," "Account Receivable," and "Account Payable" sections are often displayed using related fields and smart buttons that rely on specific access rights. Even if a user has general accounting access, they might not have the necessary permissions to view the underlying data or trigger the actions that populate these sections.
Troubleshooting Steps and Solutions
- Identify the Models and Fields Involved:
- Accounting Entries: This section likely displays journal entries (account.move) related to the customer.
- Account Receivable: This section shows the customer's outstanding invoices and payments. It involves the account.move (invoices) and account.payment models.
- Account Payable: This is less common on a customer form (it's usually on a vendor form), but if it's present, it would show bills and payments related to the customer as a vendor.
- Check Record Rules:
- Record rules are the most common cause of this issue. Odoo uses record rules to restrict access to records based on user groups and conditions.
- Enable Developer Mode: Go to Settings and activate Developer Mode (also called Debug Mode).
- Go to Record Rules: Go to Settings -> Technical -> Record Rules.
- Filter by Model: Filter the record rules by the account.move and account.payment models.
- Examine the Rules: Carefully examine the record rules that apply to these models. Look for rules that might be restricting access based on company, user, or other conditions.
- Modify or Duplicate Rules (Carefully):
- If you find a rule that's restricting access, you have two options:
- Modify the Rule: Add your custom user group to the rule's "Groups" field. Be very careful when modifying existing rules, as this could affect other users.
- Duplicate the Rule: Duplicate the existing rule and modify the duplicate to include your custom user group. This is generally the safer option.
- Ensure Correct Domain Filter: Make sure the domain filter in the record rule is not too restrictive. It should allow users in your custom group to see the relevant records. The domain filter often uses Python code to define the conditions.
- If you find a rule that's restricting access, you have two options:
- Check Field-Level Access Rights:
- Odoo allows you to control access to individual fields on a model. It's possible that your custom user group doesn't have read access to some of the fields used to display the information in these sections.
- Go to Access Rights: Go to Settings -> Technical -> Security -> Access Rights.
- Filter by Model: Filter the access rights by the account.move and account.payment models.
- Examine the Rights: Check the access rights for your custom user group. Make sure they have "Read" access to all the relevant fields.
- Add Missing Rights: If your custom group is missing access rights, add them.
- Check Inherited Groups:
- Make sure your custom user group inherits from the correct base accounting groups. It should inherit from at least one of the following:
- Accounting & Finance / Accountant
- Accounting & Finance / Adviser
- This ensures that your custom group has the basic accounting permissions.
- Make sure your custom user group inherits from the correct base accounting groups. It should inherit from at least one of the following:
- Check View Definitions:
- In rare cases, the view definitions themselves might be restricting access to certain elements based on user groups.
- Inspect the View: Activate developer mode, open the customer form, and use the "View Form" option in the debugger to inspect the view definition.
- Look for groups Attributes: Look for groups attributes on the <div> elements that contain the "Accounting Entries," "Account Receivable," and "Account Payable" sections. If there are groups attributes, make sure your custom user group is included.
- Clear Odoo Cache:
- After making any changes to record rules or access rights, clear the Odoo cache to ensure that the changes take effect. You can do this by restarting the Odoo service or by going to Settings -> Technical -> Clear Server Cache.
Specific Steps for "Accounting Entries," "Account Receivable," and "Account Payable"
- "Accounting Entries" (Journal Entries):
- Check record rules on account.move to ensure your group can see journal entries related to the customer. The domain filter might need to include a condition that checks the partner_id field.
- "Account Receivable" (Invoices and Payments):
- Check record rules on account.move (for invoices) and account.payment to ensure your group can see invoices and payments related to the customer. The domain filter might need to include a condition that checks the partner_id field.
- "Account Payable" (Less Common on Customer Form):
- If this section is present, it likely means the customer is also set up as a vendor. Check record rules on account.move (for bills) and account.payment to ensure your group can see bills and payments related to the customer as a vendor. The domain filter might need to include a condition that checks the partner_id field.
Example: Modifying a Record Rule
Let's say you find a record rule on account.move called "Account Move: See own company documents" that has the following domain filter:
['|',('company_id','=',False),('company_id','in',user.company_ids.ids)]
This rule restricts access to journal entries to users who belong to the same company as the journal entry. To allow users in your custom group to see journal entries from other companies, you could duplicate this rule and modify the duplicate to include your custom group in the "Groups" field.
Important Notes
- Testing: After making any changes, thoroughly test the access rights by logging in as a user in your custom group and verifying that they can now see the "Accounting Entries," "Account Receivable," and "Account Payable" sections.
- Security: Be very careful when modifying record rules and access rights. Incorrectly configured rules can expose sensitive data or prevent users from performing their jobs.
- Documentation: Document any changes you make to record rules and access rights so that you can easily understand and maintain them in the future.
By following these steps, you should be able to identify the cause of the access issue and grant your custom user group the necessary permissions to view the "Accounting Entries," "Account Receivable," and "Account Payable" sections in the customer form. Remember to test thoroughly and be careful when modifying record rules and access rights.
🚀 Did This Solve Your Problem?
If this answer helped you save time, money, or frustration, consider:
✅ Upvoting (👍) to help others find it faster
✅ Marking as "Best Answer" if it resolved your issue
Your feedback keeps the Odoo community strong! 💪
(Need further customization? Drop a comment—I’m happy to refine the solution!)
Add your new group as an implied group of the original accounting groups so it inherits their permissions. For example, in your group XML:
<record id="group_my_accounting_group" model="res.groups">
<field name="implied_ids" eval="[(4, ref('account.group_account_manager')), (4, ref('account.group_account_user'))]"/>
</record>
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
6
Jul 23
|
6293 | ||
|
0
Mar 15
|
3664 | ||
|
4
Aug 25
|
257 | ||
|
0
Aug 25
|
175 | ||
|
0
Aug 25
|
186 |