Merge lp:~julie-w/unifield-server/US-6557 into lp:unifield-server
- US-6557
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 5602 |
Proposed branch: | lp:~julie-w/unifield-server/US-6557 |
Merge into: | lp:unifield-server |
Diff against target: |
973 lines (+598/-186) (has conflicts) 8 files modified
bin/addons/account/account_invoice_view.xml (+42/-0) bin/addons/account_override/account_invoice_view.xml (+14/-0) bin/addons/account_override/period.py (+19/-0) bin/addons/msf_profile/data/patches.xml (+21/-0) bin/addons/msf_profile/i18n/fr_MF.po (+104/-0) bin/addons/msf_profile/msf_profile.py (+298/-148) bin/addons/vertical_integration/report/hq_report_ocb.py (+85/-38) bin/addons/vertical_integration/vertical_integration_wizard.xml (+15/-0) Text conflict in bin/addons/account/account_invoice_view.xml Text conflict in bin/addons/account_override/account_invoice_view.xml Text conflict in bin/addons/msf_profile/data/patches.xml Text conflict in bin/addons/msf_profile/i18n/fr_MF.po Text conflict in bin/addons/msf_profile/msf_profile.py |
To merge this branch: | bzr merge lp:~julie-w/unifield-server/US-6557 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+378504@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/addons/account/account_invoice_view.xml' | |||
2 | --- bin/addons/account/account_invoice_view.xml 2020-01-21 14:01:11 +0000 | |||
3 | +++ bin/addons/account/account_invoice_view.xml 2020-02-04 10:20:45 +0000 | |||
4 | @@ -358,6 +358,7 @@ | |||
5 | 358 | ('from_supply', '=', True), | 358 | ('from_supply', '=', True), |
6 | 359 | ('partner_type', 'in', ('intermission', 'section'))]}"/> | 359 | ('partner_type', 'in', ('intermission', 'section'))]}"/> |
7 | 360 | <field name="payment_term" widget="selection"/> | 360 | <field name="payment_term" widget="selection"/> |
8 | 361 | <<<<<<< TREE | ||
9 | 361 | <field colspan="4" name="invoice_line" nolabel="1" context="{'fake': 1, 'from_inv_form': True}"> | 362 | <field colspan="4" name="invoice_line" nolabel="1" context="{'fake': 1, 'from_inv_form': True}"> |
10 | 362 | <tree string="Invoice Line" | 363 | <tree string="Invoice Line" |
11 | 363 | colors="red:inactive_product == True or analytic_distribution_state in ('invalid', 'invalid_small_amount');blue:inactive_product == False and analytic_distribution_state in ('valid');black:inactive_product == False and analytic_distribution_state in ('none')" | 364 | colors="red:inactive_product == True or analytic_distribution_state in ('invalid', 'invalid_small_amount');blue:inactive_product == False and analytic_distribution_state in ('valid');black:inactive_product == False and analytic_distribution_state in ('none')" |
12 | @@ -397,6 +398,47 @@ | |||
13 | 397 | <field name="price_subtotal"/> | 398 | <field name="price_subtotal"/> |
14 | 398 | </tree> | 399 | </tree> |
15 | 399 | </field> | 400 | </field> |
16 | 401 | ======= | ||
17 | 402 | <field colspan="4" name="invoice_line" nolabel="1" context="{'fake': 1, 'from_inv_form': True}"> | ||
18 | 403 | <tree string="Invoice Line" | ||
19 | 404 | colors="red:inactive_product == True or analytic_distribution_state in ('invalid');blue:inactive_product == False and analytic_distribution_state in ('valid');black:inactive_product == False and analytic_distribution_state in ('none')" | ||
20 | 405 | editable="both"> | ||
21 | 406 | <field name="invoice_type" invisible="1"/> | ||
22 | 407 | <field name="line_synced" invisible="1"/> | ||
23 | 408 | <field name="from_supply" invisible="1"/> | ||
24 | 409 | <field name="partner_type" invisible="1"/> | ||
25 | 410 | <field name="line_number" displayon="noteditable"/> | ||
26 | 411 | <field name="is_corrected" invisible="1"/> | ||
27 | 412 | <button name="button_open_analytic_lines" string="Have been corrected" type="object" | ||
28 | 413 | icon="terp-mail-" attrs="{'invisible': [('is_corrected', '=', False)]}"/> | ||
29 | 414 | <field name="name"/> | ||
30 | 415 | <field name="inactive_product" invisible="1"/> | ||
31 | 416 | <field name="account_id" | ||
32 | 417 | domain="[('journal_id', '=', parent.journal_id), ('restricted_area', '=', 'invoice_lines')]" | ||
33 | 418 | context="{'type': parent.type, 'journal_type': parent.journal_type}" | ||
34 | 419 | /> | ||
35 | 420 | <button name="button_analytic_distribution" string="Analytical Distribution" type="object" | ||
36 | 421 | icon="terp-stock_symbol-selection" context="context" | ||
37 | 422 | attrs="{'invisible': [('is_allocatable', '=', False)]}"/> | ||
38 | 423 | <field name="analytic_distribution_state_recap" readonly="1"/> | ||
39 | 424 | <field name="analytic_distribution_state" invisible="1"/> | ||
40 | 425 | <field name="is_allocatable" invisible="1"/> | ||
41 | 426 | <field name="quantity" | ||
42 | 427 | attrs="{'readonly': ['|', | ||
43 | 428 | '&', ('invoice_type', '=', 'in_invoice'), '|', ('line_synced', '=', True), ('from_supply', '=', True), | ||
44 | 429 | '&', '&', ('invoice_type', '=', 'out_invoice'), ('from_supply', '=', True), ('partner_type', 'in', ('intermission', 'section'))]}"/> | ||
45 | 430 | <field name="product_id" invisible="1"/> | ||
46 | 431 | <field name="uos_id" string="UoM" | ||
47 | 432 | on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})" | ||
48 | 433 | attrs="{'readonly': ['|', | ||
49 | 434 | '&', ('invoice_type', '=', 'in_invoice'), '|', ('line_synced', '=', True), ('from_supply', '=', True), | ||
50 | 435 | '&', '&', ('invoice_type', '=', 'out_invoice'), ('from_supply', '=', True), ('partner_type', 'in', ('intermission', 'section'))]}"/> | ||
51 | 436 | <field name="price_unit" | ||
52 | 437 | attrs="{'readonly': [('invoice_type', '=', 'in_invoice'), ('line_synced', '=', True)]}"/> | ||
53 | 438 | <field name="price_subtotal"/> | ||
54 | 439 | </tree> | ||
55 | 440 | </field> | ||
56 | 441 | >>>>>>> MERGE-SOURCE | ||
57 | 400 | <group col="1" colspan="2"> | 442 | <group col="1" colspan="2"> |
58 | 401 | <field name="tax_line" nolabel="1"> | 443 | <field name="tax_line" nolabel="1"> |
59 | 402 | <tree editable="bottom" string="Taxes"> | 444 | <tree editable="bottom" string="Taxes"> |
60 | 403 | 445 | ||
61 | === modified file 'bin/addons/account_corrections/wizard/analytic_distribution_wizard.py' | |||
62 | === modified file 'bin/addons/account_override/account_invoice_view.xml' | |||
63 | --- bin/addons/account_override/account_invoice_view.xml 2020-01-21 14:01:11 +0000 | |||
64 | +++ bin/addons/account_override/account_invoice_view.xml 2020-02-04 10:20:45 +0000 | |||
65 | @@ -390,9 +390,14 @@ | |||
66 | 390 | <label string="" colspan="2"/> | 390 | <label string="" colspan="2"/> |
67 | 391 | <field name="check_total" required="2"/> | 391 | <field name="check_total" required="2"/> |
68 | 392 | <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list"> | 392 | <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list"> |
69 | 393 | <<<<<<< TREE | ||
70 | 393 | <tree string="Donation Lines" editable="both" | 394 | <tree string="Donation Lines" editable="both" |
71 | 394 | colors="red:analytic_distribution_state in ('invalid', 'invalid_small_amount') or inactive_product == True;black:analytic_distribution_state in ('none','valid') and inactive_product == False"> | 395 | colors="red:analytic_distribution_state in ('invalid', 'invalid_small_amount') or inactive_product == True;black:analytic_distribution_state in ('none','valid') and inactive_product == False"> |
72 | 395 | <field name="line_number" readonly="1" displayon="noteditable"/> | 396 | <field name="line_number" readonly="1" displayon="noteditable"/> |
73 | 397 | ======= | ||
74 | 398 | <tree string="Donation Lines" editable="both"> | ||
75 | 399 | <field name="line_number" readonly="1" displayon="noteditable"/> | ||
76 | 400 | >>>>>>> MERGE-SOURCE | ||
77 | 396 | <field name="is_corrected" invisible="1"/> | 401 | <field name="is_corrected" invisible="1"/> |
78 | 397 | <button name="button_open_analytic_lines" string="Have been corrected" type="object" icon="terp-mail-" attrs="{'invisible': [('is_corrected', '=', False)]}"/> | 402 | <button name="button_open_analytic_lines" string="Have been corrected" type="object" icon="terp-mail-" attrs="{'invisible': [('is_corrected', '=', False)]}"/> |
79 | 398 | <field name="product_id" | 403 | <field name="product_id" |
80 | @@ -533,12 +538,21 @@ | |||
81 | 533 | </group> | 538 | </group> |
82 | 534 | <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" context="{'is_intermission': True, 'from_inv_form': True}"> | 539 | <field colspan="4" name="invoice_line" nolabel="1" widget="one2many_list" context="{'is_intermission': True, 'from_inv_form': True}"> |
83 | 535 | <tree string="Intermission Voucher Lines" | 540 | <tree string="Intermission Voucher Lines" |
84 | 541 | <<<<<<< TREE | ||
85 | 536 | editable="both" | 542 | editable="both" |
86 | 537 | colors="red:analytic_distribution_state in ('invalid', 'invalid_small_amount') or inactive_product == True;black:inactive_product == False and analytic_distribution_state in ('none', 'valid')"> | 543 | colors="red:analytic_distribution_state in ('invalid', 'invalid_small_amount') or inactive_product == True;black:inactive_product == False and analytic_distribution_state in ('none', 'valid')"> |
87 | 538 | <field name="from_supply" invisible="1"/> | 544 | <field name="from_supply" invisible="1"/> |
88 | 539 | <field name="line_synced" invisible="1"/> | 545 | <field name="line_synced" invisible="1"/> |
89 | 540 | <field name="invoice_type" invisible="1"/> | 546 | <field name="invoice_type" invisible="1"/> |
90 | 541 | <field name="line_number" displayon="noteditable"/> | 547 | <field name="line_number" displayon="noteditable"/> |
91 | 548 | ======= | ||
92 | 549 | editable="both" | ||
93 | 550 | colors="red:analytic_distribution_state == 'invalid' or inactive_product == True;black:inactive_product == False and analytic_distribution_state in ('none', 'valid')"> | ||
94 | 551 | <field name="from_supply" invisible="1"/> | ||
95 | 552 | <field name="line_synced" invisible="1"/> | ||
96 | 553 | <field name="invoice_type" invisible="1"/> | ||
97 | 554 | <field name="line_number" displayon="noteditable"/> | ||
98 | 555 | >>>>>>> MERGE-SOURCE | ||
99 | 542 | <field name="is_corrected" invisible="1"/> | 556 | <field name="is_corrected" invisible="1"/> |
100 | 543 | <button name="button_open_analytic_lines" string="Have been corrected" type="object" icon="terp-mail-" attrs="{'invisible': [('is_corrected', '=', False)]}"/> | 557 | <button name="button_open_analytic_lines" string="Have been corrected" type="object" icon="terp-mail-" attrs="{'invisible': [('is_corrected', '=', False)]}"/> |
101 | 544 | <field name="name"/> | 558 | <field name="name"/> |
102 | 545 | 559 | ||
103 | === modified file 'bin/addons/account_override/period.py' | |||
104 | --- bin/addons/account_override/period.py 2018-11-08 09:39:41 +0000 | |||
105 | +++ bin/addons/account_override/period.py 2020-02-04 10:20:45 +0000 | |||
106 | @@ -103,6 +103,22 @@ | |||
107 | 103 | period_id = period_id and get_next_period_id(self, cr, uid, period_id, context=context) | 103 | period_id = period_id and get_next_period_id(self, cr, uid, period_id, context=context) |
108 | 104 | return period_id or False | 104 | return period_id or False |
109 | 105 | 105 | ||
110 | 106 | |||
111 | 107 | def get_previous_period_id(self, cr, uid, period_id, context=None): | ||
112 | 108 | """ | ||
113 | 109 | Returns the id of the previous regular period if it exists (no special period), else returns False. | ||
114 | 110 | For the special periods, its returns the related regular period (Period 13 to 16 N ==> Dec. N). | ||
115 | 111 | """ | ||
116 | 112 | if context is None: | ||
117 | 113 | context = {} | ||
118 | 114 | period = self.browse(cr, uid, period_id, fields_to_fetch=['date_start'], context=context) | ||
119 | 115 | previous_period_ids = self.search(cr, uid, [('date_start', '<=', period.date_start), | ||
120 | 116 | ('special', '=', False), | ||
121 | 117 | ('id', '!=', period_id)], | ||
122 | 118 | order='date_start DESC', limit=1, context=context) | ||
123 | 119 | return previous_period_ids and previous_period_ids[0] or False | ||
124 | 120 | |||
125 | 121 | |||
126 | 106 | def _get_middle_years(self, cr, uid, fy1, fy2, context=None): | 122 | def _get_middle_years(self, cr, uid, fy1, fy2, context=None): |
127 | 107 | """ | 123 | """ |
128 | 108 | Returns the list of the FY ids included between both Fiscal Years in parameter. | 124 | Returns the list of the FY ids included between both Fiscal Years in parameter. |
129 | @@ -189,6 +205,9 @@ | |||
130 | 189 | def get_next_period_id_at_index(self, cr, uid, period_id, index, context=None): | 205 | def get_next_period_id_at_index(self, cr, uid, period_id, index, context=None): |
131 | 190 | return get_next_period_id_at_index(self, cr, uid, period_id, index, context) | 206 | return get_next_period_id_at_index(self, cr, uid, period_id, index, context) |
132 | 191 | 207 | ||
133 | 208 | def get_previous_period_id(self, cr, uid, period_id, context=None): | ||
134 | 209 | return get_previous_period_id(self, cr, uid, period_id, context) | ||
135 | 210 | |||
136 | 192 | def get_period_range(self, cr, uid, period_from_id, period_to_id, context=None): | 211 | def get_period_range(self, cr, uid, period_from_id, period_to_id, context=None): |
137 | 193 | return get_period_range(self, cr, uid, period_from_id, period_to_id, context=context) | 212 | return get_period_range(self, cr, uid, period_from_id, period_to_id, context=context) |
138 | 194 | 213 | ||
139 | 195 | 214 | ||
140 | === modified file 'bin/addons/analytic_distribution/analytic_distribution_wizard_view.xml' | |||
141 | === modified file 'bin/addons/analytic_distribution/wizard/analytic_distribution_wizard.py' | |||
142 | === modified file 'bin/addons/msf_profile/data/patches.xml' | |||
143 | --- bin/addons/msf_profile/data/patches.xml 2020-01-28 10:17:39 +0000 | |||
144 | +++ bin/addons/msf_profile/data/patches.xml 2020-02-04 10:20:45 +0000 | |||
145 | @@ -477,6 +477,7 @@ | |||
146 | 477 | <field name="method">us_6768_trigger_FP_sync</field> | 477 | <field name="method">us_6768_trigger_FP_sync</field> |
147 | 478 | </record> | 478 | </record> |
148 | 479 | 479 | ||
149 | 480 | <<<<<<< TREE | ||
150 | 480 | <!-- UF15.1 --> | 481 | <!-- UF15.1 --> |
151 | 481 | <record id="us_6930_gen_unreconcile" model="patch.scripts"> | 482 | <record id="us_6930_gen_unreconcile" model="patch.scripts"> |
152 | 482 | <field name="method">us_6930_gen_unreconcile</field> | 483 | <field name="method">us_6930_gen_unreconcile</field> |
153 | @@ -496,5 +497,25 @@ | |||
154 | 496 | <field name="method">us_6692_new_od_journals</field> | 497 | <field name="method">us_6692_new_od_journals</field> |
155 | 497 | </record> | 498 | </record> |
156 | 498 | 499 | ||
157 | 500 | ======= | ||
158 | 501 | <!-- UF15.1 --> | ||
159 | 502 | <record id="us_6930_gen_unreconcile" model="patch.scripts"> | ||
160 | 503 | <field name="method">us_6930_gen_unreconcile</field> | ||
161 | 504 | </record> | ||
162 | 505 | |||
163 | 506 | <record id="us_6905_manage_bned_switch" model="patch.scripts"> | ||
164 | 507 | <field name="method">us_6905_manage_bned_switch</field> | ||
165 | 508 | </record> | ||
166 | 509 | |||
167 | 510 | <record id="rec_entries_uf14_1_uf15" model="patch.scripts"> | ||
168 | 511 | <field name="method">rec_entries_uf14_1_uf15</field> | ||
169 | 512 | </record> | ||
170 | 513 | |||
171 | 514 | <!-- UF16.0 --> | ||
172 | 515 | <record id="us_6692_new_od_journals" model="patch.scripts"> | ||
173 | 516 | <field name="method">us_6692_new_od_journals</field> | ||
174 | 517 | </record> | ||
175 | 518 | |||
176 | 519 | >>>>>>> MERGE-SOURCE | ||
177 | 499 | </data> | 520 | </data> |
178 | 500 | </openerp> | 521 | </openerp> |
179 | 501 | 522 | ||
180 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
181 | --- bin/addons/msf_profile/i18n/fr_MF.po 2020-01-28 11:28:56 +0000 | |||
182 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2020-02-04 10:20:45 +0000 | |||
183 | @@ -106598,6 +106598,7 @@ | |||
184 | 106598 | msgid "Funding Pool not found." | 106598 | msgid "Funding Pool not found." |
185 | 106599 | msgstr "Funding Pool non trouvé." | 106599 | msgstr "Funding Pool non trouvé." |
186 | 106600 | 106600 | ||
187 | 106601 | <<<<<<< TREE | ||
188 | 106601 | #. modules: account_override, account, register_accounting, msf_instance, finance | 106602 | #. modules: account_override, account, register_accounting, msf_instance, finance |
189 | 106602 | #: selection:account.analytic.journal,type:0 | 106603 | #: selection:account.analytic.journal,type:0 |
190 | 106603 | #: selection:account.journal,type:0 | 106604 | #: selection:account.journal,type:0 |
191 | @@ -106732,3 +106733,106 @@ | |||
192 | 106732 | #: view:analytic.distribution.wizard:0 | 106733 | #: view:analytic.distribution.wizard:0 |
193 | 106733 | msgid "Make sure that there is only one Analytic Distribution line for the entries having a booking amount inferior or equal to 1." | 106734 | msgid "Make sure that there is only one Analytic Distribution line for the entries having a booking amount inferior or equal to 1." |
194 | 106734 | msgstr "Assurez-vous de n'avoir qu'une seule ligne de Distribution Analytique pour les écritures ayant un montant d'enregistrement inférieur ou égal à 1." | 106735 | msgstr "Assurez-vous de n'avoir qu'une seule ligne de Distribution Analytique pour les écritures ayant un montant d'enregistrement inférieur ou égal à 1." |
195 | 106736 | ======= | ||
196 | 106737 | #. modules: account_override, account, register_accounting, msf_instance, finance | ||
197 | 106738 | #: selection:account.analytic.journal,type:0 | ||
198 | 106739 | #: selection:account.journal,type:0 | ||
199 | 106740 | #: selection:account.analytic.line,journal_type:0 | ||
200 | 106741 | #: selection:account.move,journal_type:0 | ||
201 | 106742 | #: selection:account.move.line,journal_type:0 | ||
202 | 106743 | #: selection:cash.request.liquidity,type:0 | ||
203 | 106744 | #: selection:cash.request.liquidity.bank,type:0 | ||
204 | 106745 | #: selection:cash.request.liquidity.cash,type:0 | ||
205 | 106746 | #: selection:cash.request.liquidity.cheque,type:0 | ||
206 | 106747 | #: selection:account.analytic.journal.fake,type:0 | ||
207 | 106748 | #: selection:account.journal.fake,type:0 | ||
208 | 106749 | #: selection:wizard.register.opening.confirmation,register_type:0 | ||
209 | 106750 | msgid "Correction Auto" | ||
210 | 106751 | msgstr "Correction Auto" | ||
211 | 106752 | |||
212 | 106753 | #. modules: account_override, account, register_accounting, msf_instance, finance | ||
213 | 106754 | #: selection:account.analytic.journal,type:0 | ||
214 | 106755 | #: selection:account.journal,type:0 | ||
215 | 106756 | #: selection:account.analytic.line,journal_type:0 | ||
216 | 106757 | #: selection:account.move,journal_type:0 | ||
217 | 106758 | #: selection:account.move.line,journal_type:0 | ||
218 | 106759 | #: selection:cash.request.liquidity,type:0 | ||
219 | 106760 | #: selection:cash.request.liquidity.bank,type:0 | ||
220 | 106761 | #: selection:cash.request.liquidity.cash,type:0 | ||
221 | 106762 | #: selection:cash.request.liquidity.cheque,type:0 | ||
222 | 106763 | #: selection:account.analytic.journal.fake,type:0 | ||
223 | 106764 | #: selection:account.journal.fake,type:0 | ||
224 | 106765 | #: selection:wizard.register.opening.confirmation,register_type:0 | ||
225 | 106766 | msgid "Correction Manual" | ||
226 | 106767 | msgstr "Correction Manuelle" | ||
227 | 106768 | |||
228 | 106769 | #. modules: account_override, account, register_accounting, msf_instance, finance | ||
229 | 106770 | #: selection:account.analytic.journal,type:0 | ||
230 | 106771 | #: selection:account.journal,type:0 | ||
231 | 106772 | #: selection:account.analytic.line,journal_type:0 | ||
232 | 106773 | #: selection:account.move,journal_type:0 | ||
233 | 106774 | #: selection:account.move.line,journal_type:0 | ||
234 | 106775 | #: selection:cash.request.liquidity,type:0 | ||
235 | 106776 | #: selection:cash.request.liquidity.bank,type:0 | ||
236 | 106777 | #: selection:cash.request.liquidity.cash,type:0 | ||
237 | 106778 | #: selection:cash.request.liquidity.cheque,type:0 | ||
238 | 106779 | #: selection:account.analytic.journal.fake,type:0 | ||
239 | 106780 | #: selection:account.journal.fake,type:0 | ||
240 | 106781 | #: selection:wizard.register.opening.confirmation,register_type:0 | ||
241 | 106782 | msgid "Correction HQ" | ||
242 | 106783 | msgstr "Correction HQ" | ||
243 | 106784 | |||
244 | 106785 | #. module: account_journal | ||
245 | 106786 | #: constraint:account.journal:0 | ||
246 | 106787 | msgid "The analytic journal selected must have the same type and prop. instance as this journal." | ||
247 | 106788 | msgstr "Le journal analytique sélectionné doit avoir le même type et la même instance prop. que ce journal." | ||
248 | 106789 | |||
249 | 106790 | #. module: account_journal | ||
250 | 106791 | #: constraint:account.journal:0 | ||
251 | 106792 | msgid "A journal with this type already exists for this instance." | ||
252 | 106793 | msgstr "Un journal de ce type existe déjà pour cette instance." | ||
253 | 106794 | |||
254 | 106795 | #. module: account | ||
255 | 106796 | #: constraint:account.analytic.journal:0 | ||
256 | 106797 | msgid "An analytic journal with this type already exists for this instance." | ||
257 | 106798 | msgstr "Un journal analytique de ce type existe déjà pour cette instance." | ||
258 | 106799 | |||
259 | 106800 | #. module: account_journal | ||
260 | 106801 | #: constraint:account.journal:0 | ||
261 | 106802 | msgid "The prop. instance of the \"Correction HQ\" journal must be a coordination." | ||
262 | 106803 | msgstr "L'instance prop. du journal de type \"Correction HQ\" doit être une coordination." | ||
263 | 106804 | |||
264 | 106805 | #. module: account | ||
265 | 106806 | #: constraint:account.analytic.journal:0 | ||
266 | 106807 | msgid "The prop. instance of the \"Correction HQ\" analytic journal must be a coordination." | ||
267 | 106808 | msgstr "L'instance prop. du journal analytique de type \"Correction HQ\" doit être une coordination." | ||
268 | 106809 | |||
269 | 106810 | #. module: account_override | ||
270 | 106811 | #: code:addons/account_override/account.py:1198 | ||
271 | 106812 | #, python-format | ||
272 | 106813 | msgid "The journal %s is forbidden in manual entries." | ||
273 | 106814 | msgstr "Le journal %s est interdit dans les écritures manuelles." | ||
274 | 106815 | |||
275 | 106816 | #. modules: account_hq_entries, account_corrections, analytic_distribution | ||
276 | 106817 | #: code:addons/account_hq_entries/wizard/hq_entries_validation.py:269 | ||
277 | 106818 | #: code:addons/account_hq_entries/wizard/hq_entries_validation.py:568 | ||
278 | 106819 | #: code:addons/account_corrections/account_move_line.py:731 | ||
279 | 106820 | #: code:addons/analytic_distribution/analytic_line.py:354 | ||
280 | 106821 | #, python-format | ||
281 | 106822 | msgid "No \"correction HQ\" journal found!" | ||
282 | 106823 | msgstr "Aucun journal de type \"correction HQ\" n'a été trouvé !" | ||
283 | 106824 | |||
284 | 106825 | #. modules: account_hq_entries, analytic_distribution | ||
285 | 106826 | #: code:addons/account_hq_entries/wizard/hq_entries_validation.py:350 | ||
286 | 106827 | #: code:addons/account_hq_entries/wizard/hq_entries_validation.py:531 | ||
287 | 106828 | #: code:addons/analytic_distribution/analytic_line.py:359 | ||
288 | 106829 | #, python-format | ||
289 | 106830 | msgid "No \"correction HQ\" analytic journal found!" | ||
290 | 106831 | msgstr "Aucun journal analytique de type \"correction HQ\" n'a été trouvé !" | ||
291 | 106832 | |||
292 | 106833 | #. module: vertical_integration | ||
293 | 106834 | #: model:ir.actions.act_window,name:vertical_integration.action_hq_export_ocb_old | ||
294 | 106835 | #: model:ir.ui.menu,name:vertical_integration.menu_action_hq_export_ocb_old | ||
295 | 106836 | msgid "Export to HQ system (OCB) Access Interface" | ||
296 | 106837 | msgstr "Interface d'accès de l'Export vers le système HQ (OCB)" | ||
297 | 106838 | >>>>>>> MERGE-SOURCE | ||
298 | 106735 | 106839 | ||
299 | === modified file 'bin/addons/msf_profile/msf_profile.py' | |||
300 | --- bin/addons/msf_profile/msf_profile.py 2020-01-28 10:17:39 +0000 | |||
301 | +++ bin/addons/msf_profile/msf_profile.py 2020-02-04 10:20:45 +0000 | |||
302 | @@ -52,154 +52,304 @@ | |||
303 | 52 | 'model': lambda *a: 'patch.scripts', | 52 | 'model': lambda *a: 'patch.scripts', |
304 | 53 | } | 53 | } |
305 | 54 | 54 | ||
454 | 55 | # UF16.0 | 55 | <<<<<<< TREE |
455 | 56 | def us_6692_new_od_journals(self, cr, uid, *a, **b): | 56 | # UF16.0 |
456 | 57 | """ | 57 | def us_6692_new_od_journals(self, cr, uid, *a, **b): |
457 | 58 | 1. Change the type of the existing correction journals (except OD) to "Correction Manual" so they remain usable | 58 | """ |
458 | 59 | 59 | 1. Change the type of the existing correction journals (except OD) to "Correction Manual" so they remain usable | |
459 | 60 | 2. Create: | 60 | |
460 | 61 | - ODM journals in all existing instances | 61 | 2. Create: |
461 | 62 | - ODHQ journals in existing coordo instances | 62 | - ODM journals in all existing instances |
462 | 63 | 63 | - ODHQ journals in existing coordo instances | |
463 | 64 | Notes: | 64 | |
464 | 65 | - creations are done in Python as the objects created must sync normally | 65 | Notes: |
465 | 66 | - none of these journals already exists in prod. DB. | 66 | - creations are done in Python as the objects created must sync normally |
466 | 67 | """ | 67 | - none of these journals already exists in prod. DB. |
467 | 68 | user_obj = self.pool.get('res.users') | 68 | """ |
468 | 69 | analytic_journal_obj = self.pool.get('account.analytic.journal') | 69 | user_obj = self.pool.get('res.users') |
469 | 70 | journal_obj = self.pool.get('account.journal') | 70 | analytic_journal_obj = self.pool.get('account.analytic.journal') |
470 | 71 | current_instance = user_obj.browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id | 71 | journal_obj = self.pool.get('account.journal') |
471 | 72 | if current_instance: # existing instances only | 72 | current_instance = user_obj.browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id |
472 | 73 | # existing correction journals | 73 | if current_instance: # existing instances only |
473 | 74 | cr.execute(""" | 74 | # existing correction journals |
474 | 75 | UPDATE account_analytic_journal | 75 | cr.execute(""" |
475 | 76 | SET type = 'correction_manual' | 76 | UPDATE account_analytic_journal |
476 | 77 | WHERE type = 'correction' | 77 | SET type = 'correction_manual' |
477 | 78 | AND code != 'OD'; | 78 | WHERE type = 'correction' |
478 | 79 | """) | 79 | AND code != 'OD'; |
479 | 80 | self._logger.warn('%s correction analytic journal(s) updated.' % (cr.rowcount,)) | 80 | """) |
480 | 81 | cr.execute(""" | 81 | self._logger.warn('%s correction analytic journal(s) updated.' % (cr.rowcount,)) |
481 | 82 | UPDATE account_journal | 82 | cr.execute(""" |
482 | 83 | SET type = 'correction_manual' | 83 | UPDATE account_journal |
483 | 84 | WHERE type = 'correction' | 84 | SET type = 'correction_manual' |
484 | 85 | AND code != 'OD'; | 85 | WHERE type = 'correction' |
485 | 86 | """) | 86 | AND code != 'OD'; |
486 | 87 | self._logger.warn('%s correction journal(s) updated.' % (cr.rowcount,)) | 87 | """) |
487 | 88 | # ODM analytic journal | 88 | self._logger.warn('%s correction journal(s) updated.' % (cr.rowcount,)) |
488 | 89 | odm_analytic_vals = { | 89 | # ODM analytic journal |
489 | 90 | # Prop. Instance: by default the current one is used | 90 | odm_analytic_vals = { |
490 | 91 | 'code': 'ODM', | 91 | # Prop. Instance: by default the current one is used |
491 | 92 | 'name': 'Correction manual', | 92 | 'code': 'ODM', |
492 | 93 | 'type': 'correction_manual', | 93 | 'name': 'Correction manual', |
493 | 94 | } | 94 | 'type': 'correction_manual', |
494 | 95 | odm_analytic_journal_id = analytic_journal_obj.create(cr, uid, odm_analytic_vals) | 95 | } |
495 | 96 | # ODM G/L journal | 96 | odm_analytic_journal_id = analytic_journal_obj.create(cr, uid, odm_analytic_vals) |
496 | 97 | odm_vals = { | 97 | # ODM G/L journal |
497 | 98 | # Prop. Instance: by default the current one is used | 98 | odm_vals = { |
498 | 99 | 'code': 'ODM', | 99 | # Prop. Instance: by default the current one is used |
499 | 100 | 'name': 'Correction manual', | 100 | 'code': 'ODM', |
500 | 101 | 'type': 'correction_manual', | 101 | 'name': 'Correction manual', |
501 | 102 | 'analytic_journal_id': odm_analytic_journal_id, | 102 | 'type': 'correction_manual', |
502 | 103 | } | 103 | 'analytic_journal_id': odm_analytic_journal_id, |
503 | 104 | journal_obj.create(cr, uid, odm_vals) | 104 | } |
504 | 105 | if current_instance.level == 'coordo': | 105 | journal_obj.create(cr, uid, odm_vals) |
505 | 106 | # ODHQ analytic journal | 106 | if current_instance.level == 'coordo': |
506 | 107 | odhq_analytic_vals = { | 107 | # ODHQ analytic journal |
507 | 108 | # Prop. Instance: by default the current one is used | 108 | odhq_analytic_vals = { |
508 | 109 | 'code': 'ODHQ', | 109 | # Prop. Instance: by default the current one is used |
509 | 110 | 'name': 'Correction automatic HQ', | 110 | 'code': 'ODHQ', |
510 | 111 | 'type': 'correction_hq', | 111 | 'name': 'Correction automatic HQ', |
511 | 112 | } | 112 | 'type': 'correction_hq', |
512 | 113 | odhq_analytic_journal_id = analytic_journal_obj.create(cr, uid, odhq_analytic_vals) | 113 | } |
513 | 114 | # ODHQ G/L journal | 114 | odhq_analytic_journal_id = analytic_journal_obj.create(cr, uid, odhq_analytic_vals) |
514 | 115 | odhq_vals = { | 115 | # ODHQ G/L journal |
515 | 116 | # Prop. Instance: by default the current one is used | 116 | odhq_vals = { |
516 | 117 | 'code': 'ODHQ', | 117 | # Prop. Instance: by default the current one is used |
517 | 118 | 'name': 'Correction automatic HQ', | 118 | 'code': 'ODHQ', |
518 | 119 | 'type': 'correction_hq', | 119 | 'name': 'Correction automatic HQ', |
519 | 120 | 'analytic_journal_id': odhq_analytic_journal_id, | 120 | 'type': 'correction_hq', |
520 | 121 | } | 121 | 'analytic_journal_id': odhq_analytic_journal_id, |
521 | 122 | journal_obj.create(cr, uid, odhq_vals) | 122 | } |
522 | 123 | return True | 123 | journal_obj.create(cr, uid, odhq_vals) |
523 | 124 | 124 | return True | |
524 | 125 | # UF15.2 | 125 | |
525 | 126 | def rec_entries_uf14_1_uf15(self, cr, uid, *a, **b): | 126 | # UF15.2 |
526 | 127 | current_instance = self.pool.get('res.users').browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id | 127 | def rec_entries_uf14_1_uf15(self, cr, uid, *a, **b): |
527 | 128 | if current_instance: | 128 | current_instance = self.pool.get('res.users').browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id |
528 | 129 | trigger_obj = self.pool.get('sync.trigger.something.target') | 129 | if current_instance: |
529 | 130 | cr.execute(''' | 130 | trigger_obj = self.pool.get('sync.trigger.something.target') |
530 | 131 | select sdref, values, source from sync_client_update_received where model='account.move.reconcile' and execution_date > ( select applied from sync_client_version where name='UF15.0') and fields not like '%action_date%' | 131 | cr.execute(''' |
531 | 132 | ''') | 132 | select sdref, values, source from sync_client_update_received where model='account.move.reconcile' and execution_date > ( select applied from sync_client_version where name='UF15.0') and fields not like '%action_date%' |
532 | 133 | 133 | ''') | |
533 | 134 | for update in cr.fetchall(): | 134 | |
534 | 135 | rec_number = False | 135 | for update in cr.fetchall(): |
535 | 136 | try: | 136 | rec_number = False |
536 | 137 | rec_number = eval(update[1]) | 137 | try: |
537 | 138 | except: | 138 | rec_number = eval(update[1]) |
538 | 139 | self._logger.warn('Unable to parse values, sdref: %s' % update[0]) | 139 | except: |
539 | 140 | 140 | self._logger.warn('Unable to parse values, sdref: %s' % update[0]) | |
540 | 141 | if rec_number: | 141 | |
541 | 142 | trigger_obj.create(cr, uid, {'name': 'trigger_rec', 'destination': update[2] , 'args': rec_number[0], 'local': True}) | 142 | if rec_number: |
542 | 143 | 143 | trigger_obj.create(cr, uid, {'name': 'trigger_rec', 'destination': update[2] , 'args': rec_number[0], 'local': True}) | |
543 | 144 | return True | 144 | |
544 | 145 | 145 | return True | |
545 | 146 | # UF15.1 | 146 | |
546 | 147 | def us_6930_gen_unreconcile(self, cr, uid, *a, **b): | 147 | # UF15.1 |
547 | 148 | # generate updates to delete reconcile done after UF15.0 | 148 | def us_6930_gen_unreconcile(self, cr, uid, *a, **b): |
548 | 149 | current_instance = self.pool.get('res.users').browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id | 149 | # generate updates to delete reconcile done after UF15.0 |
549 | 150 | if current_instance: | 150 | current_instance = self.pool.get('res.users').browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id |
550 | 151 | unrec_obj = self.pool.get('account.move.unreconcile') | 151 | if current_instance: |
551 | 152 | cr.execute(''' | 152 | unrec_obj = self.pool.get('account.move.unreconcile') |
552 | 153 | select d.name from ir_model_data d | 153 | cr.execute(''' |
553 | 154 | left join | 154 | select d.name from ir_model_data d |
554 | 155 | account_move_reconcile rec on d.model='account.move.reconcile' and d.res_id = rec.id | 155 | left join |
555 | 156 | where d.model='account.move.reconcile' and rec.id is null and touched like '%action_date%' | 156 | account_move_reconcile rec on d.model='account.move.reconcile' and d.res_id = rec.id |
556 | 157 | ''') | 157 | where d.model='account.move.reconcile' and rec.id is null and touched like '%action_date%' |
557 | 158 | for sdref_rec in cr.fetchall(): | 158 | ''') |
558 | 159 | unrec_obj.create(cr, uid, {'reconcile_sdref': sdref_rec[0]}) | 159 | for sdref_rec in cr.fetchall(): |
559 | 160 | return True | 160 | unrec_obj.create(cr, uid, {'reconcile_sdref': sdref_rec[0]}) |
560 | 161 | 161 | return True | |
561 | 162 | def us_6905_manage_bned_switch(self, cr, uid, *a, **b): | 162 | |
562 | 163 | fake_ed = '2999-12-31' | 163 | def us_6905_manage_bned_switch(self, cr, uid, *a, **b): |
563 | 164 | fake_bn = 'TO-BE-REPLACED' | 164 | fake_ed = '2999-12-31' |
564 | 165 | 165 | fake_bn = 'TO-BE-REPLACED' | |
565 | 166 | lot_obj = self.pool.get('stock.production.lot') | 166 | |
566 | 167 | 167 | lot_obj = self.pool.get('stock.production.lot') | |
567 | 168 | # old move with BN or ED if product is no_bn no_ed | 168 | |
568 | 169 | # set no on bn or en moves | 169 | # old move with BN or ED if product is no_bn no_ed |
569 | 170 | cr.execute(''' | 170 | # set no on bn or en moves |
570 | 171 | update stock_move set prodlot_id=NULL, expired_date=NULL, hidden_batch_management_mandatory='f', hidden_perishable_mandatory='f', old_lot_info=(select name||'#'||life_date from stock_production_lot where id=stock_move.prodlot_id)||E'\n'||COALESCE(old_lot_info, '') where id in | 171 | cr.execute(''' |
571 | 172 | (select m.id from stock_move m, product_product p where p.id = m.product_id and p.perishable='f' and p.batch_management='f' and m.prodlot_id is not null and m.state in ('done', 'cancel')) | 172 | update stock_move set prodlot_id=NULL, expired_date=NULL, hidden_batch_management_mandatory='f', hidden_perishable_mandatory='f', old_lot_info=(select name||'#'||life_date from stock_production_lot where id=stock_move.prodlot_id)||E'\n'||COALESCE(old_lot_info, '') where id in |
572 | 173 | ''') | 173 | (select m.id from stock_move m, product_product p where p.id = m.product_id and p.perishable='f' and p.batch_management='f' and m.prodlot_id is not null and m.state in ('done', 'cancel')) |
573 | 174 | self._logger.warn('%d done/cancel moves set from ED or BN to no' % (cr.rowcount, )) | 174 | ''') |
574 | 175 | 175 | self._logger.warn('%d done/cancel moves set from ED or BN to no' % (cr.rowcount, )) | |
575 | 176 | 176 | ||
576 | 177 | # set bn on no moves | 177 | |
577 | 178 | cr.execute('''select distinct(product_id) from stock_move m, product_product p where p.id = m.product_id and p.perishable='t' and p.batch_management='t' and m.prodlot_id is null and m.state = 'done' and m.product_qty!=0 and m.location_dest_id != m.location_id''') | 178 | # set bn on no moves |
578 | 179 | self._logger.warn('%d done/cancel moves set from NO to BN' % (cr.rowcount, )) | 179 | cr.execute('''select distinct(product_id) from stock_move m, product_product p where p.id = m.product_id and p.perishable='t' and p.batch_management='t' and m.prodlot_id is null and m.state = 'done' and m.product_qty!=0 and m.location_dest_id != m.location_id''') |
579 | 180 | for prod_id in cr.fetchall(): | 180 | self._logger.warn('%d done/cancel moves set from NO to BN' % (cr.rowcount, )) |
580 | 181 | batch_id = lot_obj._get_or_create_lot(cr, uid, name=fake_bn, expiry_date=fake_ed, product_id=prod_id) | 181 | for prod_id in cr.fetchall(): |
581 | 182 | cr.execute("update stock_move set hidden_batch_management_mandatory='t', hidden_perishable_mandatory='f', prodlot_id=%s, expired_date=%s, old_lot_info='US-6905 BN set'||E'\n'||COALESCE(old_lot_info, '') where product_id=%s and prodlot_id is null and state = 'done' and product_qty!=0 and location_dest_id != location_id", (batch_id, fake_ed, prod_id)) | 182 | batch_id = lot_obj._get_or_create_lot(cr, uid, name=fake_bn, expiry_date=fake_ed, product_id=prod_id) |
582 | 183 | 183 | cr.execute("update stock_move set hidden_batch_management_mandatory='t', hidden_perishable_mandatory='f', prodlot_id=%s, expired_date=%s, old_lot_info='US-6905 BN set'||E'\n'||COALESCE(old_lot_info, '') where product_id=%s and prodlot_id is null and state = 'done' and product_qty!=0 and location_dest_id != location_id", (batch_id, fake_ed, prod_id)) | |
583 | 184 | # set ed on no moves | 184 | |
584 | 185 | cr.execute('''select distinct(product_id) from stock_move m, product_product p where p.id = m.product_id and p.perishable='t' and p.batch_management='f' and m.prodlot_id is null and m.state = 'done' and m.product_qty!=0 and m.location_dest_id != m.location_id''') | 185 | # set ed on no moves |
585 | 186 | self._logger.warn('%d done/cancel moves set from NO to ED' % (cr.rowcount, )) | 186 | cr.execute('''select distinct(product_id) from stock_move m, product_product p where p.id = m.product_id and p.perishable='t' and p.batch_management='f' and m.prodlot_id is null and m.state = 'done' and m.product_qty!=0 and m.location_dest_id != m.location_id''') |
586 | 187 | for prod_id in cr.fetchall(): | 187 | self._logger.warn('%d done/cancel moves set from NO to ED' % (cr.rowcount, )) |
587 | 188 | batch_id = lot_obj._get_or_create_lot(cr, uid, name=False, expiry_date=fake_ed, product_id=prod_id) | 188 | for prod_id in cr.fetchall(): |
588 | 189 | cr.execute("update stock_move set hidden_batch_management_mandatory='f', hidden_perishable_mandatory='t', prodlot_id=%s, expired_date=%s, old_lot_info='US-6905 EN set'||E'\n'||COALESCE(old_lot_info, '') where product_id=%s and prodlot_id is null and state = 'done' and product_qty!=0 and location_dest_id != location_id", (batch_id, fake_ed, prod_id)) | 189 | batch_id = lot_obj._get_or_create_lot(cr, uid, name=False, expiry_date=fake_ed, product_id=prod_id) |
589 | 190 | 190 | cr.execute("update stock_move set hidden_batch_management_mandatory='f', hidden_perishable_mandatory='t', prodlot_id=%s, expired_date=%s, old_lot_info='US-6905 EN set'||E'\n'||COALESCE(old_lot_info, '') where product_id=%s and prodlot_id is null and state = 'done' and product_qty!=0 and location_dest_id != location_id", (batch_id, fake_ed, prod_id)) | |
590 | 191 | # set ed on bn moves | 191 | |
591 | 192 | cr.execute("update stock_production_lot set name='MSFBN/'||name, type='internal' where id in (select lot.id from stock_production_lot lot, product_product p where p.id = lot.product_id and type='standard' and p.perishable='t' and p.batch_management='f') returning name") | 192 | # set ed on bn moves |
592 | 193 | for lot in cr.fetchall(): | 193 | cr.execute("update stock_production_lot set name='MSFBN/'||name, type='internal' where id in (select lot.id from stock_production_lot lot, product_product p where p.id = lot.product_id and type='standard' and p.perishable='t' and p.batch_management='f') returning name") |
593 | 194 | self._logger.warn('BN %s from standard to internal' % (lot[0], )) | 194 | for lot in cr.fetchall(): |
594 | 195 | 195 | self._logger.warn('BN %s from standard to internal' % (lot[0], )) | |
595 | 196 | # set bn on ed moves | 196 | |
596 | 197 | cr.execute("update stock_production_lot set type='standard', name='S'||name where id in (select lot.id from stock_production_lot lot, product_product p where p.id = lot.product_id and type='internal' and p.perishable='t' and p.batch_management='t') returning name") | 197 | # set bn on ed moves |
597 | 198 | for lot in cr.fetchall(): | 198 | cr.execute("update stock_production_lot set type='standard', name='S'||name where id in (select lot.id from stock_production_lot lot, product_product p where p.id = lot.product_id and type='internal' and p.perishable='t' and p.batch_management='t') returning name") |
598 | 199 | self._logger.warn('BN %s from internal to standard' % (lot[0], )) | 199 | for lot in cr.fetchall(): |
599 | 200 | 200 | self._logger.warn('BN %s from internal to standard' % (lot[0], )) | |
600 | 201 | return True | 201 | |
601 | 202 | 202 | return True | |
602 | 203 | |||
603 | 204 | ======= | ||
604 | 205 | # UF16.0 | ||
605 | 206 | def us_6692_new_od_journals(self, cr, uid, *a, **b): | ||
606 | 207 | """ | ||
607 | 208 | 1. Change the type of the existing correction journals (except OD) to "Correction Manual" so they remain usable | ||
608 | 209 | |||
609 | 210 | 2. Create: | ||
610 | 211 | - ODM journals in all existing instances | ||
611 | 212 | - ODHQ journals in existing coordo instances | ||
612 | 213 | |||
613 | 214 | Notes: | ||
614 | 215 | - creations are done in Python as the objects created must sync normally | ||
615 | 216 | - none of these journals already exists in prod. DB. | ||
616 | 217 | """ | ||
617 | 218 | user_obj = self.pool.get('res.users') | ||
618 | 219 | analytic_journal_obj = self.pool.get('account.analytic.journal') | ||
619 | 220 | journal_obj = self.pool.get('account.journal') | ||
620 | 221 | current_instance = user_obj.browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id | ||
621 | 222 | if current_instance: # existing instances only | ||
622 | 223 | # existing correction journals | ||
623 | 224 | cr.execute(""" | ||
624 | 225 | UPDATE account_analytic_journal | ||
625 | 226 | SET type = 'correction_manual' | ||
626 | 227 | WHERE type = 'correction' | ||
627 | 228 | AND code != 'OD'; | ||
628 | 229 | """) | ||
629 | 230 | self._logger.warn('%s correction analytic journal(s) updated.' % (cr.rowcount,)) | ||
630 | 231 | cr.execute(""" | ||
631 | 232 | UPDATE account_journal | ||
632 | 233 | SET type = 'correction_manual' | ||
633 | 234 | WHERE type = 'correction' | ||
634 | 235 | AND code != 'OD'; | ||
635 | 236 | """) | ||
636 | 237 | self._logger.warn('%s correction journal(s) updated.' % (cr.rowcount,)) | ||
637 | 238 | # ODM analytic journal | ||
638 | 239 | odm_analytic_vals = { | ||
639 | 240 | # Prop. Instance: by default the current one is used | ||
640 | 241 | 'code': 'ODM', | ||
641 | 242 | 'name': 'Correction manual', | ||
642 | 243 | 'type': 'correction_manual', | ||
643 | 244 | } | ||
644 | 245 | odm_analytic_journal_id = analytic_journal_obj.create(cr, uid, odm_analytic_vals) | ||
645 | 246 | # ODM G/L journal | ||
646 | 247 | odm_vals = { | ||
647 | 248 | # Prop. Instance: by default the current one is used | ||
648 | 249 | 'code': 'ODM', | ||
649 | 250 | 'name': 'Correction manual', | ||
650 | 251 | 'type': 'correction_manual', | ||
651 | 252 | 'analytic_journal_id': odm_analytic_journal_id, | ||
652 | 253 | } | ||
653 | 254 | journal_obj.create(cr, uid, odm_vals) | ||
654 | 255 | if current_instance.level == 'coordo': | ||
655 | 256 | # ODHQ analytic journal | ||
656 | 257 | odhq_analytic_vals = { | ||
657 | 258 | # Prop. Instance: by default the current one is used | ||
658 | 259 | 'code': 'ODHQ', | ||
659 | 260 | 'name': 'Correction automatic HQ', | ||
660 | 261 | 'type': 'correction_hq', | ||
661 | 262 | } | ||
662 | 263 | odhq_analytic_journal_id = analytic_journal_obj.create(cr, uid, odhq_analytic_vals) | ||
663 | 264 | # ODHQ G/L journal | ||
664 | 265 | odhq_vals = { | ||
665 | 266 | # Prop. Instance: by default the current one is used | ||
666 | 267 | 'code': 'ODHQ', | ||
667 | 268 | 'name': 'Correction automatic HQ', | ||
668 | 269 | 'type': 'correction_hq', | ||
669 | 270 | 'analytic_journal_id': odhq_analytic_journal_id, | ||
670 | 271 | } | ||
671 | 272 | journal_obj.create(cr, uid, odhq_vals) | ||
672 | 273 | return True | ||
673 | 274 | |||
674 | 275 | # UF15.2 | ||
675 | 276 | def rec_entries_uf14_1_uf15(self, cr, uid, *a, **b): | ||
676 | 277 | current_instance = self.pool.get('res.users').browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id | ||
677 | 278 | if current_instance: | ||
678 | 279 | trigger_obj = self.pool.get('sync.trigger.something.target') | ||
679 | 280 | cr.execute(''' | ||
680 | 281 | select sdref, values, source from sync_client_update_received where model='account.move.reconcile' and execution_date > ( select applied from sync_client_version where name='UF15.0') and fields not like '%action_date%' | ||
681 | 282 | ''') | ||
682 | 283 | |||
683 | 284 | for update in cr.fetchall(): | ||
684 | 285 | rec_number = False | ||
685 | 286 | try: | ||
686 | 287 | rec_number = eval(update[1]) | ||
687 | 288 | except: | ||
688 | 289 | self._logger.warn('Unable to parse values, sdref: %s' % update[0]) | ||
689 | 290 | |||
690 | 291 | if rec_number: | ||
691 | 292 | trigger_obj.create(cr, uid, {'name': 'trigger_rec', 'destination': update[2] , 'args': rec_number[0], 'local': True}) | ||
692 | 293 | |||
693 | 294 | return True | ||
694 | 295 | |||
695 | 296 | # UF15.1 | ||
696 | 297 | def us_6930_gen_unreconcile(self, cr, uid, *a, **b): | ||
697 | 298 | # generate updates to delete reconcile done after UF15.0 | ||
698 | 299 | current_instance = self.pool.get('res.users').browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id | ||
699 | 300 | if current_instance: | ||
700 | 301 | unrec_obj = self.pool.get('account.move.unreconcile') | ||
701 | 302 | cr.execute(''' | ||
702 | 303 | select d.name from ir_model_data d | ||
703 | 304 | left join | ||
704 | 305 | account_move_reconcile rec on d.model='account.move.reconcile' and d.res_id = rec.id | ||
705 | 306 | where d.model='account.move.reconcile' and rec.id is null and touched like '%action_date%' | ||
706 | 307 | ''') | ||
707 | 308 | for sdref_rec in cr.fetchall(): | ||
708 | 309 | unrec_obj.create(cr, uid, {'reconcile_sdref': sdref_rec[0]}) | ||
709 | 310 | return True | ||
710 | 311 | |||
711 | 312 | def us_6905_manage_bned_switch(self, cr, uid, *a, **b): | ||
712 | 313 | fake_ed = '2999-12-31' | ||
713 | 314 | fake_bn = 'TO-BE-REPLACED' | ||
714 | 315 | |||
715 | 316 | lot_obj = self.pool.get('stock.production.lot') | ||
716 | 317 | |||
717 | 318 | # old move with BN or ED if product is no_bn no_ed | ||
718 | 319 | # set no on bn or en moves | ||
719 | 320 | cr.execute(''' | ||
720 | 321 | update stock_move set prodlot_id=NULL, expired_date=NULL, hidden_batch_management_mandatory='f', hidden_perishable_mandatory='f', old_lot_info=(select name||'#'||life_date from stock_production_lot where id=stock_move.prodlot_id)||E'\n'||COALESCE(old_lot_info, '') where id in | ||
721 | 322 | (select m.id from stock_move m, product_product p where p.id = m.product_id and p.perishable='f' and p.batch_management='f' and m.prodlot_id is not null and m.state in ('done', 'cancel')) | ||
722 | 323 | ''') | ||
723 | 324 | self._logger.warn('%d done/cancel moves set from ED or BN to no' % (cr.rowcount, )) | ||
724 | 325 | |||
725 | 326 | |||
726 | 327 | # set bn on no moves | ||
727 | 328 | cr.execute('''select distinct(product_id) from stock_move m, product_product p where p.id = m.product_id and p.perishable='t' and p.batch_management='t' and m.prodlot_id is null and m.state = 'done' and m.product_qty!=0 and m.location_dest_id != m.location_id''') | ||
728 | 329 | self._logger.warn('%d done/cancel moves set from NO to BN' % (cr.rowcount, )) | ||
729 | 330 | for prod_id in cr.fetchall(): | ||
730 | 331 | batch_id = lot_obj._get_or_create_lot(cr, uid, name=fake_bn, expiry_date=fake_ed, product_id=prod_id) | ||
731 | 332 | cr.execute("update stock_move set hidden_batch_management_mandatory='t', hidden_perishable_mandatory='f', prodlot_id=%s, expired_date=%s, old_lot_info='US-6905 BN set'||E'\n'||COALESCE(old_lot_info, '') where product_id=%s and prodlot_id is null and state = 'done' and product_qty!=0 and location_dest_id != location_id", (batch_id, fake_ed, prod_id)) | ||
732 | 333 | |||
733 | 334 | # set ed on no moves | ||
734 | 335 | cr.execute('''select distinct(product_id) from stock_move m, product_product p where p.id = m.product_id and p.perishable='t' and p.batch_management='f' and m.prodlot_id is null and m.state = 'done' and m.product_qty!=0 and m.location_dest_id != m.location_id''') | ||
735 | 336 | self._logger.warn('%d done/cancel moves set from NO to ED' % (cr.rowcount, )) | ||
736 | 337 | for prod_id in cr.fetchall(): | ||
737 | 338 | batch_id = lot_obj._get_or_create_lot(cr, uid, name=False, expiry_date=fake_ed, product_id=prod_id) | ||
738 | 339 | cr.execute("update stock_move set hidden_batch_management_mandatory='f', hidden_perishable_mandatory='t', prodlot_id=%s, expired_date=%s, old_lot_info='US-6905 EN set'||E'\n'||COALESCE(old_lot_info, '') where product_id=%s and prodlot_id is null and state = 'done' and product_qty!=0 and location_dest_id != location_id", (batch_id, fake_ed, prod_id)) | ||
739 | 340 | |||
740 | 341 | # set ed on bn moves | ||
741 | 342 | cr.execute("update stock_production_lot set name='MSFBN/'||name, type='internal' where id in (select lot.id from stock_production_lot lot, product_product p where p.id = lot.product_id and type='standard' and p.perishable='t' and p.batch_management='f') returning name") | ||
742 | 343 | for lot in cr.fetchall(): | ||
743 | 344 | self._logger.warn('BN %s from standard to internal' % (lot[0], )) | ||
744 | 345 | |||
745 | 346 | # set bn on ed moves | ||
746 | 347 | cr.execute("update stock_production_lot set type='standard', name='S'||name where id in (select lot.id from stock_production_lot lot, product_product p where p.id = lot.product_id and type='internal' and p.perishable='t' and p.batch_management='t') returning name") | ||
747 | 348 | for lot in cr.fetchall(): | ||
748 | 349 | self._logger.warn('BN %s from internal to standard' % (lot[0], )) | ||
749 | 350 | return True | ||
750 | 351 | |||
751 | 352 | >>>>>>> MERGE-SOURCE | ||
752 | 203 | # UF15.0 | 353 | # UF15.0 |
753 | 204 | def us_6768_trigger_FP_sync(self, cr, uid, *a, **b): | 354 | def us_6768_trigger_FP_sync(self, cr, uid, *a, **b): |
754 | 205 | """ | 355 | """ |
755 | 206 | 356 | ||
756 | === modified file 'bin/addons/stock/physical_inventory.py' | |||
757 | === modified file 'bin/addons/stock/wizard/physical_inventory_generate_counting_sheet.py' | |||
758 | === modified file 'bin/addons/vertical_integration/report/hq_report_ocb.py' | |||
759 | --- bin/addons/vertical_integration/report/hq_report_ocb.py 2019-12-13 15:12:51 +0000 | |||
760 | +++ bin/addons/vertical_integration/report/hq_report_ocb.py 2020-02-04 10:20:45 +0000 | |||
761 | @@ -397,6 +397,8 @@ | |||
762 | 397 | context = {} | 397 | context = {} |
763 | 398 | # Prepare some values | 398 | # Prepare some values |
764 | 399 | pool = pooler.get_pool(cr.dbname) | 399 | pool = pooler.get_pool(cr.dbname) |
765 | 400 | mi_obj = pool.get('msf.instance') | ||
766 | 401 | period_obj = pool.get('account.period') | ||
767 | 400 | excluded_journal_types = ['hq', 'migration'] # journal types that should not be used to take lines | 402 | excluded_journal_types = ['hq', 'migration'] # journal types that should not be used to take lines |
768 | 401 | # Fetch data from wizard | 403 | # Fetch data from wizard |
769 | 402 | if not data.get('form', False): | 404 | if not data.get('form', False): |
770 | @@ -408,10 +410,12 @@ | |||
771 | 408 | instance_id = form.get('instance_id', False) | 410 | instance_id = form.get('instance_id', False) |
772 | 409 | if not fy_id or not period_id or not instance_ids or not instance_id: | 411 | if not fy_id or not period_id or not instance_ids or not instance_id: |
773 | 410 | raise osv.except_osv(_('Warning'), _('Some info are missing. Either fiscalyear or period or instance.')) | 412 | raise osv.except_osv(_('Warning'), _('Some info are missing. Either fiscalyear or period or instance.')) |
774 | 413 | instance_lvl = mi_obj.browse(cr, uid, instance_id, fields_to_fetch=['level'], context=context).level | ||
775 | 411 | fy = pool.get('account.fiscalyear').browse(cr, uid, fy_id) | 414 | fy = pool.get('account.fiscalyear').browse(cr, uid, fy_id) |
776 | 412 | last_fy_year = strptime(fy.date_start, '%Y-%m-%d').tm_year - 1 # Take previous year regarding given fiscalyear | 415 | last_fy_year = strptime(fy.date_start, '%Y-%m-%d').tm_year - 1 # Take previous year regarding given fiscalyear |
777 | 413 | first_day_of_last_fy = '%s-01-01' % (last_fy_year) | 416 | first_day_of_last_fy = '%s-01-01' % (last_fy_year) |
779 | 414 | period = pool.get('account.period').browse(cr, uid, period_id) | 417 | period = period_obj.browse(cr, uid, period_id, fields_to_fetch=['date_stop', 'date_start', 'number']) |
780 | 418 | previous_period_id = period_obj.get_previous_period_id(cr, uid, period_id, context=context) | ||
781 | 415 | last_day_of_period = period.date_stop | 419 | last_day_of_period = period.date_stop |
782 | 416 | first_day_of_period = period.date_start | 420 | first_day_of_period = period.date_start |
783 | 417 | selection = form.get('selection', False) | 421 | selection = form.get('selection', False) |
784 | @@ -436,7 +440,6 @@ | |||
785 | 436 | plresult_ji_in_ids = [] | 440 | plresult_ji_in_ids = [] |
786 | 437 | if period.number == 12: | 441 | if period.number == 12: |
787 | 438 | ayec_obj = pool.get("account.year.end.closing") | 442 | ayec_obj = pool.get("account.year.end.closing") |
788 | 439 | mi_obj = pool.get('msf.instance') | ||
789 | 440 | m_obj = pool.get('account.move') | 443 | m_obj = pool.get('account.move') |
790 | 441 | ml_obj = pool.get('account.move.line') | 444 | ml_obj = pool.get('account.move.line') |
791 | 442 | 445 | ||
792 | @@ -466,13 +469,33 @@ | |||
793 | 466 | # SQLREQUESTS DICTIONNARY | 469 | # SQLREQUESTS DICTIONNARY |
794 | 467 | # - key: name of the SQL request | 470 | # - key: name of the SQL request |
795 | 468 | # - value: the SQL request to use | 471 | # - value: the SQL request to use |
799 | 469 | sqlrequests = { | 472 | partner_sql = """ |
800 | 470 | 'partner': """ | 473 | SELECT id, name, ref, partner_type, CASE WHEN active='t' THEN 'True' WHEN active='f' THEN 'False' END AS active%s |
798 | 471 | SELECT id, name, ref, partner_type, CASE WHEN active='t' THEN 'True' WHEN active='f' THEN 'False' END AS active | ||
801 | 472 | FROM res_partner | 474 | FROM res_partner |
802 | 473 | WHERE partner_type != 'internal' | 475 | WHERE partner_type != 'internal' |
803 | 474 | and name != 'To be defined'; | 476 | and name != 'To be defined'; |
805 | 475 | """, | 477 | """ % (not context.get("old_vi") and ", comment" or "") |
806 | 478 | if not previous_period_id or instance_lvl == 'section': | ||
807 | 479 | # empty report in case there is no previous period or an HQ instance is selected | ||
808 | 480 | balance_previous_month_sql = "SELECT '' AS no_line;" | ||
809 | 481 | else: | ||
810 | 482 | # note: even balances with zero amount are displayed in the report | ||
811 | 483 | balance_previous_month_sql = """ | ||
812 | 484 | SELECT acc.code, curr.name, SUM(COALESCE(aml.debit_currency,0) - COALESCE(aml.credit_currency,0)) | ||
813 | 485 | FROM account_move_line aml | ||
814 | 486 | INNER JOIN account_journal j ON aml.journal_id = j.id | ||
815 | 487 | INNER JOIN account_account acc ON aml.account_id = acc.id | ||
816 | 488 | INNER JOIN res_currency curr ON aml.currency_id = curr.id | ||
817 | 489 | INNER JOIN account_move m ON aml.move_id = m.id | ||
818 | 490 | WHERE aml.period_id = %s | ||
819 | 491 | AND j.type NOT IN %s | ||
820 | 492 | AND aml.instance_id IN %s | ||
821 | 493 | AND m.state = 'posted' | ||
822 | 494 | GROUP BY acc.code, curr.name | ||
823 | 495 | ORDER BY acc.code, curr.name; | ||
824 | 496 | """ | ||
825 | 497 | sqlrequests = { | ||
826 | 498 | 'partner': partner_sql, | ||
827 | 476 | 'employee': """ | 499 | 'employee': """ |
828 | 477 | SELECT r.name, e.identification_id, r.active, e.employee_type | 500 | SELECT r.name, e.identification_id, r.active, e.employee_type |
829 | 478 | FROM hr_employee AS e, resource_resource AS r | 501 | FROM hr_employee AS e, resource_resource AS r |
830 | @@ -634,6 +657,7 @@ | |||
831 | 634 | AND m.state = 'posted' | 657 | AND m.state = 'posted' |
832 | 635 | ORDER BY aml.id; | 658 | ORDER BY aml.id; |
833 | 636 | """, | 659 | """, |
834 | 660 | 'balance_previous_month': balance_previous_month_sql, | ||
835 | 637 | } | 661 | } |
836 | 638 | if plresult_ji_in_ids: | 662 | if plresult_ji_in_ids: |
837 | 639 | # NOTE: for these entries: booking and fonctional ccy are same | 663 | # NOTE: for these entries: booking and fonctional ccy are same |
838 | @@ -676,9 +700,12 @@ | |||
839 | 676 | # + If you cannot do a SQL request to create the content of the file, do a simple request (with key) and add a postprocess function that returns the result you want | 700 | # + If you cannot do a SQL request to create the content of the file, do a simple request (with key) and add a postprocess function that returns the result you want |
840 | 677 | instance_name = 'OCB' # since US-949 | 701 | instance_name = 'OCB' # since US-949 |
841 | 678 | reg_types = ('cash', 'bank', 'cheque') | 702 | reg_types = ('cash', 'bank', 'cheque') |
842 | 703 | partner_header = ['XML_ID', 'Name', 'Reference', 'Partner type', 'Active/inactive'] | ||
843 | 704 | if not context.get('old_vi'): | ||
844 | 705 | partner_header.append('Notes') | ||
845 | 679 | processrequests = [ | 706 | processrequests = [ |
846 | 680 | { | 707 | { |
848 | 681 | 'headers': ['XML_ID', 'Name', 'Reference', 'Partner type', 'Active/inactive'], | 708 | 'headers': partner_header, |
849 | 682 | 'filename': instance_name + '_' + year + month + '_Partners.csv', | 709 | 'filename': instance_name + '_' + year + month + '_Partners.csv', |
850 | 683 | 'key': 'partner', | 710 | 'key': 'partner', |
851 | 684 | 'function': 'postprocess_partners', | 711 | 'function': 'postprocess_partners', |
852 | @@ -699,37 +726,6 @@ | |||
853 | 699 | 'fnct_params': ([('account.journal', 'type', 3)], context), | 726 | 'fnct_params': ([('account.journal', 'type', 3)], context), |
854 | 700 | }, | 727 | }, |
855 | 701 | { | 728 | { |
856 | 702 | 'headers': ['Name', 'Code', 'Type', 'Status'], | ||
857 | 703 | 'filename': instance_name + '_' + year + month + '_Cost Centres.csv', | ||
858 | 704 | 'key': 'costcenter', | ||
859 | 705 | 'query_params': (last_day_of_period, last_day_of_period, tuple(instance_ids),last_day_of_period, last_day_of_period, tuple(instance_ids)), | ||
860 | 706 | 'function': 'postprocess_selection_columns', | ||
861 | 707 | 'fnct_params': [('account.analytic.account', 'type', 2)], | ||
862 | 708 | }, | ||
863 | 709 | { | ||
864 | 710 | 'headers': ['CCY name', 'CCY code', 'Rate', 'Month'], | ||
865 | 711 | 'filename': instance_name + '_' + year + month + '_FX rates.csv', | ||
866 | 712 | 'key': 'fxrate', | ||
867 | 713 | 'query_params': (first_day_of_last_fy, last_day_of_period), | ||
868 | 714 | }, | ||
869 | 715 | { | ||
870 | 716 | 'headers': ['Instance', 'Code', 'Name', 'Period', 'Starting balance', 'Calculated balance', 'Closing balance', 'Currency'], | ||
871 | 717 | 'filename': instance_name + '_' + year + month + '_Liquidity Balances.csv', | ||
872 | 718 | 'key': 'liquidity', | ||
873 | 719 | 'query_params': (tuple([period_yyyymm]), reg_types, first_day_of_period, reg_types, first_day_of_period, | ||
874 | 720 | last_day_of_period, reg_types, last_day_of_period, tuple(instance_ids)), | ||
875 | 721 | 'function': 'postprocess_liquidity_balances', | ||
876 | 722 | 'fnct_params': context, | ||
877 | 723 | }, | ||
878 | 724 | { | ||
879 | 725 | 'headers': ['Name', 'Code', 'Donor code', 'Grant amount', 'Reporting CCY', 'State'], | ||
880 | 726 | 'filename': instance_name + '_' + year + month + '_Financing contracts.csv', | ||
881 | 727 | 'key': 'contract', | ||
882 | 728 | 'query_params': (tuple(instance_ids),), | ||
883 | 729 | 'function': 'postprocess_selection_columns', | ||
884 | 730 | 'fnct_params': [('financing.contract.contract', 'state', 5)], | ||
885 | 731 | }, | ||
886 | 732 | { | ||
887 | 733 | 'headers': ['DB ID', 'Instance', 'Journal', 'Entry sequence', 'Description', 'Reference', 'Document date', 'Posting date', 'G/L Account', 'Third party', 'Destination', 'Cost centre', 'Funding pool', 'Booking debit', 'Booking credit', 'Booking currency', 'Functional debit', 'Functional credit', 'Functional CCY', 'Emplid', 'Partner DB ID'], | 729 | 'headers': ['DB ID', 'Instance', 'Journal', 'Entry sequence', 'Description', 'Reference', 'Document date', 'Posting date', 'G/L Account', 'Third party', 'Destination', 'Cost centre', 'Funding pool', 'Booking debit', 'Booking credit', 'Booking currency', 'Functional debit', 'Functional credit', 'Functional CCY', 'Emplid', 'Partner DB ID'], |
888 | 734 | 'filename': instance_name + '_' + year + month + '_Monthly Export.csv', | 730 | 'filename': instance_name + '_' + year + month + '_Monthly Export.csv', |
889 | 735 | 'key': 'rawdata', | 731 | 'key': 'rawdata', |
890 | @@ -758,6 +754,57 @@ | |||
891 | 758 | 'object': 'account.move.line', | 754 | 'object': 'account.move.line', |
892 | 759 | }, | 755 | }, |
893 | 760 | ] | 756 | ] |
894 | 757 | if context.get('old_vi'): | ||
895 | 758 | processrequests.extend([ | ||
896 | 759 | { | ||
897 | 760 | 'headers': ['Name', 'Code', 'Type', 'Status'], | ||
898 | 761 | 'filename': instance_name + '_' + year + month + '_Cost Centres.csv', | ||
899 | 762 | 'key': 'costcenter', | ||
900 | 763 | 'query_params': ( | ||
901 | 764 | last_day_of_period, last_day_of_period, tuple(instance_ids), last_day_of_period, | ||
902 | 765 | last_day_of_period, | ||
903 | 766 | tuple(instance_ids)), | ||
904 | 767 | 'function': 'postprocess_selection_columns', | ||
905 | 768 | 'fnct_params': [('account.analytic.account', 'type', 2)], | ||
906 | 769 | }, | ||
907 | 770 | { | ||
908 | 771 | 'headers': ['Name', 'Code', 'Donor code', 'Grant amount', 'Reporting CCY', 'State'], | ||
909 | 772 | 'filename': instance_name + '_' + year + month + '_Financing contracts.csv', | ||
910 | 773 | 'key': 'contract', | ||
911 | 774 | 'query_params': (tuple(instance_ids),), | ||
912 | 775 | 'function': 'postprocess_selection_columns', | ||
913 | 776 | 'fnct_params': [('financing.contract.contract', 'state', 5)], | ||
914 | 777 | }, | ||
915 | 778 | { | ||
916 | 779 | 'headers': ['CCY name', 'CCY code', 'Rate', 'Month'], | ||
917 | 780 | 'filename': instance_name + '_' + year + month + '_FX rates.csv', | ||
918 | 781 | 'key': 'fxrate', | ||
919 | 782 | 'query_params': (first_day_of_last_fy, last_day_of_period), | ||
920 | 783 | }, | ||
921 | 784 | { | ||
922 | 785 | 'headers': ['Instance', 'Code', 'Name', 'Period', 'Starting balance', 'Calculated balance', | ||
923 | 786 | 'Closing balance', 'Currency'], | ||
924 | 787 | 'filename': instance_name + '_' + year + month + '_Liquidity Balances.csv', | ||
925 | 788 | 'key': 'liquidity', | ||
926 | 789 | 'query_params': ( | ||
927 | 790 | tuple([period_yyyymm]), reg_types, first_day_of_period, reg_types, first_day_of_period, | ||
928 | 791 | last_day_of_period, reg_types, last_day_of_period, tuple(instance_ids)), | ||
929 | 792 | 'function': 'postprocess_liquidity_balances', | ||
930 | 793 | 'fnct_params': context, | ||
931 | 794 | }, | ||
932 | 795 | ]) | ||
933 | 796 | if not context.get('old_vi'): | ||
934 | 797 | processrequests.extend([ | ||
935 | 798 | { | ||
936 | 799 | 'headers': ['G/L Account', 'Booking currency', 'Balance'], | ||
937 | 800 | 'filename': instance_name + '_' + year + month + '_Balance_previous_month.csv', | ||
938 | 801 | 'key': 'balance_previous_month', | ||
939 | 802 | 'query_params': (previous_period_id, | ||
940 | 803 | # note: engagements are also excluded since there are no ENG/ENGI "G/L" journals | ||
941 | 804 | tuple(excluded_journal_types + ['cur_adj']), | ||
942 | 805 | tuple(instance_ids)), | ||
943 | 806 | } | ||
944 | 807 | ]) | ||
945 | 761 | if plresult_ji_in_ids: | 808 | if plresult_ji_in_ids: |
946 | 762 | processrequests.append({ | 809 | processrequests.append({ |
947 | 763 | 'filename': instance_name + '_' + year + month + '_Monthly Export.csv', | 810 | 'filename': instance_name + '_' + year + month + '_Monthly Export.csv', |
948 | 764 | 811 | ||
949 | === modified file 'bin/addons/vertical_integration/vertical_integration_wizard.xml' | |||
950 | --- bin/addons/vertical_integration/vertical_integration_wizard.xml 2017-10-17 09:57:39 +0000 | |||
951 | +++ bin/addons/vertical_integration/vertical_integration_wizard.xml 2020-02-04 10:20:45 +0000 | |||
952 | @@ -109,6 +109,21 @@ | |||
953 | 109 | action="action_hq_export_ocb" | 109 | action="action_hq_export_ocb" |
954 | 110 | id="menu_action_hq_export_ocb" sequence="30"/> | 110 | id="menu_action_hq_export_ocb" sequence="30"/> |
955 | 111 | 111 | ||
956 | 112 | <!-- OLD OCB VI (to be deleted once this version will be dropped) --> | ||
957 | 113 | <record id="action_hq_export_ocb_old" model="ir.actions.act_window"> | ||
958 | 114 | <field name="name">Export to HQ system (OCB) Access Interface</field> | ||
959 | 115 | <field name="type">ir.actions.act_window</field> | ||
960 | 116 | <field name="res_model">ocb.export.wizard</field> | ||
961 | 117 | <field name="view_type">form</field> | ||
962 | 118 | <field name="view_mode">form</field> | ||
963 | 119 | <field name="view_id" ref="ocb_export_wizard"/> | ||
964 | 120 | <field name="context">{'old_vi': True}</field> | ||
965 | 121 | <field name="target">new</field> | ||
966 | 122 | </record> | ||
967 | 123 | <menuitem parent="account.menu_finance_generic_reporting" | ||
968 | 124 | action="action_hq_export_ocb_old" | ||
969 | 125 | id="menu_action_hq_export_ocb_old" sequence="32"/> | ||
970 | 126 | |||
971 | 112 | <!-- OCB matching export --> | 127 | <!-- OCB matching export --> |
972 | 113 | 128 | ||
973 | 114 | <record id="ocb_matching_export_wizard" model="ir.ui.view"> | 129 | <record id="ocb_matching_export_wizard" model="ir.ui.view"> |