Before this commit, the accounting module had a setting on the selection of taxes used by the sales, purchase, website_sale, ... modules. In addition, the website_sale module had the same setting related to the accounting one. This PR isolates the tax selection parameter in the website_sale module, and instead of using the tax selection, the accounting module will use rounding method (round per line, round globally). Selecting one of the two will change the display of all account_move or other view using the tax selection setting. Display changes: In round per line, a column tax excluded will always be displayed while a column tax included will be in optional hide. On the other hand, in the round globally, only the tax excluded columns will be available. closes odoo/odoo#99209 Task-id: 2954332 Related: odoo/upgrade#3826 Related: odoo/enterprise#30853 Signed-off-by: William André (wan) <wan@odoo.com>
22 lines
1.1 KiB
Python
22 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, models, _
|
|
from odoo.exceptions import ValidationError
|
|
|
|
|
|
class GroupsView(models.Model):
|
|
_inherit = 'res.groups'
|
|
|
|
@api.model
|
|
def get_application_groups(self, domain):
|
|
# Overridden in order to remove 'Show Full Accounting Features' and
|
|
# 'Show Full Accounting Features - Readonly' in the 'res.users' form view to prevent confusion
|
|
group_account_user = self.env.ref('account.group_account_user', raise_if_not_found=False)
|
|
if group_account_user and group_account_user.category_id.xml_id == 'base.module_category_hidden':
|
|
domain += [('id', '!=', group_account_user.id)]
|
|
group_account_readonly = self.env.ref('account.group_account_readonly', raise_if_not_found=False)
|
|
if group_account_readonly and group_account_readonly.category_id.xml_id == 'base.module_category_hidden':
|
|
domain += [('id', '!=', group_account_readonly.id)]
|
|
return super().get_application_groups(domain)
|