Add field access on referential document
There are many new issues (#10160 (closed), #10161 (closed), #9305 (closed)) to add configuration override on referential document (and we have already some).
The access right on those fields should be limited to the same group as the configuration (or the document configured). For example only payment term should be editable only by account group on the party.
I think this should be setup first on existing fields before adding new fields to ensure that the design is correct and that new fields follow all the same design.
In order to allow other user to a create the referential document with limit the edition of such field, those fields should always be allowed to be empty and should not have default value (which should not happen as the default is stored on the configuration only). When a checkbox is needed to differenciate between empty value and default value, this checkbox should also have access right limited but None
value must mean "use the default". So it will be more an "edit" checkbox.
Here is the list of module/fields to correct:
Party:
-
customer_payment_term
: account group, sale group (+ manage empty value with checkbox and no default) -
supplier_payment_term
: account group, purchase group (+ manage empty value with checkbox and no default) -
sale_shipment_grouping_method
: sale group (+ manage empty value with checkbox and no default) -
account_payable
,account_receivable
: account group -
customer_tax_rule
,supplier_tax_rule
: account group (+ manage empty value with checkbox and no default) -
supplier_tax_group_on_cash_basis
: account group -
purchase_price_list
: purchase group (+ manage empty value with checkbox and no default) -
sale_invoice_grouping_method
: sale group (+ manage empty value with checkbox and no default) -
sale_price_list
: sale group (+ manage empty value with checkbox and no default) -
sale_shipment_grouping_method
: sale group (+ manage empty value with checkbox and no default)
Product/Template:
-
depreciable
,depreciation_duration
: account group -
account_category
: account group -
landed_cost
: account group