Files
odoo_source/addons/account/security/ir.model.access.csv
T
Laurent Smet bc131c0cfb [MERGE] manual forward port of accounting-pocalypse (beaa30a3d1)
This commit merges the following models
 * account.invoice and account.move
 * account.invoice.line and account.move.line
 * account.voucher and account.move
 * account.voucher.line and account.move.line

It was the opportunity for a big cleanup of the code, so it also restructures the whole account module, its different models/fields, the tests etc. for a better world and a better code readability.

==== Rationale ====
The rationale of this huge change is that we want journal entries / invoices to be easily edited, and changes reflected in the other model. It's a HUGE feature and very strategic for the fiduciary companies. For example, changing the account of a journal entry needs to be automatically reflected on the related invoice.

The same reasoning applies to sale/purchase vouchers.

==== Changes made in features =====
When creating an invoice, you are now creating a journal entry directly.
--> The object account.invoice no longer exists.
In the same fashion when creating an invoice line, you're now adding journal items directly in the journal entry representing the invoice. If this invoice line has some tax, it may create additional journal items as well.
--> The models account.invoice.line & account.invoice.tax no longer exist

Identically, when creating a sale/purchase receipt with its lines, you are now creating a journal entry directly and there's no more usability difference between encoding a receipt or an invoice.
--> The object account.voucher no longer exists.
--> The object account.voucher.line no longer exists.
--> The whole account_voucher module no longer exists.

Positive side-effects coming from these changes are
* draft invoices/bills/sale or purchase receipts now create a draft accounting entry. Validate these objects now simply post its journal entry. That means that draft invoices/bills/sale or purchase receipt can straightforwardly be included in reporting or budgets.
* opening a journal entry in form view will now always open the correct view: if it's a sale/purchase journal entry we will have a customer invoice/vendor bill view or a sale/purchase receipt view, whatever the menu we're coming from.
* code & business logic simplification. It is also condensed in a single place instead of being partially duplicated on invoices, vouchers and journal entries.

There should be no feature loss, except the one allowing to group multiple journal items together based on the same product during the invoice validation.

==== Changes made in models =====
* account.invoice: model removed. Instead, now use account.move with following mapping

field (account.invoice) 		field (account.move)
-----------------------			--------------------
name 					invoice_payment_ref
number 					name
reference 				ref
comment 				narration
user_id 				invoice_user_id
amount_					total_company_signed amount_total_signed
residual 				amount_residual
state 					state + invoice_payment_state 		/!\ selection changed
date_invoice 				invoice_date
date_due 				invoice_date_due
sent 					invoice_sent
origin 					invoice_origin
payment_term_id 			invoice_payment_term_id
partner_bank_id 			invoice_partner_bank_id
incoterm_id 				invoice_incoterm_id
vendor_bill_id 				invoice_vendor_bill_id
source_email 				invoice_source_email
vendor_display_name 			invoice_vendor_display_name
invoice_icon 				invoice_vendor_icon
cash_rounding_id 			invoice_cash_rounding_id
sequence_number_next 			invoice_sequence_number_next
sequence_number_next_prefix 		invoice_sequence_number_next_prefix

'invoices' subset of account.move can be accessed by using the selection field 'type' or one of the many helpers like is_invoice()

* account.move: now has a valid state 'cancel' that has to be excluded from all business logic
* account.move: field 'amount' renamed into 'amount_total'
* account.move: field 'reverse_entry_id' renamed into 'reversed_entry_id'
* account.move.line: now has a field 'display_type' that has to be excluded from all business logic, in order to support invoice layouting
* account.invoice.line: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.line) 		field (account.move.line)
----------------------------		-------------------------
invoice_id 				move_id
uom_id 					product_uom_id
invoice_line_tax_ids 			tax_ids
account_analytic_id 			analytic_account_id

'invoice lines' subset of all account.move.line from a journal entry can be accessed by using the boolean field 'exclude_from_invoice_tab'

* account.invoice.tax: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.tax) 		field (account.move.line)
---------------------------		-------------------------
invoice_id 				move_id
account_analytic_id 			analytic_account_id
amount 					price_unit
base 					tax_base_amount

'tax lines' subset of all account.move.line from a journal entry can be accessed by using the relational field 'tax_line_id'

* account.invoice.confirm: model removed. Instead, now use the 'post()' function of account.move
* account.invoice.refund: model removed. Instead, now use account.move.reversal to reverse the entries with the same options as we had for invoices
* account.voucher: model removed. Instead, now use account.move of type in ['out_receipt', 'in_receipt]
* account.voucher.line: model removed. Instead, now use account.move.line

==== Changes made in functions ====
* on account.move, method _run_post_draft_to_post() renamed into _autopost_draft_entries()
* on account.move, method action_account_invoice_payment() renamed into action_invoice_register_payment()
* on account.move, method action_invoice_reconcile_to_check() renamed into action_open_matching_suspense_moves()
* on account.move, method _get_domain_edition_mode_available() renamed into _get_domain_matching_supsense_moves()
* on account.move, method _get_intrastat_country_id() renamed into _get_invoice_intrastat_country_id()
* on account.move.line, method _get_domain_for_edition_mode() renamed into _get_suspense_moves_domain()
* in account.bank.statement, contextual key 'edition_mode' renamed into 'suspense_moves_mode'

Was task 1917430
2019-07-01 13:45:57 +02:00

10 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_product_product_account_userproduct.product.account.userproduct.model_product_productgroup_account_user1000
3access_product_product_account_managerproduct.product.account.managerproduct.model_product_productaccount.group_account_manager1111
4access_product_template_account_managerproduct.template.account.managerproduct.model_product_templateaccount.group_account_manager1111
5access_account_payment_termaccount.payment.termmodel_account_payment_termaccount.group_account_user1000
6access_account_payment_term_lineaccount.payment.term.linemodel_account_payment_term_lineaccount.group_account_user1000
7access_account_account_type_manageraccount.account.typemodel_account_account_typeaccount.group_account_manager1111
8access_account_account_typeaccount.account.typemodel_account_account_typeaccount.group_account_user1000
9access_account_tax_internal_useraccount.tax internal usermodel_account_taxbase.group_user1000
10access_account_account_manageraccount.accountmodel_account_accountaccount.group_account_manager1111
11access_account_accountaccount.accountmodel_account_accountaccount.group_account_user1000
12access_account_account_useraccount.account usermodel_account_accountbase.group_user1000
13access_account_account_partner_manageraccount.account partner managermodel_account_accountbase.group_partner_manager1000
14access_account_group_manageraccount.groupmodel_account_groupaccount.group_account_manager1111
15access_account_groupaccount.groupmodel_account_groupaccount.group_account_user1000
16access_account_taxaccount.taxmodel_account_taxaccount.group_account_invoice1000
17access_account_account_templateaccount.account.templatemodel_account_account_templateaccount.group_account_manager1111
18access_account_chart_templateaccount.chart.templatemodel_account_chart_templateaccount.group_account_manager1111
19access_account_tax_templateaccount.tax.templatemodel_account_tax_templateaccount.group_account_manager1111
20access_account_bank_statement_group_invoiceaccount.bank.statement.group.invoicemodel_account_bank_statementaccount.group_account_invoice1000
21access_account_bank_statement_line_group_invoiceaccount.bank.statement.line.group.invoicemodel_account_bank_statement_lineaccount.group_account_invoice1000
22access_account_bank_statementaccount.bank.statementmodel_account_bank_statementaccount.group_account_user1111
23access_account_bank_statement_lineaccount.bank.statement.linemodel_account_bank_statement_lineaccount.group_account_user1111
24access_account_analytic_line_manageraccount.analytic.line managermodel_account_analytic_lineaccount.group_account_manager1000
25access_account_analytic_accountaccount.analytic.accountanalytic.model_account_analytic_accountbase.group_user1000
26access_account_move_uinvoiceaccount.movemodel_account_moveaccount.group_account_invoice1111
27access_account_move_line_uinvoiceaccount.move.line invoicemodel_account_move_lineaccount.group_account_invoice1111
28access_account_invoice_portalaccount.move.portalaccount.model_account_movebase.group_portal1000
29access_account_invoice_line_portalaccount.move.line.portalaccount.model_account_move_linebase.group_portal1000
30access_account_payment_term_manageraccount.payment.termmodel_account_payment_termaccount.group_account_manager1111
31access_account_payment_term_line_manageraccount.payment.term.linemodel_account_payment_term_lineaccount.group_account_manager1111
32access_account_cash_rounding_uinvoiceaccount.cash.roundingmodel_account_cash_roundingaccount.group_account_invoice1111
33access_account_tax_manageraccount.taxmodel_account_taxaccount.group_account_manager1111
34access_account_journal_manageraccount.journalmodel_account_journalaccount.group_account_manager1111
35access_account_journal_useraccount.journalmodel_account_journalaccount.group_account_user1000
36access_account_journal_invoiceaccount.journal invoicemodel_account_journalaccount.group_account_invoice1000
37access_res_currency_account_managerres.currency account managerbase.model_res_currencygroup_account_manager1111
38access_res_currency_rate_account_managerres.currency.rate account managerbase.model_res_currency_rategroup_account_manager1111
39access_account_payment_term_partner_manageraccount.payment.term partner managermodel_account_payment_termbase.group_user1000
40access_account_payment_term_line_partner_manageraccount.payment.term.line partner managermodel_account_payment_term_linebase.group_user1000
41access_account_fiscal_position_product_manageraccount.fiscal.position account.managermodel_account_fiscal_positionaccount.group_account_manager1111
42access_account_fiscal_position_tax_product_manageraccount.fiscal.position.tax account.managermodel_account_fiscal_position_taxaccount.group_account_manager1111
43access_account_fiscal_position_account_product_manageraccount.fiscal.position account.managermodel_account_fiscal_position_accountaccount.group_account_manager1111
44access_account_fiscal_positionaccount.fiscal.position allmodel_account_fiscal_positionbase.group_user1000
45access_account_fiscal_position_taxaccount.fiscal.position.tax allmodel_account_fiscal_position_taxbase.group_user1000
46access_account_fiscal_position_accountaccount.fiscal.position allmodel_account_fiscal_position_accountbase.group_user1000
47access_account_fiscal_position_templateaccount.fiscal.position.templatemodel_account_fiscal_position_templateaccount.group_account_manager1111
48access_account_fiscal_position_tax_templateaccount.fiscal.position.tax.templatemodel_account_fiscal_position_tax_templateaccount.group_account_manager1111
49access_account_fiscal_position_account_templateaccount.fiscal.position.account.templatemodel_account_fiscal_position_account_templateaccount.group_account_manager1111
50access_account_invoice_report_useraccount.invoice.report_usermodel_account_invoice_reportaccount.group_account_user1000
51access_account_invoice_reportaccount.invoice.reportmodel_account_invoice_reportaccount.group_account_manager1111
52access_account_invoice_report_billingaccount.invoice.report_billingmodel_account_invoice_reportaccount.group_account_invoice1000
53access_res_partner_group_account_managerres_partner group_account_managermodel_res_partneraccount.group_account_manager1000
54access_account_move_line_manageraccount.move.line managermodel_account_move_lineaccount.group_account_manager1000
55access_account_move_manageraccount.move managermodel_account_moveaccount.group_account_manager1000
56access_account_analytic_line_invoiceaccount.analytic.line invoicemodel_account_analytic_lineaccount.group_account_invoice1111
57access_account_account_invoiceaccount.account invoicemodel_account_accountaccount.group_account_invoice1000
58access_account_analytic_accountantaccount.analytic.account accountantanalytic.model_account_analytic_accountaccount.group_account_user1111
59access_account_account_type_invoiceaccount.account.type invoicemodel_account_account_typeaccount.group_account_invoice1000
60access_account_account_taxaccount.account.tagmodel_account_account_tagaccount.group_account_user1111
61access_account_account_tax_useraccount.account.tagmodel_account_account_tagaccount.group_account_invoice1000
62access_account_reconcile_modelaccount.reconcile.modelmodel_account_reconcile_modelaccount.group_account_user1111
63access_account_reconcile_model_templateaccount.reconcile.model.templatemodel_account_reconcile_model_templateaccount.group_account_invoice1111
64access_account_partial_reconcile_group_invoiceaccount.partial.reconcile.group.invoicemodel_account_partial_reconcileaccount.group_account_invoice1110
65access_account_partial_reconcileaccount.partial.reconcilemodel_account_partial_reconcileaccount.group_account_user1111
66access_account_full_reconcile_group_invoiceaccount.full.reconcile.group.invoicemodel_account_full_reconcileaccount.group_account_invoice1110
67access_account_full_reconcileaccount.full.reconcilemodel_account_full_reconcileaccount.group_account_user1111
68access_account_payment_methodaccount.payment.methodmodel_account_payment_methodaccount.group_account_invoice1111
69access_account_paymentaccount.paymentmodel_account_paymentaccount.group_account_invoice1111
70access_account_cashboxaccount.bank.statement.cashboxmodel_account_bank_statement_cashboxaccount.group_account_user1111
71access_account_cashbox_lineaccount.bank.statement.cashbox.linemodel_account_cashbox_lineaccount.group_account_user1111
72access_account_tax_group_internal_useraccount.tax.group internal usermodel_account_tax_groupbase.group_user1000
73access_account_tax_groupaccount.tax.groupmodel_account_tax_groupaccount.group_account_invoice1000
74access_account_tax_group_manageraccount.tax.groupmodel_account_tax_groupaccount.group_account_manager1111
75access_account_fiscal_year_useraccount.fiscal.year.usermodel_account_fiscal_yearaccount.group_account_user1000
76access_account_fiscal_year_manageraccount.fiscal.year.managermodel_account_fiscal_yearaccount.group_account_manager1111
77access_account_incoterms_allaccount.incoterms allmodel_account_incoterms1000
78access_account_incoterms_manageraccount.incoterms managermodel_account_incotermsaccount.group_account_manager1111
79access_account_journal_group_allaccount.journal.group allmodel_account_journal_group1000
80access_account_journal_group_manageraccount.journal.group managermodel_account_journal_groupaccount.group_account_manager1111
81access_account_tax_repartition_line_useraccount.tax repartition.line.usermodel_account_tax_repartition_linebase.group_user1000
82access_account_tax_repartition_line_invoiceaccount.tax repartition.line.invoicemodel_account_tax_repartition_lineaccount.group_account_invoice1000
83access_account_tax_repartition_line_manageraccount.tax repartition.line.managermodel_account_tax_repartition_lineaccount.group_account_manager1111
84access_account_tax_repartition_line_template_manageraccount.tax repartition.line.template.managermodel_account_tax_repartition_line_templateaccount.group_account_manager1111
85access_account_tax_report_line_invoiceaccount.tax.report.line.invoicemodel_account_tax_report_lineaccount.group_account_invoice1000
86access_account_tax_report_line_ac_useraccount.tax.report.line.ac.usermodel_account_tax_report_lineaccount.group_account_manager1111