[FIX] hr_payroll_account: salaries journal

Before this PR, when installing the module. A Traceback could happen if you already have a journal with a code SAL. This PR remove from the demo data the adding of the journal and is replaced by a post init hook to check if the journal is present, if not then add it.
In addition, we use the journal for hr_payroll_structure so in the post init hook, we had the journal for the structure that needed it.

closes odoo/odoo#114758

Task-id: 3271099
Signed-off-by: John Laterre (jol) <jol@odoo.com>
This commit is contained in:
Maximilien (malb)
2023-05-10 13:21:16 +02:00
parent 7d39d60bca
commit 3551b7f9df
@@ -1,25 +1,25 @@
"id","description","invoice_label","type_tax_use","name","amount_type","amount","repartition_line_ids/repartition_type","repartition_line_ids/tag_ids","repartition_line_ids/document_type","repartition_line_ids/account_id"
"tax_ST1",ST1,"ST1","sale","11%","percent","11.0","base","l10n_id.ppn_tag","invoice",""
"tax_ST1","ST1","ST1","sale","11%","percent","11.0","base","l10n_id.ppn_tag","invoice",""
"","","","","","","","tax","","invoice","l10n_id_21221020"
"","","","","","","","base","l10n_id.ppn_tag","refund",""
"","","","","","","","tax","","refund","l10n_id_21221020"
"tax_PT1",PT1,"PT1","purchase","11%","percent","11.0","base","l10n_id.ppn_tag","invoice",""
"tax_PT1","PT1","PT1","purchase","11%","percent","11.0","base","l10n_id.ppn_tag","invoice",""
"","","","","","","","tax","","invoice","l10n_id_21221010"
"","","","","","","","base","l10n_id.ppn_tag","refund",""
"","","","","","","","tax","","refund","l10n_id_21221010"
"tax_ST0",ST0,"ST0","sale","0%","percent","0.0","base","","invoice",""
"tax_ST0","ST0","ST0","sale","0%","percent","0.0","base","","invoice",""
"","","","","","","","tax","","invoice","l10n_id_21221020"
"","","","","","","","base","","refund",""
"","","","","","","","tax","","refund","l10n_id_21221020"
"tax_ST2",ST2,"ST2","sale",0% EXEMPT,"percent","0.0","base","","invoice",""
"tax_ST2","ST2","ST2","sale","0% EXEMPT","percent","0.0","base","","invoice",""
"","","","","","","","tax","","invoice","l10n_id_21221020"
"","","","","","","","base","","refund",""
"","","","","","","","tax","","refund","l10n_id_21221020"
"tax_PT2",PT2,"PT2","purchase",0% EXEMPT,"percent","0.0","base","","invoice",""
"tax_PT2","PT2","PT2","purchase","0% EXEMPT","percent","0.0","base","","invoice",""
"","","","","","","","tax","","invoice","l10n_id_21221010"
"","","","","","","","base","","refund",""
"","","","","","","","tax","","refund","l10n_id_21221010"
"tax_PT0",PT0,"PT0","purchase","0%","percent","0.0","base","","invoice",""
"tax_PT0","PT0","PT0","purchase","0%","percent","0.0","base","","invoice",""
"","","","","","","","tax","","invoice","l10n_id_21221010"
"","","","","","","","base","","refund",""
"","","","","","","","tax","","refund","l10n_id_21221010"
1 id description invoice_label type_tax_use name amount_type amount repartition_line_ids/repartition_type repartition_line_ids/tag_ids repartition_line_ids/document_type repartition_line_ids/account_id
2 tax_ST1 ST1 ST1 sale 11% percent 11.0 base l10n_id.ppn_tag invoice
3 tax invoice l10n_id_21221020
4 base l10n_id.ppn_tag refund
5 tax refund l10n_id_21221020
6 tax_PT1 PT1 PT1 purchase 11% percent 11.0 base l10n_id.ppn_tag invoice
7 tax invoice l10n_id_21221010
8 base l10n_id.ppn_tag refund
9 tax refund l10n_id_21221010
10 tax_ST0 ST0 ST0 sale 0% percent 0.0 base invoice
11 tax invoice l10n_id_21221020
12 base refund
13 tax refund l10n_id_21221020
14 tax_ST2 ST2 ST2 sale 0% EXEMPT percent 0.0 base invoice
15 tax invoice l10n_id_21221020
16 base refund
17 tax refund l10n_id_21221020
18 tax_PT2 PT2 PT2 purchase 0% EXEMPT percent 0.0 base invoice
19 tax invoice l10n_id_21221010
20 base refund
21 tax refund l10n_id_21221010
22 tax_PT0 PT0 PT0 purchase 0% percent 0.0 base invoice
23 tax invoice l10n_id_21221010
24 base refund
25 tax refund l10n_id_21221010