Merge lp:~julie-w/unifield-server/US-1255 into lp:unifield-server
- US-1255
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 4558 |
Proposed branch: | lp:~julie-w/unifield-server/US-1255 |
Merge into: | lp:unifield-server |
Diff against target: |
398 lines (+212/-9) 8 files modified
bin/addons/account/wizard/account_invoice_refund.py (+8/-0) bin/addons/account_corrections/account_move_line.py (+107/-1) bin/addons/account_corrections/account_wizard_view.xml (+22/-3) bin/addons/account_corrections/wizard/journal_items_corrections.py (+15/-1) bin/addons/account_mcdb/account_mcdb.py (+6/-0) bin/addons/account_override/account_move_line.py (+2/-1) bin/addons/msf_profile/i18n/fr_MF.po (+50/-1) bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv (+2/-2) |
To merge this branch: | bzr merge lp:~julie-w/unifield-server/US-1255 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+332481@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/wizard/account_invoice_refund.py' | |||
2 | --- bin/addons/account/wizard/account_invoice_refund.py 2017-07-03 16:00:30 +0000 | |||
3 | +++ bin/addons/account/wizard/account_invoice_refund.py 2017-10-19 09:52:42 +0000 | |||
4 | @@ -238,6 +238,14 @@ | |||
5 | 238 | if 'value' in data and data['value']: | 238 | if 'value' in data and data['value']: |
6 | 239 | inv_obj.write(cr, uid, [inv_id], data['value']) | 239 | inv_obj.write(cr, uid, [inv_id], data['value']) |
7 | 240 | created_inv.append(inv_id) | 240 | created_inv.append(inv_id) |
8 | 241 | |||
9 | 242 | # Refund cancel/modify: set the invoice JI/AJIs as Corrected by the system so that they can't be | ||
10 | 243 | # corrected manually. This must be done at the end of the refund process to handle the right AJI ids | ||
11 | 244 | # get the list of move lines excluding invoice header | ||
12 | 245 | ml_list = [ml.id for ml in movelines if not (ml.account_id.id == inv.account_id.id and | ||
13 | 246 | abs(abs(inv.amount_total) - abs(ml.amount_currency)) <= 10**-3)] | ||
14 | 247 | account_m_line_obj.set_as_corrected(cr, uid, ml_list, manual=False, context=None) | ||
15 | 248 | |||
16 | 241 | if inv.type in ('out_invoice', 'out_refund'): | 249 | if inv.type in ('out_invoice', 'out_refund'): |
17 | 242 | xml_id = 'action_invoice_tree3' | 250 | xml_id = 'action_invoice_tree3' |
18 | 243 | else: | 251 | else: |
19 | 244 | 252 | ||
20 | === modified file 'bin/addons/account_corrections/account_move_line.py' | |||
21 | --- bin/addons/account_corrections/account_move_line.py 2017-04-28 07:56:21 +0000 | |||
22 | +++ bin/addons/account_corrections/account_move_line.py 2017-10-19 09:52:42 +0000 | |||
23 | @@ -148,6 +148,7 @@ | |||
24 | 148 | 'last_cor_was_only_analytic': fields.boolean(string="AD Corrected?", | 148 | 'last_cor_was_only_analytic': fields.boolean(string="AD Corrected?", |
25 | 149 | invisible=True, | 149 | invisible=True, |
26 | 150 | help="If true, this line has been corrected by an accounting correction wizard but with only an AD correction (no G/L correction)"), | 150 | help="If true, this line has been corrected by an accounting correction wizard but with only an AD correction (no G/L correction)"), |
27 | 151 | 'is_manually_corrected': fields.boolean('Is Manually Corrected'), | ||
28 | 151 | } | 152 | } |
29 | 152 | 153 | ||
30 | 153 | _defaults = { | 154 | _defaults = { |
31 | @@ -156,6 +157,7 @@ | |||
32 | 156 | 'have_an_historic': lambda *a: False, | 157 | 'have_an_historic': lambda *a: False, |
33 | 157 | 'is_corrigible': lambda *a: True, | 158 | 'is_corrigible': lambda *a: True, |
34 | 158 | 'last_cor_was_only_analytic': lambda *a: False, | 159 | 'last_cor_was_only_analytic': lambda *a: False, |
35 | 160 | 'is_manually_corrected': lambda *a: False, | ||
36 | 159 | } | 161 | } |
37 | 160 | 162 | ||
38 | 161 | def copy(self, cr, uid, aml_id, default=None, context=None): | 163 | def copy(self, cr, uid, aml_id, default=None, context=None): |
39 | @@ -174,6 +176,7 @@ | |||
40 | 174 | 'corrected': False, | 176 | 'corrected': False, |
41 | 175 | 'reversal': False, | 177 | 'reversal': False, |
42 | 176 | 'last_cor_was_only_analytic': False, | 178 | 'last_cor_was_only_analytic': False, |
43 | 179 | 'is_manually_corrected': False, | ||
44 | 177 | }) | 180 | }) |
45 | 178 | if 'exported' not in default: | 181 | if 'exported' not in default: |
46 | 179 | default['exported'] = False | 182 | default['exported'] = False |
47 | @@ -280,7 +283,7 @@ | |||
48 | 280 | wiz_obj = self.pool.get('wizard.journal.items.corrections') | 283 | wiz_obj = self.pool.get('wizard.journal.items.corrections') |
49 | 281 | ml = self.browse(cr, uid, ids[0]) | 284 | ml = self.browse(cr, uid, ids[0]) |
50 | 282 | # Create wizard | 285 | # Create wizard |
52 | 283 | wizard = wiz_obj.create(cr, uid, {'move_line_id': ids[0]}, context=context) | 286 | wizard = wiz_obj.create(cr, uid, {'move_line_id': ids[0], 'from_ji': True}, context=context) |
53 | 284 | # Change wizard state in order to change date requirement on wizard | 287 | # Change wizard state in order to change date requirement on wizard |
54 | 285 | wiz_obj.write(cr, uid, [wizard], {'state': 'open'}, context=context) | 288 | wiz_obj.write(cr, uid, [wizard], {'state': 'open'}, context=context) |
55 | 286 | # Update context | 289 | # Update context |
56 | @@ -316,6 +319,34 @@ | |||
57 | 316 | context={} | 319 | context={} |
58 | 317 | if isinstance(ids, (int, long)): | 320 | if isinstance(ids, (int, long)): |
59 | 318 | ids = [ids] | 321 | ids = [ids] |
60 | 322 | # if JI was marked as corrected manually: display the Reverse Manual Corr. wizard instead of the History wizard | ||
61 | 323 | # except if it's a project line that was marked as Corrected in a upper level | ||
62 | 324 | reverse_corr_wiz_obj = self.pool.get('reverse.manual.correction.wizard') | ||
63 | 325 | user_obj = self.pool.get('res.users') | ||
64 | 326 | display_reverse_corr_wiz = False | ||
65 | 327 | if len(ids) == 1: | ||
66 | 328 | ml = self.read(cr, uid, ids[0], ['is_manually_corrected', 'corrected_upstream'], context=context) | ||
67 | 329 | if ml['is_manually_corrected']: | ||
68 | 330 | company = user_obj.browse(cr, uid, uid, context=context).company_id | ||
69 | 331 | level = company.instance_id and company.instance_id.level or '' | ||
70 | 332 | if not ml['corrected_upstream'] or level != 'project': | ||
71 | 333 | display_reverse_corr_wiz = True | ||
72 | 334 | if display_reverse_corr_wiz: | ||
73 | 335 | context.update({ | ||
74 | 336 | 'active_id': ids[0], | ||
75 | 337 | 'active_ids': ids, | ||
76 | 338 | }) | ||
77 | 339 | reverse_corr_wizard = reverse_corr_wiz_obj.create(cr, uid, {}, context=context) | ||
78 | 340 | return { | ||
79 | 341 | 'name': _("History Move Line"), # same title as the History Wizard | ||
80 | 342 | 'type': 'ir.actions.act_window', | ||
81 | 343 | 'res_model': 'reverse.manual.correction.wizard', | ||
82 | 344 | 'view_mode': 'form,tree', | ||
83 | 345 | 'view_type': 'form', | ||
84 | 346 | 'res_id': [reverse_corr_wizard], | ||
85 | 347 | 'context': context, | ||
86 | 348 | 'target': 'new', | ||
87 | 349 | } | ||
88 | 319 | # Prepare some values | 350 | # Prepare some values |
89 | 320 | domain_ids = [] | 351 | domain_ids = [] |
90 | 321 | # Search ids to be open | 352 | # Search ids to be open |
91 | @@ -949,8 +980,42 @@ | |||
92 | 949 | self.write(cr, uid, ml_ids, {'corrected_upstream': True}, check=False, update_check=False, context=context) | 980 | self.write(cr, uid, ml_ids, {'corrected_upstream': True}, check=False, update_check=False, context=context) |
93 | 950 | return True | 981 | return True |
94 | 951 | 982 | ||
95 | 983 | def set_as_corrected(self, cr, uid, ji_ids, manual=True, context=None): | ||
96 | 984 | """ | ||
97 | 985 | Sets the JIs and their related AJIs as Corrected according to the following rules: | ||
98 | 986 | - if one of the JIs or AJIs has already been corrected it raises an error | ||
99 | 987 | - if manual = True, the Correction will be set as Manual (= the user will be able to reverse it manually) | ||
100 | 988 | """ | ||
101 | 989 | if context is None: | ||
102 | 990 | context = {} | ||
103 | 991 | if isinstance(ji_ids, (int, long)): | ||
104 | 992 | ji_ids = [ji_ids] | ||
105 | 993 | aal_obj = self.pool.get('account.analytic.line') | ||
106 | 994 | for ji in self.browse(cr, uid, ji_ids, fields_to_fetch=['corrected', 'move_id'], context=context): | ||
107 | 995 | # check that the JI isn't already corrected | ||
108 | 996 | if ji.corrected: | ||
109 | 997 | raise osv.except_osv(_('Error'), _('The entry %s has already been corrected.') % ji.move_id.name) | ||
110 | 998 | # check that none of the AJIs linked to the JIs has already been reallocated | ||
111 | 999 | aji_ids = aal_obj.search(cr, uid, [('move_id', '=', ji.id)], order='NO_ORDER', context=context) | ||
112 | 1000 | for aji in aal_obj.read(cr, uid, aji_ids, ['is_reallocated'], context=context): | ||
113 | 1001 | if aji['is_reallocated']: | ||
114 | 1002 | raise osv.except_osv(_('Error'), _('One AJI related to the entry %s has already been corrected.') % ji.move_id.name) | ||
115 | 1003 | # set the JI as corrected | ||
116 | 1004 | manual_corr_vals = {'is_manually_corrected': manual, | ||
117 | 1005 | 'corrected': True, # is_corrigible will be seen as "False" | ||
118 | 1006 | 'have_an_historic': True} | ||
119 | 1007 | # write on JI without recreating AJIs | ||
120 | 1008 | self.write(cr, uid, ji.id, manual_corr_vals, context=context, check=False, update_check=False) | ||
121 | 1009 | # Set the "corrected_upstream" flag on the JI if necessary | ||
122 | 1010 | # (so that project lines marked as corrected in a upper level can't be "uncorrected" in project) | ||
123 | 1011 | self.corrected_upstream_marker(cr, uid, [ji.id], context=context) | ||
124 | 1012 | # set the AJIs as corrected | ||
125 | 1013 | aal_obj.write(cr, uid, aji_ids, {'is_reallocated': True}, context=context) | ||
126 | 1014 | |||
127 | 1015 | |||
128 | 952 | account_move_line() | 1016 | account_move_line() |
129 | 953 | 1017 | ||
130 | 1018 | |||
131 | 954 | class account_move(osv.osv): | 1019 | class account_move(osv.osv): |
132 | 955 | _name = 'account.move' | 1020 | _name = 'account.move' |
133 | 956 | _inherit = 'account.move' | 1021 | _inherit = 'account.move' |
134 | @@ -971,4 +1036,45 @@ | |||
135 | 971 | return reversed_move | 1036 | return reversed_move |
136 | 972 | 1037 | ||
137 | 973 | account_move() | 1038 | account_move() |
138 | 1039 | |||
139 | 1040 | |||
140 | 1041 | class reverse_manual_correction_wizard(osv.osv_memory): | ||
141 | 1042 | _name = 'reverse.manual.correction.wizard' | ||
142 | 1043 | _description = 'Manual Correction Reversal Wizard' | ||
143 | 1044 | |||
144 | 1045 | _columns = { | ||
145 | 1046 | } | ||
146 | 1047 | |||
147 | 1048 | _defaults = { | ||
148 | 1049 | } | ||
149 | 1050 | |||
150 | 1051 | def reverse_manual_correction(self, cr, uid, ids, context=None): | ||
151 | 1052 | """ | ||
152 | 1053 | Cancels the "Manual Correction" on the JI and its AJIs so that they can be re-corrected | ||
153 | 1054 | """ | ||
154 | 1055 | if context is None: | ||
155 | 1056 | context = {} | ||
156 | 1057 | aml_obj = self.pool.get('account.move.line') | ||
157 | 1058 | aal_obj = self.pool.get('account.analytic.line') | ||
158 | 1059 | ji_id = context.get('active_id', False) | ||
159 | 1060 | if ji_id: | ||
160 | 1061 | # set the JI as non-corrected | ||
161 | 1062 | is_cor_line = False | ||
162 | 1063 | if aml_obj.read(cr, uid, ji_id, ['corrected_line_id'], context=context)['corrected_line_id']: | ||
163 | 1064 | # if a COR line was corrected manually: the History Wizard must still appear if manual corr. is removed | ||
164 | 1065 | is_cor_line = True | ||
165 | 1066 | reverse_corr_vals = {'is_manually_corrected': False, | ||
166 | 1067 | 'corrected': False, # is_corrigible will be seen as "True" | ||
167 | 1068 | 'have_an_historic': is_cor_line, | ||
168 | 1069 | 'corrected_upstream': False} | ||
169 | 1070 | # add a tag in context to allow the write on a system JI (ex: to cancel a manual corr. done on a SI line) | ||
170 | 1071 | context.update({'from_manual_corr_reversal': True}) | ||
171 | 1072 | aml_obj.write(cr, uid, ji_id, reverse_corr_vals, context=context, check=False, update_check=False) | ||
172 | 1073 | # set the AJIs as non-corrected | ||
173 | 1074 | aji_ids = aal_obj.search(cr, uid, [('move_id', '=', ji_id)], order='NO_ORDER', context=context) | ||
174 | 1075 | aal_obj.write(cr, uid, aji_ids, {'is_reallocated': False}, context=context) | ||
175 | 1076 | return {'type': 'ir.actions.act_window_close'} | ||
176 | 1077 | |||
177 | 1078 | |||
178 | 1079 | reverse_manual_correction_wizard() | ||
179 | 974 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 1080 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
180 | 975 | 1081 | ||
181 | === modified file 'bin/addons/account_corrections/account_wizard_view.xml' | |||
182 | --- bin/addons/account_corrections/account_wizard_view.xml 2016-05-27 09:17:16 +0000 | |||
183 | +++ bin/addons/account_corrections/account_wizard_view.xml 2017-10-19 09:52:42 +0000 | |||
184 | @@ -38,9 +38,14 @@ | |||
185 | 38 | <field name="arch" type="xml"> | 38 | <field name="arch" type="xml"> |
186 | 39 | <form string="Journal items corrections Wizard"> | 39 | <form string="Journal items corrections Wizard"> |
187 | 40 | <separator string="Correction"/> | 40 | <separator string="Correction"/> |
191 | 41 | <field name="date" on_change="onchange_date(date)" colspan="2"/> | 41 | <group col="10" colspan="4"> |
192 | 42 | <label string="" colspan="2"/> | 42 | <field name="date" on_change="onchange_date(date)" colspan="2"/> |
193 | 43 | <field name="from_donation" invisible="1"/> | 43 | <field name="from_ji" invisible="1" colspan="2"/> |
194 | 44 | <button name="correct_manually" type="object" string="Set as Corrected Manually" colspan="2" | ||
195 | 45 | icon="terp-gtk-go-back-rtl" attrs="{'invisible': [('from_ji', '=', False)]}" /> | ||
196 | 46 | <label string="" colspan="2"/> | ||
197 | 47 | <field name="from_donation" invisible="1" colspan="2"/> | ||
198 | 48 | </group> | ||
199 | 44 | <newline/> | 49 | <newline/> |
200 | 45 | <field name="to_be_corrected_ids" colspan="6" context="{'from_donation_account': from_donation}" nolabel="1"/> | 50 | <field name="to_be_corrected_ids" colspan="6" context="{'from_donation_account': from_donation}" nolabel="1"/> |
201 | 46 | <newline/> | 51 | <newline/> |
202 | @@ -79,5 +84,19 @@ | |||
203 | 79 | </field> | 84 | </field> |
204 | 80 | </record> | 85 | </record> |
205 | 81 | 86 | ||
206 | 87 | <!-- Reversal Manual Correction Wizard --> | ||
207 | 88 | <record model="ir.ui.view" id="reverse_manual_correction_wizard_form"> | ||
208 | 89 | <field name="name">reverse.manual.correction.wizard.form</field> | ||
209 | 90 | <field name="model">reverse.manual.correction.wizard</field> | ||
210 | 91 | <field name="type">form</field> | ||
211 | 92 | <field name="arch" type="xml"> | ||
212 | 93 | <form> | ||
213 | 94 | <label string="This line has been manually corrected. Do you want to reverse the correction?" colspan="4"/> | ||
214 | 95 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> | ||
215 | 96 | <button icon="terp-gtk-go-back-ltr" string="Reverse the correction" name="reverse_manual_correction" type="object"/> | ||
216 | 97 | </form> | ||
217 | 98 | </field> | ||
218 | 99 | </record> | ||
219 | 100 | |||
220 | 82 | </data> | 101 | </data> |
221 | 83 | </openerp> | 102 | </openerp> |
222 | 84 | 103 | ||
223 | === modified file 'bin/addons/account_corrections/wizard/journal_items_corrections.py' | |||
224 | --- bin/addons/account_corrections/wizard/journal_items_corrections.py 2017-04-19 10:18:53 +0000 | |||
225 | +++ bin/addons/account_corrections/wizard/journal_items_corrections.py 2017-10-19 09:52:42 +0000 | |||
226 | @@ -208,6 +208,7 @@ | |||
227 | 208 | 'state': fields.selection([('draft', 'Draft'), ('open', 'Open')], string="state"), | 208 | 'state': fields.selection([('draft', 'Draft'), ('open', 'Open')], string="state"), |
228 | 209 | 'from_donation': fields.boolean('From Donation account?'), | 209 | 'from_donation': fields.boolean('From Donation account?'), |
229 | 210 | 'from_register': fields.function(_get_from_register, type='boolean', string='From register?', method=True, store=False), | 210 | 'from_register': fields.function(_get_from_register, type='boolean', string='From register?', method=True, store=False), |
230 | 211 | 'from_ji': fields.boolean('Opened from the JI view?'), | ||
231 | 211 | } | 212 | } |
232 | 212 | 213 | ||
233 | 213 | _defaults = { | 214 | _defaults = { |
234 | @@ -359,6 +360,19 @@ | |||
235 | 359 | employee_id=aml.employee_id or False, transfer_journal_id=aml.transfer_journal_id or False, | 360 | employee_id=aml.employee_id or False, transfer_journal_id=aml.transfer_journal_id or False, |
236 | 360 | partner_id=aml.partner_id or False, raise_it=True, context=context) | 361 | partner_id=aml.partner_id or False, raise_it=True, context=context) |
237 | 361 | 362 | ||
238 | 363 | def correct_manually(self, cr, uid, ids, context=None): | ||
239 | 364 | """ | ||
240 | 365 | Gets the JI displayed in the wizard and sets it as Manually Corrected | ||
241 | 366 | """ | ||
242 | 367 | if context is None: | ||
243 | 368 | context = {} | ||
244 | 369 | if isinstance(ids, (int, long)): | ||
245 | 370 | ids = [ids] | ||
246 | 371 | aml_obj = self.pool.get('account.move.line') | ||
247 | 372 | wizard = self.browse(cr, uid, ids[0], context=context) | ||
248 | 373 | aml_obj.set_as_corrected(cr, uid, [wizard.move_line_id.id], context=context) | ||
249 | 374 | return {'type': 'ir.actions.act_window_close'} | ||
250 | 375 | |||
251 | 362 | def action_confirm(self, cr, uid, ids, context=None, distrib_id=False): | 376 | def action_confirm(self, cr, uid, ids, context=None, distrib_id=False): |
252 | 363 | """ | 377 | """ |
253 | 364 | Do a correction from the given line | 378 | Do a correction from the given line |
254 | @@ -368,6 +382,7 @@ | |||
255 | 368 | context = {} | 382 | context = {} |
256 | 369 | if isinstance(ids, (int, long)): | 383 | if isinstance(ids, (int, long)): |
257 | 370 | ids = [ids] | 384 | ids = [ids] |
258 | 385 | aml_obj = self.pool.get('account.move.line') | ||
259 | 371 | # Verify that date is superior to line's date | 386 | # Verify that date is superior to line's date |
260 | 372 | for wiz in self.browse(cr, uid, ids, context=context): | 387 | for wiz in self.browse(cr, uid, ids, context=context): |
261 | 373 | if wiz.move_line_id and wiz.move_line_id.date: | 388 | if wiz.move_line_id and wiz.move_line_id.date: |
262 | @@ -384,7 +399,6 @@ | |||
263 | 384 | if cp.state != 'draft': | 399 | if cp.state != 'draft': |
264 | 385 | raise osv.except_osv(_('Error'), _('Period (%s) is not open.') % (cp.name,)) | 400 | raise osv.except_osv(_('Error'), _('Period (%s) is not open.') % (cp.name,)) |
265 | 386 | 401 | ||
266 | 387 | aml_obj = self.pool.get('account.move.line') | ||
267 | 388 | # Fetch old line | 402 | # Fetch old line |
268 | 389 | old_line = wizard.move_line_id | 403 | old_line = wizard.move_line_id |
269 | 390 | # Verify what have changed between old line and new one | 404 | # Verify what have changed between old line and new one |
270 | 391 | 405 | ||
271 | === modified file 'bin/addons/account_mcdb/account_mcdb.py' | |||
272 | --- bin/addons/account_mcdb/account_mcdb.py 2017-08-10 12:29:42 +0000 | |||
273 | +++ bin/addons/account_mcdb/account_mcdb.py 2017-10-19 09:52:42 +0000 | |||
274 | @@ -411,9 +411,15 @@ | |||
275 | 411 | # REALLOCATION field | 411 | # REALLOCATION field |
276 | 412 | if wiz.reallocated: | 412 | if wiz.reallocated: |
277 | 413 | if wiz.reallocated == 'reallocated': | 413 | if wiz.reallocated == 'reallocated': |
278 | 414 | # entries corrected by the system (= not marked as corrected manually) | ||
279 | 414 | domain.append(('is_reallocated', '=', True)) | 415 | domain.append(('is_reallocated', '=', True)) |
280 | 416 | domain.append('|') | ||
281 | 417 | domain.append(('move_id', '=', False)) | ||
282 | 418 | domain.append(('move_id.is_manually_corrected', '=', False)) | ||
283 | 415 | elif wiz.reallocated == 'unreallocated': | 419 | elif wiz.reallocated == 'unreallocated': |
284 | 420 | domain.append('|') | ||
285 | 416 | domain.append(('is_reallocated', '=', False)) | 421 | domain.append(('is_reallocated', '=', False)) |
286 | 422 | domain.append(('move_id.is_manually_corrected', '=', True)) | ||
287 | 417 | # REVERSED field | 423 | # REVERSED field |
288 | 418 | if wiz.reversed: | 424 | if wiz.reversed: |
289 | 419 | if wiz.reversed == 'reversed': | 425 | if wiz.reversed == 'reversed': |
290 | 420 | 426 | ||
291 | === modified file 'bin/addons/account_override/account_move_line.py' | |||
292 | --- bin/addons/account_override/account_move_line.py 2017-08-21 10:17:48 +0000 | |||
293 | +++ bin/addons/account_override/account_move_line.py 2017-10-19 09:52:42 +0000 | |||
294 | @@ -557,7 +557,8 @@ | |||
295 | 557 | reconciliation = ml.reconcile_id or ml.reconcile_partial_id or False | 557 | reconciliation = ml.reconcile_id or ml.reconcile_partial_id or False |
296 | 558 | if reconciliation and reconciliation.type == 'auto': | 558 | if reconciliation and reconciliation.type == 'auto': |
297 | 559 | raise osv.except_osv(_('Warning'), _('Only manually reconciled entries can be unreconciled.')) | 559 | raise osv.except_osv(_('Warning'), _('Only manually reconciled entries can be unreconciled.')) |
299 | 560 | elif ml.move_id and ml.move_id.status == 'sys': | 560 | # prevent from modifying system JIs except for reversing a manual correction |
300 | 561 | elif ml.move_id and ml.move_id.status == 'sys' and not context.get('from_manual_corr_reversal'): | ||
301 | 561 | raise osv.except_osv(_('Warning'), _('You cannot change Journal Items that comes from the system!')) | 562 | raise osv.except_osv(_('Warning'), _('You cannot change Journal Items that comes from the system!')) |
302 | 562 | # Check date validity with period | 563 | # Check date validity with period |
303 | 563 | self._check_date_validity(cr, uid, ids, vals) | 564 | self._check_date_validity(cr, uid, ids, vals) |
304 | 564 | 565 | ||
305 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
306 | --- bin/addons/msf_profile/i18n/fr_MF.po 2017-10-09 16:01:14 +0000 | |||
307 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2017-10-19 09:52:42 +0000 | |||
308 | @@ -94508,7 +94508,7 @@ | |||
309 | 94508 | msgid "Search Uninvoiced Lines" | 94508 | msgid "Search Uninvoiced Lines" |
310 | 94509 | msgstr "Rechercher Lignes non-facturées" | 94509 | msgstr "Rechercher Lignes non-facturées" |
311 | 94510 | 94510 | ||
313 | 94511 | #. modules: res_currency_functional, financing_contract, msf_tools, account_voucher, account_hq_entries, account_override, product_attributes, base_report_designer, register_accounting, procurement_cycle, msf_accrual, finance, sync_client, purchase_followup, account_mcdb, res_currency_tables, supplier_catalogue, procurement_request, purchase, purchase_compare_rfq, board, stock_override, msf_doc_import, analytic_distribution, threshold_value, account_payment, msf_homere_interface, msf_instance, account_reconciliation, consumption_calculation, purchase_override, specific_rules, kit, sale_override, base, account_period_closing_level, msf_currency_revaluation, msf_supply_doc_export, product_list, procurement_report, msf_budget, account_corrections, account, msf_outgoing, stock_move_tracking, procurement_auto, documents_done, sale, msf_config_locations, sales_followup, vertical_integration, procurement, sourcing, msf_custom_settings, msf_audittrail, tender_flow, stock, msf_profile | 94511 | #. modules: res_currency_functional, financing_contract, msf_tools, account_voucher, account_hq_entries, account_override, product_attributes, base_report_designer, register_accounting, procurement_cycle, msf_accrual, finance, sync_client, purchase_followup, account_mcdb, res_currency_tables, supplier_catalogue, procurement_request, purchase, purchase_compare_rfq, board, stock_override, msf_doc_import, analytic_distribution, threshold_value, account_payment, msf_homere_interface, msf_instance, account_reconciliation, consumption_calculation, purchase_override, specific_rules, kit, sale_override, base, account_period_closing_level, msf_currency_revaluation, msf_supply_doc_export, product_list, procurement_report, msf_budget, account_corrections, account, msf_outgoing, stock_move_tracking, procurement_auto, documents_done, sale, msf_config_locations, sales_followup, vertical_integration, procurement, sourcing, msf_custom_settings, msf_audittrail, tender_flow, stock, msf_profile, account_corrections |
314 | 94512 | #: view:account.addtmpl.wizard:0 | 94512 | #: view:account.addtmpl.wizard:0 |
315 | 94513 | #: view:account.aged.trial.balance:0 | 94513 | #: view:account.aged.trial.balance:0 |
316 | 94514 | #: view:account.analytic.Journal.report:0 | 94514 | #: view:account.analytic.Journal.report:0 |
317 | @@ -94731,6 +94731,7 @@ | |||
318 | 94731 | #: view:stock.picking.processor:0 | 94731 | #: view:stock.picking.processor:0 |
319 | 94732 | #: view:wizard.import.invoice.line:0 | 94732 | #: view:wizard.import.invoice.line:0 |
320 | 94733 | #: view:wizard.report.paid.invoice:0 | 94733 | #: view:wizard.report.paid.invoice:0 |
321 | 94734 | #: view:reverse.manual.correction.wizard:0 | ||
322 | 94734 | #, python-format | 94735 | #, python-format |
323 | 94735 | msgid "Cancel" | 94736 | msgid "Cancel" |
324 | 94736 | msgstr "Annuler" | 94737 | msgstr "Annuler" |
325 | @@ -99629,3 +99630,51 @@ | |||
326 | 99629 | #, python-format | 99630 | #, python-format |
327 | 99630 | msgid "You can't delete this FX rate as the period \"%s\" isn't in Draft state." | 99631 | msgid "You can't delete this FX rate as the period \"%s\" isn't in Draft state." |
328 | 99631 | msgstr "Vous ne pouvez pas supprimer ce taux de change car la période \"%s\" n'est pas en statut Brouillon." | 99632 | msgstr "Vous ne pouvez pas supprimer ce taux de change car la période \"%s\" n'est pas en statut Brouillon." |
329 | 99633 | |||
330 | 99634 | #. module: account_corrections | ||
331 | 99635 | #: view:wizard.journal.items.corrections:0 | ||
332 | 99636 | msgid "Set as Corrected Manually" | ||
333 | 99637 | msgstr "Marquer comme Corrigé Manuellement" | ||
334 | 99638 | |||
335 | 99639 | #. module: account_corrections | ||
336 | 99640 | #: field:wizard.journal.items.corrections,from_ji:0 | ||
337 | 99641 | msgid "Opened from the JI view?" | ||
338 | 99642 | msgstr "Ouvert depuis la vue Lignes d'Ecritures Comptables ?" | ||
339 | 99643 | |||
340 | 99644 | #. module: account_corrections | ||
341 | 99645 | #: field:account.move.line,is_manually_corrected:0 | ||
342 | 99646 | msgid "Is Manually Corrected" | ||
343 | 99647 | msgstr "Est Corrigé Manuellement" | ||
344 | 99648 | |||
345 | 99649 | #. module: account_corrections | ||
346 | 99650 | #: code:addons/account_corrections/account_move_line.py:341 | ||
347 | 99651 | #, python-format | ||
348 | 99652 | msgid "History Move Line" | ||
349 | 99653 | msgstr "Historique - Ecriture" | ||
350 | 99654 | |||
351 | 99655 | #. module: account_corrections | ||
352 | 99656 | #: view:reverse.manual.correction.wizard:0 | ||
353 | 99657 | msgid "This line has been manually corrected. Do you want to reverse the correction?" | ||
354 | 99658 | msgstr "Cette ligne a été corrigée manuellement. Voulez-vous annuler la correction ?" | ||
355 | 99659 | |||
356 | 99660 | #. module: account_corrections | ||
357 | 99661 | #: view:reverse.manual.correction.wizard:0 | ||
358 | 99662 | msgid "Reverse the correction" | ||
359 | 99663 | msgstr "Annuler la correction" | ||
360 | 99664 | |||
361 | 99665 | #. module: account_corrections | ||
362 | 99666 | #: model:ir.model,name:account_corrections.model_reverse_manual_correction_wizard | ||
363 | 99667 | msgid "Manual Correction Reversal Wizard" | ||
364 | 99668 | msgstr "Assistant d'Annulation de Correction Manuelle" | ||
365 | 99669 | |||
366 | 99670 | #. module: account_corrections | ||
367 | 99671 | #: code:addons/account_corrections/account_move_line.py:997 | ||
368 | 99672 | #, python-format | ||
369 | 99673 | msgid "The entry %s has already been corrected." | ||
370 | 99674 | msgstr "L'écriture %s a déjà été corrigée." | ||
371 | 99675 | |||
372 | 99676 | #. module: account_corrections | ||
373 | 99677 | #: code:addons/account_corrections/account_move_line.py:1001 | ||
374 | 99678 | #, python-format | ||
375 | 99679 | msgid "One AJI related to the entry %s has already been corrected." | ||
376 | 99680 | msgstr "Une entrée analytique liée à l'écriture %s a déjà été corrigée." | ||
377 | 99632 | 99681 | ||
378 | === modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv' | |||
379 | --- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2017-08-23 18:38:09 +0000 | |||
380 | +++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2017-10-19 09:52:42 +0000 | |||
381 | @@ -74,7 +74,7 @@ | |||
382 | 74 | msf_sync_data_server.account_move_reconcile,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,[],"['name', 'type', 'is_multi_instance', 'multi_instance_level_creation', 'instance_id', 'nb_partial_legs']",HQ + MISSION,account.move.reconcile,,Account Move Reconcile,Valid,,410 | 74 | msf_sync_data_server.account_move_reconcile,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,[],"['name', 'type', 'is_multi_instance', 'multi_instance_level_creation', 'instance_id', 'nb_partial_legs']",HQ + MISSION,account.move.reconcile,,Account Move Reconcile,Valid,,410 |
383 | 75 | msf_sync_data_server.register_line_deleted,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,"[('instance_id' , 'in' , ('msf.instance' , 'id' , [('level' , '=' , 'project')]))]","['statement_id/id', 'sequence','instance_id/id']",MISSION,account.bank.statement.line.deleted,instance_id,Register Deleted Line,Valid,,405 | 75 | msf_sync_data_server.register_line_deleted,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,"[('instance_id' , 'in' , ('msf.instance' , 'id' , [('level' , '=' , 'project')]))]","['statement_id/id', 'sequence','instance_id/id']",MISSION,account.bank.statement.line.deleted,instance_id,Register Deleted Line,Valid,,405 |
384 | 76 | msf_sync_data_server.account_move,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional-Private,[],"['date', 'document_date', 'imported', 'journal_id/id', 'name', 'narration', 'period_id/id', 'ref', 'statement_line_ids/id', 'to_check','instance_id/id','status','employee_id/id','transfer_journal_id/id','manual_currency_id/id','block_manual_currency_id','partner_id2/id','analytic_distribution_id/id', 'register_line_id/id']",HQ + MISSION,account.move,instance_id,Account Move,Valid,,411 | 76 | msf_sync_data_server.account_move,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional-Private,[],"['date', 'document_date', 'imported', 'journal_id/id', 'name', 'narration', 'period_id/id', 'ref', 'statement_line_ids/id', 'to_check','instance_id/id','status','employee_id/id','transfer_journal_id/id','manual_currency_id/id','block_manual_currency_id','partner_id2/id','analytic_distribution_id/id', 'register_line_id/id']",HQ + MISSION,account.move,instance_id,Account Move,Valid,,411 |
386 | 77 | msf_sync_data_server.account_move_line,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional-Private,[],"['account_id/id', 'accrual', 'analytic_account_id/id', 'analytic_distribution_id/id', 'blocked', 'cheque_number','corrected', 'credit', 'credit_currency', 'currency_id/id', 'date_created', 'date_maturity', 'debit', 'debit_currency', 'document_date', 'employee_id/id', 'have_an_historic', 'instance_id/id', 'is_addendum_line', 'is_counterpart', 'is_transfer_with_change', 'is_write_off', 'journal_id/id', 'last_cor_was_only_analytic', 'move_id/id', 'name', 'partner_id/id','partner_txt','period_id/id', 'reconcile_id/id', 'reconcile_partial_id/id', 'ref', 'reversal', 'source_date', 'statement_id/id', 'reference', 'state','transfer_journal_id/id', 'transfer_amount', 'is_downpayment', 'reconcile_date', 'is_revaluated_ok', 'unreconcile_date', 'unreconcile_txt']",HQ + MISSION,account.move.line,instance_id,Account Move Line,Valid,,412 | 77 | msf_sync_data_server.account_move_line,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional-Private,[],"['account_id/id', 'accrual', 'analytic_account_id/id', 'analytic_distribution_id/id', 'blocked', 'cheque_number','corrected', 'credit', 'credit_currency', 'currency_id/id', 'date_created', 'date_maturity', 'debit', 'debit_currency', 'document_date', 'employee_id/id', 'have_an_historic', 'instance_id/id', 'is_addendum_line', 'is_counterpart', 'is_transfer_with_change', 'is_write_off', 'journal_id/id', 'last_cor_was_only_analytic', 'move_id/id', 'name', 'partner_id/id','partner_txt','period_id/id', 'reconcile_id/id', 'reconcile_partial_id/id', 'ref', 'reversal', 'source_date', 'statement_id/id', 'reference', 'state','transfer_journal_id/id', 'transfer_amount', 'is_downpayment', 'reconcile_date', 'is_revaluated_ok', 'unreconcile_date', 'unreconcile_txt', 'is_manually_corrected']",HQ + MISSION,account.move.line,instance_id,Account Move Line,Valid,,412 |
387 | 78 | msf_sync_data_server.account_move_line_correction,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,"[('move_id','in',('account.move','id',[('state','=','posted')]))]","['corrected_line_id/id', 'instance_id/id', 'reversal_line_id/id']",HQ + MISSION,account.move.line,instance_id,Account Move Line Correction,Valid,,413 | 78 | msf_sync_data_server.account_move_line_correction,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,"[('move_id','in',('account.move','id',[('state','=','posted')]))]","['corrected_line_id/id', 'instance_id/id', 'reversal_line_id/id']",HQ + MISSION,account.move.line,instance_id,Account Move Line Correction,Valid,,413 |
388 | 79 | msf_sync_data_server.account_move_line_register_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,[],"['corrected_st_line_id/id', 'instance_id/id']",MISSION,account.move.line,instance_id,Account Move Line / Register Line,Valid,,414 | 79 | msf_sync_data_server.account_move_line_register_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,[],"['corrected_st_line_id/id', 'instance_id/id']",MISSION,account.move.line,instance_id,Account Move Line / Register Line,Valid,,414 |
389 | 80 | msf_sync_data_server.register_line_account_move_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,"[('instance_id' , 'in' , ('msf.instance' , 'id' , [('level' , '=' , 'project')])),('statement_id','in',('account.bank.statement','id',[('state','!=','draft')])),'!',('state','=','draft')]","['direct_invoice_move_id/id', 'first_move_line_id/id', 'from_import_cheque_id/id', 'imported_invoice_line_ids/id','instance_id/id', 'cash_return_move_line_id/id']",MISSION,account.bank.statement.line,instance_id,Register Line / Account Move Line,Valid,,415 | 80 | msf_sync_data_server.register_line_account_move_line,TRUE,TRUE,FALSE,FALSE,bidirectional,Bidirectional-Private,"[('instance_id' , 'in' , ('msf.instance' , 'id' , [('level' , '=' , 'project')])),('statement_id','in',('account.bank.statement','id',[('state','!=','draft')])),'!',('state','=','draft')]","['direct_invoice_move_id/id', 'first_move_line_id/id', 'from_import_cheque_id/id', 'imported_invoice_line_ids/id','instance_id/id', 'cash_return_move_line_id/id']",MISSION,account.bank.statement.line,instance_id,Register Line / Account Move Line,Valid,,415 |
390 | @@ -181,7 +181,7 @@ | |||
391 | 181 | msf_usb_sync_data_server.cp_gl_journals_registers,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"['|',('type', '=', 'cash'),('type', '=', 'cheque')]","['bank_journal_id/id','analytic_journal_id/id', 'code', 'currency/id', 'default_credit_account_id/id', 'default_debit_account_id/id', 'name', 'type','instance_id/id']",USB,account.journal,,[MASTER] GL Journals - Registers,Valid,,1507 | 181 | msf_usb_sync_data_server.cp_gl_journals_registers,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"['|',('type', '=', 'cash'),('type', '=', 'cheque')]","['bank_journal_id/id','analytic_journal_id/id', 'code', 'currency/id', 'default_credit_account_id/id', 'default_debit_account_id/id', 'name', 'type','instance_id/id']",USB,account.journal,,[MASTER] GL Journals - Registers,Valid,,1507 |
392 | 182 | msf_usb_sync_data_server.cp_account_move_reconcile,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,[],"['name', 'type']",USB,account.move.reconcile,,[MASTER] Account Move Reconcile,Valid,,1510 | 182 | msf_usb_sync_data_server.cp_account_move_reconcile,TRUE,TRUE,TRUE,TRUE,cp_to_rw,Bidirectional,[],"['name', 'type']",USB,account.move.reconcile,,[MASTER] Account Move Reconcile,Valid,,1510 |
393 | 183 | msf_usb_sync_data_server.cp_account_move,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['date', 'document_date', 'imported', 'journal_id/id', 'name', 'narration', 'period_id/id', 'ref', 'statement_line_ids/id', 'to_check','instance_id/id','status','employee_id/id','transfer_journal_id/id','manual_currency_id/id','block_manual_currency_id','partner_id2/id','analytic_distribution_id/id']",USB,account.move,,[MASTER] Account Move,Valid,,1520 | 183 | msf_usb_sync_data_server.cp_account_move,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['date', 'document_date', 'imported', 'journal_id/id', 'name', 'narration', 'period_id/id', 'ref', 'statement_line_ids/id', 'to_check','instance_id/id','status','employee_id/id','transfer_journal_id/id','manual_currency_id/id','block_manual_currency_id','partner_id2/id','analytic_distribution_id/id']",USB,account.move,,[MASTER] Account Move,Valid,,1520 |
395 | 184 | msf_usb_sync_data_server.cp_account_move_line,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['account_id/id', 'accrual', 'analytic_account_id/id', 'analytic_distribution_id/id', 'blocked', 'cheque_number','corrected', 'credit', 'credit_currency', 'currency_id/id', 'date', 'date_created', 'date_maturity', 'debit', 'debit_currency', 'document_date', 'employee_id/id', 'have_an_historic', 'instance_id/id', 'is_addendum_line', 'is_counterpart', 'is_transfer_with_change', 'is_write_off', 'journal_id/id', 'last_cor_was_only_analytic', 'move_id/id', 'move_state', 'name', 'partner_id/id','partner_txt','period_id/id', 'reconcile_id/id', 'ref', 'reversal', 'source_date', 'statement_id/id', 'reference', 'state','transfer_journal_id/id', 'transfer_amount', 'is_downpayment', 'reconcile_date', 'unreconcile_date', 'unreconcile_txt']",USB,account.move.line,,[MASTER] Account Move Line,Valid,,1521 | 184 | msf_usb_sync_data_server.cp_account_move_line,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['account_id/id', 'accrual', 'analytic_account_id/id', 'analytic_distribution_id/id', 'blocked', 'cheque_number','corrected', 'credit', 'credit_currency', 'currency_id/id', 'date', 'date_created', 'date_maturity', 'debit', 'debit_currency', 'document_date', 'employee_id/id', 'have_an_historic', 'instance_id/id', 'is_addendum_line', 'is_counterpart', 'is_transfer_with_change', 'is_write_off', 'journal_id/id', 'last_cor_was_only_analytic', 'move_id/id', 'move_state', 'name', 'partner_id/id','partner_txt','period_id/id', 'reconcile_id/id', 'ref', 'reversal', 'source_date', 'statement_id/id', 'reference', 'state','transfer_journal_id/id', 'transfer_amount', 'is_downpayment', 'reconcile_date', 'unreconcile_date', 'unreconcile_txt', 'is_manually_corrected']",USB,account.move.line,,[MASTER] Account Move Line,Valid,,1521 |
396 | 185 | msf_usb_sync_data_server.cp_account_move_line_correction,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('move_id','in',('account.move','id',[('state','=','posted')]))]","['corrected_line_id/id', 'instance_id/id', 'reversal_line_id/id']",USB,account.move.line,,[MASTER] Account Move Line Correction,Valid,,1522 | 185 | msf_usb_sync_data_server.cp_account_move_line_correction,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('move_id','in',('account.move','id',[('state','=','posted')]))]","['corrected_line_id/id', 'instance_id/id', 'reversal_line_id/id']",USB,account.move.line,,[MASTER] Account Move Line Correction,Valid,,1522 |
397 | 186 | msf_usb_sync_data_server.cp_account_move_line_register_line,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['corrected_st_line_id/id', 'instance_id/id']",USB,account.move.line,,[MASTER] Account Move Line / Register Line,Valid,,1523 | 186 | msf_usb_sync_data_server.cp_account_move_line_register_line,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,[],"['corrected_st_line_id/id', 'instance_id/id']",USB,account.move.line,,[MASTER] Account Move Line / Register Line,Valid,,1523 |
398 | 187 | msf_usb_sync_data_server.cp_register_line_account_move_line,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('instance_id' , 'in' , ('msf.instance' , 'id' , [('level' , '=' , 'project')])),('statement_id','in',('account.bank.statement','id',[('state','!=','draft')])),'!',('state','=','draft')]","['first_move_line_id/id', 'instance_id/id']",USB,account.bank.statement.line,,[MASTER] Register Line / Account Move Line,Valid,,1530 | 187 | msf_usb_sync_data_server.cp_register_line_account_move_line,TRUE,TRUE,FALSE,TRUE,cp_to_rw,Bidirectional,"[('instance_id' , 'in' , ('msf.instance' , 'id' , [('level' , '=' , 'project')])),('statement_id','in',('account.bank.statement','id',[('state','!=','draft')])),'!',('state','=','draft')]","['first_move_line_id/id', 'instance_id/id']",USB,account.bank.statement.line,,[MASTER] Register Line / Account Move Line,Valid,,1530 |