Merge lp:~unifield-team/unifield-server/us-533 into lp:unifield-server
- us-533
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 3912 |
Proposed branch: | lp:~unifield-team/unifield-server/us-533 |
Merge into: | lp:unifield-server |
Diff against target: |
540 lines (+201/-28) 16 files modified
bin/addons/account/account_move_line.py (+3/-0) bin/addons/account/report/account_general_ledger.py (+41/-11) bin/addons/account/wizard/account_report_account_balance.py (+10/-1) bin/addons/account/wizard/account_report_account_balance_view.xml (+3/-0) bin/addons/account/wizard/account_report_general_ledger.py (+10/-4) bin/addons/account/wizard/account_report_general_ledger_view.xml (+3/-1) bin/addons/account_mcdb/account_mcdb.py (+10/-2) bin/addons/account_mcdb/account_mcdb_view.xml (+4/-2) bin/addons/account_mcdb/account_view.xml (+4/-1) bin/addons/account_mcdb/report/account_mcdb_export.py (+3/-1) bin/addons/account_mcdb/report/report_account_move_line.rml (+6/-0) bin/addons/account_mcdb/report/report_account_move_line_xls.mako (+10/-1) bin/addons/account_reconciliation/account.py (+4/-2) bin/addons/account_reconciliation/account_move_line.py (+59/-0) bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv (+2/-2) bin/addons/msf_tools/msf_tools.py (+29/-0) |
To merge this branch: | bzr merge lp:~unifield-team/unifield-server/us-533 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+302438@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_move_line.py' | |||
2 | --- bin/addons/account/account_move_line.py 2016-06-08 09:08:11 +0000 | |||
3 | +++ bin/addons/account/account_move_line.py 2016-08-09 15:43:17 +0000 | |||
4 | @@ -1135,6 +1135,9 @@ | |||
5 | 1135 | unlink_ids += part_rec_ids | 1135 | unlink_ids += part_rec_ids |
6 | 1136 | if unlink_ids: | 1136 | if unlink_ids: |
7 | 1137 | obj_move_rec.unlink(cr, uid, unlink_ids) | 1137 | obj_move_rec.unlink(cr, uid, unlink_ids) |
8 | 1138 | obj_move_line.write(cr, uid, move_ids, { | ||
9 | 1139 | 'reconcile_date': False, # US-533 reset reconcilation date | ||
10 | 1140 | }, context=context) | ||
11 | 1138 | return True | 1141 | return True |
12 | 1139 | 1142 | ||
13 | 1140 | def check_unlink(self, cr, uid, ids, context=None): | 1143 | def check_unlink(self, cr, uid, ids, context=None): |
14 | 1141 | 1144 | ||
15 | === modified file 'bin/addons/account/report/account_general_ledger.py' | |||
16 | --- bin/addons/account/report/account_general_ledger.py 2016-05-26 15:01:18 +0000 | |||
17 | +++ bin/addons/account/report/account_general_ledger.py 2016-08-09 15:43:17 +0000 | |||
18 | @@ -107,11 +107,33 @@ | |||
19 | 107 | self.title = _('Trial Balance') | 107 | self.title = _('Trial Balance') |
20 | 108 | 108 | ||
21 | 109 | self.account_ids = self._get_data_form(data, 'account_ids') or [] | 109 | self.account_ids = self._get_data_form(data, 'account_ids') or [] |
27 | 110 | # unreconciled: not reconciled or partial reconciled | 110 | |
28 | 111 | # (partial: reconcile_partia_id set vs reconcile_id) | 111 | # US-533 reconciled filter: |
29 | 112 | self.unreconciled_filter = \ | 112 | # decision matrix |
30 | 113 | self._get_data_form(data, 'unreconciled', False) \ | 113 | # http://jira.unifield.org/browse/US-533?focusedCommentId=50246&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50246 |
31 | 114 | and " AND reconcile_id is null AND a.reconcile='t'" or '' | 114 | reconcile_date = self._get_data_form(data, 'reconcile_date', False) |
32 | 115 | reconciled = self._get_data_form(data, 'reconciled', 'empty') | ||
33 | 116 | self.reconciled_filter = '' | ||
34 | 117 | if reconciled == 'empty': | ||
35 | 118 | # no reconcile criteria: get rid of reconcile date filter | ||
36 | 119 | if reconcile_date: | ||
37 | 120 | del data['form']['reconcile_date'] | ||
38 | 121 | reconcile_date = False | ||
39 | 122 | elif reconciled == 'no': | ||
40 | 123 | # reconcile 'No' filter: become reconciled since (day+1) | ||
41 | 124 | # or not reconciled (cases 6/9 of Jira comment matrix) | ||
42 | 125 | not_reconciled = "l.reconcile_id is null AND a.reconcile='t'" | ||
43 | 126 | if reconcile_date: | ||
44 | 127 | self.reconciled_filter = \ | ||
45 | 128 | " AND (l.reconcile_date > '%s' or (%s))" % ( | ||
46 | 129 | reconcile_date, not_reconciled, ) | ||
47 | 130 | else: | ||
48 | 131 | self.reconciled_filter = " AND %s" % (not_reconciled, ) | ||
49 | 132 | elif reconciled == 'yes': | ||
50 | 133 | self.reconciled_filter = " AND l.reconcile_id is not null" | ||
51 | 134 | if reconcile_date: | ||
52 | 135 | self.reconciled_filter += " AND l.reconcile_date <= '%s'" % ( | ||
53 | 136 | reconcile_date, ) | ||
54 | 115 | 137 | ||
55 | 116 | self.context['state'] = data['form']['target_move'] | 138 | self.context['state'] = data['form']['target_move'] |
56 | 117 | 139 | ||
57 | @@ -161,8 +183,8 @@ | |||
58 | 161 | self.cr, self.uid, self.account_ids) | 183 | self.cr, self.uid, self.account_ids) |
59 | 162 | 184 | ||
60 | 163 | query = self.query | 185 | query = self.query |
63 | 164 | if self.unreconciled_filter: | 186 | if self.reconciled_filter: |
64 | 165 | query += self.unreconciled_filter | 187 | query += self.reconciled_filter |
65 | 166 | 188 | ||
66 | 167 | move_states = [ 'posted', ] if self.target_move == 'posted' \ | 189 | move_states = [ 'posted', ] if self.target_move == 'posted' \ |
67 | 168 | else [ 'draft', 'posted', ] | 190 | else [ 'draft', 'posted', ] |
68 | @@ -171,7 +193,7 @@ | |||
69 | 171 | include_accounts=self.account_ids, | 193 | include_accounts=self.account_ids, |
70 | 172 | account_report_types=self.account_report_types, | 194 | account_report_types=self.account_report_types, |
71 | 173 | with_balance_only=self.display_account == 'bal_solde', | 195 | with_balance_only=self.display_account == 'bal_solde', |
73 | 174 | reconcile_filter=self.unreconciled_filter, | 196 | reconcile_filter=self.reconciled_filter, |
74 | 175 | context=used_context) | 197 | context=used_context) |
75 | 176 | 198 | ||
76 | 177 | return res | 199 | return res |
77 | @@ -248,7 +270,7 @@ | |||
78 | 248 | if node.is_zero \ | 270 | if node.is_zero \ |
79 | 249 | and (self.account_ids | 271 | and (self.account_ids |
80 | 250 | or self.account_report_types | 272 | or self.account_report_types |
82 | 251 | or self.unreconciled_filter | 273 | or self.reconciled_filter |
83 | 252 | or self.display_account == 'bal_movement'): | 274 | or self.display_account == 'bal_movement'): |
84 | 253 | # hide zero amounts for above filters on | 275 | # hide zero amounts for above filters on |
85 | 254 | # no movements <=> no amount | 276 | # no movements <=> no amount |
86 | @@ -332,7 +354,7 @@ | |||
87 | 332 | JOIN account_account a on (a.id=l.account_id) | 354 | JOIN account_account a on (a.id=l.account_id) |
88 | 333 | WHERE %s AND m.state IN %s AND l.account_id = %%s{{reconcile}} ORDER by %s | 355 | WHERE %s AND m.state IN %s AND l.account_id = %%s{{reconcile}} ORDER by %s |
89 | 334 | """ %(self.query, move_state_in, sql_sort) | 356 | """ %(self.query, move_state_in, sql_sort) |
91 | 335 | sql = sql.replace('{{reconcile}}', self.unreconciled_filter) | 357 | sql = sql.replace('{{reconcile}}', self.reconciled_filter) |
92 | 336 | self.cr.execute(sql, (account.id, )) | 358 | self.cr.execute(sql, (account.id, )) |
93 | 337 | res = self.cr.dictfetchall() | 359 | res = self.cr.dictfetchall() |
94 | 338 | else: | 360 | else: |
95 | @@ -417,6 +439,14 @@ | |||
96 | 417 | if line: | 439 | if line: |
97 | 418 | infos.append(line) | 440 | infos.append(line) |
98 | 419 | 441 | ||
99 | 442 | # reconcile / reconcile date | ||
100 | 443 | reconciled = self._get_data_form(data, 'reconciled') | ||
101 | 444 | if reconciled and reconciled != 'empty': | ||
102 | 445 | dt = self._get_data_form(data, 'reconcile_date') | ||
103 | 446 | if dt: | ||
104 | 447 | dt = ' ' + self.formatLang(dt, date=True) | ||
105 | 448 | infos.append(_("Reconcile %s%s") % (reconciled.title(), dt or '', )) | ||
106 | 449 | |||
107 | 420 | return infos and ", \n".join(infos) or _('No Filter') | 450 | return infos and ", \n".join(infos) or _('No Filter') |
108 | 421 | 451 | ||
109 | 422 | def _get_line_debit(self, line, booking=False): | 452 | def _get_line_debit(self, line, booking=False): |
110 | @@ -489,7 +519,7 @@ | |||
111 | 489 | 519 | ||
112 | 490 | # reconciled account | 520 | # reconciled account |
113 | 491 | info_data.append((_('Unreconciled'), | 521 | info_data.append((_('Unreconciled'), |
115 | 492 | self.unreconciled_filter and yes_str or no_str, )) | 522 | self.reconciled_filter and yes_str or no_str, )) |
116 | 493 | 523 | ||
117 | 494 | display_account = all_str | 524 | display_account = all_str |
118 | 495 | if 'display_account' in data['form']: | 525 | if 'display_account' in data['form']: |
119 | 496 | 526 | ||
120 | === modified file 'bin/addons/account/wizard/account_report_account_balance.py' | |||
121 | --- bin/addons/account/wizard/account_report_account_balance.py 2016-05-23 13:52:38 +0000 | |||
122 | +++ bin/addons/account/wizard/account_report_account_balance.py 2016-08-09 15:43:17 +0000 | |||
123 | @@ -39,6 +39,14 @@ | |||
124 | 39 | ('bl','Balance Sheet'), | 39 | ('bl','Balance Sheet'), |
125 | 40 | ], 'B/S / P&L account', required=True), | 40 | ], 'B/S / P&L account', required=True), |
126 | 41 | 41 | ||
127 | 42 | 'reconciled': fields.selection([ | ||
128 | 43 | ('empty', ''), | ||
129 | 44 | ('yes', 'Yes'), | ||
130 | 45 | ('no', 'No'), | ||
131 | 46 | ], "Reconciled", | ||
132 | 47 | help="filter will apply only on the B/S accounts except for the non reconciliable account like 10100 and 10200 which will never be displayed per details"), | ||
133 | 48 | 'reconcile_date': fields.date("At"), | ||
134 | 49 | |||
135 | 42 | 'account_ids': fields.many2many('account.account', | 50 | 'account_ids': fields.many2many('account.account', |
136 | 43 | 'account_report_general_ledger_account_account_rel', | 51 | 'account_report_general_ledger_account_account_rel', |
137 | 44 | 'report_id', 'account_id', 'Accounts'), | 52 | 'report_id', 'account_id', 'Accounts'), |
138 | @@ -58,6 +66,7 @@ | |||
139 | 58 | 'initial_balance': False, | 66 | 'initial_balance': False, |
140 | 59 | 'export_format': 'pdf', | 67 | 'export_format': 'pdf', |
141 | 60 | 'account_type': 'all', | 68 | 'account_type': 'all', |
142 | 69 | 'reconciled': 'empty', | ||
143 | 61 | 'journal_ids': _get_journals, | 70 | 'journal_ids': _get_journals, |
144 | 62 | 'display_account': 'bal_movement', # by default only result with JIs | 71 | 'display_account': 'bal_movement', # by default only result with JIs |
145 | 63 | } | 72 | } |
146 | @@ -86,7 +95,7 @@ | |||
147 | 86 | 95 | ||
148 | 87 | data['form']['initial_balance'] = False | 96 | data['form']['initial_balance'] = False |
149 | 88 | form_fields = [ 'initial_balance', 'instance_ids', 'export_format', | 97 | form_fields = [ 'initial_balance', 'instance_ids', 'export_format', |
151 | 89 | 'account_type', 'account_ids', ] | 98 | 'account_type', 'account_ids', 'reconciled', 'reconcile_date', ] |
152 | 90 | data['form'].update(self.read(cr, uid, ids, form_fields)[0]) | 99 | data['form'].update(self.read(cr, uid, ids, form_fields)[0]) |
153 | 91 | 100 | ||
154 | 92 | if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record | 101 | if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record |
155 | 93 | 102 | ||
156 | === modified file 'bin/addons/account/wizard/account_report_account_balance_view.xml' | |||
157 | --- bin/addons/account/wizard/account_report_account_balance_view.xml 2016-03-23 14:52:23 +0000 | |||
158 | +++ bin/addons/account/wizard/account_report_account_balance_view.xml 2016-08-09 15:43:17 +0000 | |||
159 | @@ -24,6 +24,9 @@ | |||
160 | 24 | <newline/> | 24 | <newline/> |
161 | 25 | <field name="account_type" /> | 25 | <field name="account_type" /> |
162 | 26 | <newline/> | 26 | <newline/> |
163 | 27 | <field name="reconciled" /> | ||
164 | 28 | <field name="reconcile_date" /> | ||
165 | 29 | <newline/> | ||
166 | 27 | <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]"> | 30 | <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]"> |
167 | 28 | <tree noteditable="1" editable="top" string="Proprietary Instances"> | 31 | <tree noteditable="1" editable="top" string="Proprietary Instances"> |
168 | 29 | <field name="code" /> | 32 | <field name="code" /> |
169 | 30 | 33 | ||
170 | === modified file 'bin/addons/account/wizard/account_report_general_ledger.py' | |||
171 | --- bin/addons/account/wizard/account_report_general_ledger.py 2016-05-26 15:01:18 +0000 | |||
172 | +++ bin/addons/account/wizard/account_report_general_ledger.py 2016-08-09 15:43:17 +0000 | |||
173 | @@ -54,8 +54,13 @@ | |||
174 | 54 | ('bl','Balance Sheet'), | 54 | ('bl','Balance Sheet'), |
175 | 55 | ], 'B/S / P&L account', required=True), | 55 | ], 'B/S / P&L account', required=True), |
176 | 56 | 56 | ||
179 | 57 | 'unreconciled': fields.boolean("Unreconciled", | 57 | 'reconciled': fields.selection([ |
180 | 58 | help="filter will apply only on the B/S accounts except for the non reconciliable account like 10100 and 10200 which will never be displayed per details"), | 58 | ('empty', ''), |
181 | 59 | ('yes', 'Yes'), | ||
182 | 60 | ('no', 'No'), | ||
183 | 61 | ], "Reconciled", | ||
184 | 62 | help="filter will apply only on the B/S accounts except for the non reconciliable account like 10100 and 10200 which will never be displayed per details"), | ||
185 | 63 | 'reconcile_date': fields.date("At"), | ||
186 | 59 | 64 | ||
187 | 60 | 'account_ids': fields.many2many('account.account', | 65 | 'account_ids': fields.many2many('account.account', |
188 | 61 | 'account_report_general_ledger_account_account_rel', | 66 | 'account_report_general_ledger_account_account_rel', |
189 | @@ -79,7 +84,7 @@ | |||
190 | 79 | 'export_format': 'pdf', | 84 | 'export_format': 'pdf', |
191 | 80 | 'journal_ids': _get_journals, # exclude extra-accounting journals from this report (IKD, ODX) | 85 | 'journal_ids': _get_journals, # exclude extra-accounting journals from this report (IKD, ODX) |
192 | 81 | 'account_type': 'all', | 86 | 'account_type': 'all', |
194 | 82 | 'unreconciled': False, | 87 | 'reconciled': 'empty', |
195 | 83 | 'is_initial_balance_available': False, # as no FY selection, not available by default US-926 point 7) | 88 | 'is_initial_balance_available': False, # as no FY selection, not available by default US-926 point 7) |
196 | 84 | 'display_account': 'bal_movement', # by default only result with JIs | 89 | 'display_account': 'bal_movement', # by default only result with JIs |
197 | 85 | } | 90 | } |
198 | @@ -163,7 +168,8 @@ | |||
199 | 163 | 168 | ||
200 | 164 | form_fields = [ 'initial_balance', 'amount_currency', 'sortby', | 169 | form_fields = [ 'initial_balance', 'amount_currency', 'sortby', |
201 | 165 | 'output_currency', 'instance_ids', 'export_format', | 170 | 'output_currency', 'instance_ids', 'export_format', |
203 | 166 | 'account_type', 'unreconciled', 'account_ids', ] | 171 | 'account_type', 'reconciled', 'reconcile_date', |
204 | 172 | 'account_ids', ] | ||
205 | 167 | data['form'].update(self.read(cr, uid, ids, form_fields)[0]) | 173 | data['form'].update(self.read(cr, uid, ids, form_fields)[0]) |
206 | 168 | 174 | ||
207 | 169 | # US-822: safe initial balance check box | 175 | # US-822: safe initial balance check box |
208 | 170 | 176 | ||
209 | === modified file 'bin/addons/account/wizard/account_report_general_ledger_view.xml' | |||
210 | --- bin/addons/account/wizard/account_report_general_ledger_view.xml 2016-03-23 14:52:23 +0000 | |||
211 | +++ bin/addons/account/wizard/account_report_general_ledger_view.xml 2016-08-09 15:43:17 +0000 | |||
212 | @@ -24,7 +24,9 @@ | |||
213 | 24 | <field name="amount_currency" invisible="1" /> | 24 | <field name="amount_currency" invisible="1" /> |
214 | 25 | <newline/> | 25 | <newline/> |
215 | 26 | <field name="account_type" /> | 26 | <field name="account_type" /> |
217 | 27 | <field name="unreconciled" /> | 27 | <newline/> |
218 | 28 | <field name="reconciled" /> | ||
219 | 29 | <field name="reconcile_date" /> | ||
220 | 28 | <newline/> | 30 | <newline/> |
221 | 29 | <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]"> | 31 | <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]"> |
222 | 30 | <tree noteditable="1" editable="top" string="Proprietary Instances"> | 32 | <tree noteditable="1" editable="top" string="Proprietary Instances"> |
223 | 31 | 33 | ||
224 | === modified file 'bin/addons/account_mcdb/account_mcdb.py' | |||
225 | --- bin/addons/account_mcdb/account_mcdb.py 2016-06-28 12:02:56 +0000 | |||
226 | +++ bin/addons/account_mcdb/account_mcdb.py 2016-08-09 15:43:17 +0000 | |||
227 | @@ -60,6 +60,7 @@ | |||
228 | 60 | 'account_type_ids': fields.many2many(obj='account.account.type', rel='account_account_type_mcdb', id1='mcdb_id', id2='account_type_id', | 60 | 'account_type_ids': fields.many2many(obj='account.account.type', rel='account_account_type_mcdb', id1='mcdb_id', id2='account_type_id', |
229 | 61 | string="Account type"), | 61 | string="Account type"), |
230 | 62 | 'reconcile_id': fields.many2one('account.move.reconcile', string="Reconcile Reference"), | 62 | 'reconcile_id': fields.many2one('account.move.reconcile', string="Reconcile Reference"), |
231 | 63 | 'reconcile_date': fields.date("Reconciled at"), | ||
232 | 63 | 'ref': fields.char(string='Reference', size=255), | 64 | 'ref': fields.char(string='Reference', size=255), |
233 | 64 | 'name': fields.char(string='Description', size=255), | 65 | 'name': fields.char(string='Description', size=255), |
234 | 65 | 'rev_account_ids': fields.boolean('Exclude account selection'), | 66 | 'rev_account_ids': fields.boolean('Exclude account selection'), |
235 | @@ -335,10 +336,17 @@ | |||
236 | 335 | # total or partial and override reconciled status | 336 | # total or partial and override reconciled status |
237 | 336 | domain.append(('reconcile_total_partial_id', '=', wiz.reconcile_id.id)) | 337 | domain.append(('reconcile_total_partial_id', '=', wiz.reconcile_id.id)) |
238 | 337 | elif wiz.reconciled: | 338 | elif wiz.reconciled: |
239 | 339 | # US-533: new search matrix | ||
240 | 340 | # http://jira.unifield.org/browse/US-533?focusedCommentId=50218&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50218 | ||
241 | 341 | # search always regarding FULL reconcile (is_reconciled do that) | ||
242 | 338 | if wiz.reconciled == 'reconciled': | 342 | if wiz.reconciled == 'reconciled': |
244 | 339 | domain.append(('reconcile_id', '!=', False)) # only full reconcile | 343 | domain.append(('is_reconciled', '=', True)) |
245 | 340 | elif wiz.reconciled == 'unreconciled': | 344 | elif wiz.reconciled == 'unreconciled': |
247 | 341 | domain.append(('reconcile_id', '=', False)) # partial or not reconcile (dont take care of reconcile_partial_id state) | 345 | domain.append(('is_reconciled', '=', False)) |
248 | 346 | if wiz.reconcile_date: | ||
249 | 347 | domain.append(('reconcile_date', '<=', wiz.reconcile_date)) | ||
250 | 348 | # note that for US-533 JI search is overrided in | ||
251 | 349 | # account_reconcile/account_move_line.py | ||
252 | 342 | 350 | ||
253 | 343 | # REALLOCATION field | 351 | # REALLOCATION field |
254 | 344 | if wiz.reallocated: | 352 | if wiz.reallocated: |
255 | 345 | 353 | ||
256 | === modified file 'bin/addons/account_mcdb/account_mcdb_view.xml' | |||
257 | --- bin/addons/account_mcdb/account_mcdb_view.xml 2016-05-30 07:12:04 +0000 | |||
258 | +++ bin/addons/account_mcdb/account_mcdb_view.xml 2016-08-09 15:43:17 +0000 | |||
259 | @@ -67,7 +67,9 @@ | |||
260 | 67 | &account; | 67 | &account; |
261 | 68 | <separator string="Reconciliation" colspan="4"/> | 68 | <separator string="Reconciliation" colspan="4"/> |
262 | 69 | <field name="reconciled"/> | 69 | <field name="reconciled"/> |
263 | 70 | <field name="reconcile_date" string="At"/> | ||
264 | 70 | <field name="reconcile_id"/> | 71 | <field name="reconcile_id"/> |
265 | 72 | |||
266 | 71 | ¤cy; | 73 | ¤cy; |
267 | 72 | <group colspan="4" col="6"> | 74 | <group colspan="4" col="6"> |
268 | 73 | <separator string="Third Party" colspan="6"/> | 75 | <separator string="Third Party" colspan="6"/> |
269 | @@ -342,7 +344,7 @@ | |||
270 | 342 | <field name="view_id" ref="account_mcdb_tree"/> | 344 | <field name="view_id" ref="account_mcdb_tree"/> |
271 | 343 | <field name="search_view_id" ref="account_mcdb_search"/> | 345 | <field name="search_view_id" ref="account_mcdb_search"/> |
272 | 344 | <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field> | 346 | <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field> |
274 | 345 | <field name="context">{'search_default_user': uid}</field> | 347 | <field name="context">{'search_default_user': uid, 'from_web_menu': True}</field> |
275 | 346 | </record> | 348 | </record> |
276 | 347 | 349 | ||
277 | 348 | <record id="action_account_mcdb_analytic" model="ir.actions.act_window"> | 350 | <record id="action_account_mcdb_analytic" model="ir.actions.act_window"> |
278 | @@ -365,7 +367,7 @@ | |||
279 | 365 | <field name="view_id" ref="account_mcdb_form"/> | 367 | <field name="view_id" ref="account_mcdb_form"/> |
280 | 366 | <field name="search_view_id" ref="account_mcdb_search"/> | 368 | <field name="search_view_id" ref="account_mcdb_search"/> |
281 | 367 | <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field> | 369 | <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field> |
283 | 368 | <field name="context">{'search_default_user': uid}</field> | 370 | <field name="context">{'search_default_user': uid, 'from_web_menu': True}</field> |
284 | 369 | </record> | 371 | </record> |
285 | 370 | 372 | ||
286 | 371 | <record id="action_account_mcdb_analytic_form" model="ir.actions.act_window"> | 373 | <record id="action_account_mcdb_analytic_form" model="ir.actions.act_window"> |
287 | 372 | 374 | ||
288 | === modified file 'bin/addons/account_mcdb/account_view.xml' | |||
289 | --- bin/addons/account_mcdb/account_view.xml 2016-05-26 13:18:50 +0000 | |||
290 | +++ bin/addons/account_mcdb/account_view.xml 2016-08-09 15:43:17 +0000 | |||
291 | @@ -161,9 +161,12 @@ | |||
292 | 161 | <field name="partner_id" select='1' string="3RD Party Partner"/> | 161 | <field name="partner_id" select='1' string="3RD Party Partner"/> |
293 | 162 | <field name="employee_id" select='1' string="3RD Party Employee"/> | 162 | <field name="employee_id" select='1' string="3RD Party Employee"/> |
294 | 163 | <field name="transfer_journal_id" select='1' string="3RD Party Journal" context="{'exclude_journals': ['IB']}"/> | 163 | <field name="transfer_journal_id" select='1' string="3RD Party Journal" context="{'exclude_journals': ['IB']}"/> |
295 | 164 | </group> | ||
296 | 165 | <newline/> | ||
297 | 166 | <group> | ||
298 | 164 | <field name="is_reconciled" select='1'/> | 167 | <field name="is_reconciled" select='1'/> |
299 | 165 | <field name="reconcile_total_partial_id" select='1'/> | 168 | <field name="reconcile_total_partial_id" select='1'/> |
301 | 166 | <newline/> | 169 | <field name="reconcile_date" select='1' string="At"/> |
302 | 167 | </group> | 170 | </group> |
303 | 168 | <newline/> | 171 | <newline/> |
304 | 169 | <group> | 172 | <group> |
305 | 170 | 173 | ||
306 | === modified file 'bin/addons/account_mcdb/report/account_mcdb_export.py' | |||
307 | --- bin/addons/account_mcdb/report/account_mcdb_export.py 2016-05-20 09:42:27 +0000 | |||
308 | +++ bin/addons/account_mcdb/report/account_mcdb_export.py 2016-08-09 15:43:17 +0000 | |||
309 | @@ -66,7 +66,7 @@ | |||
310 | 66 | head += [_('Func. Debit'), _('Func. Credit'), _('Func. Currency')] | 66 | head += [_('Func. Debit'), _('Func. Credit'), _('Func. Currency')] |
311 | 67 | else: | 67 | else: |
312 | 68 | head += [_('Output Debit'), _('Output Credit'), _('Output Currency')] | 68 | head += [_('Output Debit'), _('Output Credit'), _('Output Currency')] |
314 | 69 | head += [_('Reconcile'), _('State')] | 69 | head += [_('Reconcile'), _('Reconcile Date'), _('State')] |
315 | 70 | writer.writerow(map(lambda x: x.encode('utf-8'), head)) | 70 | writer.writerow(map(lambda x: x.encode('utf-8'), head)) |
316 | 71 | # Sort items | 71 | # Sort items |
317 | 72 | ids.sort() | 72 | ids.sort() |
318 | @@ -138,6 +138,8 @@ | |||
319 | 138 | csv_line.append(currency_name.encode('utf-8') or '') | 138 | csv_line.append(currency_name.encode('utf-8') or '') |
320 | 139 | #reconcile | 139 | #reconcile |
321 | 140 | csv_line.append(ml.reconcile_txt and ml.reconcile_txt.encode('utf-8') or '') | 140 | csv_line.append(ml.reconcile_txt and ml.reconcile_txt.encode('utf-8') or '') |
322 | 141 | #reconcile date US-533 | ||
323 | 142 | csv_line.append(ml.reconcile_date or '') | ||
324 | 141 | #state | 143 | #state |
325 | 142 | csv_line.append(field_sel(cr, uid, ml, 'move_state', context).encode('utf-8')) | 144 | csv_line.append(field_sel(cr, uid, ml, 'move_state', context).encode('utf-8')) |
326 | 143 | # Write line | 145 | # Write line |
327 | 144 | 146 | ||
328 | === modified file 'bin/addons/account_mcdb/report/report_account_move_line.rml' | |||
329 | --- bin/addons/account_mcdb/report/report_account_move_line.rml 2016-05-20 09:42:27 +0000 | |||
330 | +++ bin/addons/account_mcdb/report/report_account_move_line.rml 2016-08-09 15:43:17 +0000 | |||
331 | @@ -116,6 +116,9 @@ | |||
332 | 116 | <para style="P3">Reconcile</para> | 116 | <para style="P3">Reconcile</para> |
333 | 117 | </td> | 117 | </td> |
334 | 118 | <td> | 118 | <td> |
335 | 119 | <para style="P3">Reconcile Date</para> | ||
336 | 120 | </td> | ||
337 | 121 | <td> | ||
338 | 119 | <para style="P3">State</para> | 122 | <para style="P3">State</para> |
339 | 120 | </td> | 123 | </td> |
340 | 121 | </tr> | 124 | </tr> |
341 | @@ -173,6 +176,9 @@ | |||
342 | 173 | <para style="P3">[[ o.reconcile_txt and o.reconcile_txt or '' ]]</para> | 176 | <para style="P3">[[ o.reconcile_txt and o.reconcile_txt or '' ]]</para> |
343 | 174 | </td> | 177 | </td> |
344 | 175 | <td> | 178 | <td> |
345 | 179 | <para style="P3">[[ formatLang(o.reconcile_date, date=True) or '']]</para> | ||
346 | 180 | </td> | ||
347 | 181 | <td> | ||
348 | 176 | <para style="P3">[[ o.move_state and getSel(o, 'move_state') or '' ]]</para> | 182 | <para style="P3">[[ o.move_state and getSel(o, 'move_state') or '' ]]</para> |
349 | 177 | </td> | 183 | </td> |
350 | 178 | </tr> | 184 | </tr> |
351 | 179 | 185 | ||
352 | === modified file 'bin/addons/account_mcdb/report/report_account_move_line_xls.mako' | |||
353 | --- bin/addons/account_mcdb/report/report_account_move_line_xls.mako 2016-05-20 09:42:27 +0000 | |||
354 | +++ bin/addons/account_mcdb/report/report_account_move_line_xls.mako 2016-08-09 15:43:17 +0000 | |||
355 | @@ -55,7 +55,7 @@ | |||
356 | 55 | <Column ss:AutoFitWidth="1" ss:Width="70" /> | 55 | <Column ss:AutoFitWidth="1" ss:Width="70" /> |
357 | 56 | % endfor | 56 | % endfor |
358 | 57 | <Row> | 57 | <Row> |
360 | 58 | % for header in [_('Proprietary Instance'), _('Journal Code'), _('Entry Sequence'), _('Description'), _('Ref.'), _('Document Date'), _('Posting Date'), _('Period'), _('Account'), _('Third Party'), _('Book. Debit'), _('Book. Credit'), _('Book. Currency'), _('Output Debit'), _('Output Credit'), _('Output Currency'), _('Reconcile'), _('State')]: | 58 | % for header in [_('Proprietary Instance'), _('Journal Code'), _('Entry Sequence'), _('Description'), _('Ref.'), _('Document Date'), _('Posting Date'), _('Period'), _('Account'), _('Third Party'), _('Book. Debit'), _('Book. Credit'), _('Book. Currency'), _('Output Debit'), _('Output Credit'), _('Output Currency'), _('Reconcile'), _('Reconcile Date'), _('State')]: |
361 | 59 | <Cell ss:StyleID="ssH"><Data ss:Type="String">${header}</Data></Cell> | 59 | <Cell ss:StyleID="ssH"><Data ss:Type="String">${header}</Data></Cell> |
362 | 60 | % endfor | 60 | % endfor |
363 | 61 | </Row> | 61 | </Row> |
364 | @@ -124,6 +124,15 @@ | |||
365 | 124 | <Cell ss:StyleID="ssBorder"> | 124 | <Cell ss:StyleID="ssBorder"> |
366 | 125 | <Data ss:Type="String">${(o.reconcile_txt or '')|x}</Data> | 125 | <Data ss:Type="String">${(o.reconcile_txt or '')|x}</Data> |
367 | 126 | </Cell> | 126 | </Cell> |
368 | 127 | % if o.reconcile_date and o.reconcile_date != 'False': | ||
369 | 128 | <Cell ss:StyleID="ssBorderDate"> | ||
370 | 129 | <Data ss:Type="DateTime">${o.reconcile_date|n}T00:00:00</Data> | ||
371 | 130 | </Cell> | ||
372 | 131 | % else: | ||
373 | 132 | <Cell ss:StyleID="ssBorder"> | ||
374 | 133 | <Data ss:Type="String"> </Data> | ||
375 | 134 | </Cell> | ||
376 | 135 | % endif | ||
377 | 127 | <Cell ss:StyleID="ssBorder"> | 136 | <Cell ss:StyleID="ssBorder"> |
378 | 128 | <Data ss:Type="String">${(o.move_state and getSel(o,'move_state') or '')|x}</Data> | 137 | <Data ss:Type="String">${(o.move_state and getSel(o,'move_state') or '')|x}</Data> |
379 | 129 | </Cell> | 138 | </Cell> |
380 | 130 | 139 | ||
381 | === modified file 'bin/addons/account_reconciliation/account.py' | |||
382 | --- bin/addons/account_reconciliation/account.py 2011-11-28 09:29:51 +0000 | |||
383 | +++ bin/addons/account_reconciliation/account.py 2016-08-09 15:43:17 +0000 | |||
384 | @@ -38,8 +38,10 @@ | |||
385 | 38 | total += (line.debit_currency or 0.0) - (line.credit_currency or 0.0) | 38 | total += (line.debit_currency or 0.0) - (line.credit_currency or 0.0) |
386 | 39 | if not total: | 39 | if not total: |
387 | 40 | self.pool.get('account.move.line').write(cr, uid, | 40 | self.pool.get('account.move.line').write(cr, uid, |
390 | 41 | map(lambda x: x.id, rec.line_partial_ids), | 41 | map(lambda x: x.id, rec.line_partial_ids), { |
391 | 42 | {'reconcile_id': rec.id } | 42 | 'reconcile_id': rec.id, |
392 | 43 | 'reconcile_date': time.strftime('%Y-%m-%d'), # US-533 date of JI reconciliation | ||
393 | 44 | } | ||
394 | 43 | ) | 45 | ) |
395 | 44 | # @@@end | 46 | # @@@end |
396 | 45 | return True | 47 | return True |
397 | 46 | 48 | ||
398 | === modified file 'bin/addons/account_reconciliation/account_move_line.py' | |||
399 | --- bin/addons/account_reconciliation/account_move_line.py 2014-10-27 13:40:35 +0000 | |||
400 | +++ bin/addons/account_reconciliation/account_move_line.py 2016-08-09 15:43:17 +0000 | |||
401 | @@ -31,6 +31,54 @@ | |||
402 | 31 | class account_move_line(osv.osv): | 31 | class account_move_line(osv.osv): |
403 | 32 | _inherit = 'account.move.line' | 32 | _inherit = 'account.move.line' |
404 | 33 | _name = 'account.move.line' | 33 | _name = 'account.move.line' |
405 | 34 | |||
406 | 35 | _columns = { | ||
407 | 36 | 'reconcile_date': fields.date('Reconcile date', | ||
408 | 37 | help="Date of reconciliation"), | ||
409 | 38 | } | ||
410 | 39 | |||
411 | 40 | def search(self, cr, uid, args, offset=0, limit=None, order=None, | ||
412 | 41 | context=None, count=False): | ||
413 | 42 | if context is None: | ||
414 | 43 | context = {} | ||
415 | 44 | |||
416 | 45 | # US-533: to answer http://jira.unifield.org/browse/US-533?focusedCommentId=50218&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50218 | ||
417 | 46 | # always consider: | ||
418 | 47 | # 1) reconcile empty to cancel the reconcile date criteria | ||
419 | 48 | # 2) reconcile 'No' filter: become reconciled since (day+1) | ||
420 | 49 | # or not reconciled (cases 6/9 of Jira comment matrix) | ||
421 | 50 | if context.get('from_web_menu', True): | ||
422 | 51 | ft_obj = self.pool.get('fields.tools') | ||
423 | 52 | if ft_obj.domain_get_field_index(args, 'reconcile_date') >= 0: | ||
424 | 53 | is_reconciled_index = ft_obj.domain_get_field_index(args, | ||
425 | 54 | 'is_reconciled') | ||
426 | 55 | if is_reconciled_index < 0: | ||
427 | 56 | # 1) | ||
428 | 57 | args = ft_obj.domain_remove_field(args, 'reconcile_date') | ||
429 | 58 | else: | ||
430 | 59 | reconciled_date_index = ft_obj.domain_get_field_index(args, | ||
431 | 60 | 'reconcile_date') | ||
432 | 61 | if reconciled_date_index >= 0 \ | ||
433 | 62 | and args[is_reconciled_index][1] == '=' \ | ||
434 | 63 | and not args[is_reconciled_index][2]: | ||
435 | 64 | # 2) | ||
436 | 65 | reconcile_date = args[reconciled_date_index][2] | ||
437 | 66 | args = ft_obj.domain_remove_field(args, [ | ||
438 | 67 | 'is_reconciled', | ||
439 | 68 | 'reconcile_id', | ||
440 | 69 | 'reconcile_date', | ||
441 | 70 | ]) | ||
442 | 71 | domain = [ | ||
443 | 72 | '|', | ||
444 | 73 | ('reconcile_date', '>', reconcile_date), | ||
445 | 74 | ('reconcile_id', '=', False), | ||
446 | 75 | ('account_id.reconcile', '=', True), | ||
447 | 76 | ] | ||
448 | 77 | args = domain + args | ||
449 | 78 | |||
450 | 79 | return super(account_move_line, self).search(cr, uid, args, | ||
451 | 80 | offset=offset, limit=limit, order=order, context=context, | ||
452 | 81 | count=count) | ||
453 | 34 | 82 | ||
454 | 35 | def check_imported_invoice(self, cr, uid, ids, context=None): | 83 | def check_imported_invoice(self, cr, uid, ids, context=None): |
455 | 36 | """ | 84 | """ |
456 | @@ -119,6 +167,11 @@ | |||
457 | 119 | 'line_partial_ids': map(lambda x: (4,x,False), merges+unmerge), | 167 | 'line_partial_ids': map(lambda x: (4,x,False), merges+unmerge), |
458 | 120 | 'is_multi_instance': different_level, | 168 | 'is_multi_instance': different_level, |
459 | 121 | }) | 169 | }) |
460 | 170 | # US-533: date of JI reconciliation for line_partial_ids linked with | ||
461 | 171 | # above (4, 0) | ||
462 | 172 | self.pool.get('account.move.line').write(cr, uid, merges+unmerge, { | ||
463 | 173 | 'reconcile_date': time.strftime('%Y-%m-%d'), | ||
464 | 174 | }) | ||
465 | 122 | 175 | ||
466 | 123 | # UF-2011: synchronize move lines (not "marked" after reconcile creation) | 176 | # UF-2011: synchronize move lines (not "marked" after reconcile creation) |
467 | 124 | if self.pool.get('sync.client.orm_extended'): | 177 | if self.pool.get('sync.client.orm_extended'): |
468 | @@ -227,6 +280,12 @@ | |||
469 | 227 | 'multi_instance_level_creation': multi_instance_level_creation, | 280 | 'multi_instance_level_creation': multi_instance_level_creation, |
470 | 228 | }) | 281 | }) |
471 | 229 | 282 | ||
472 | 283 | # US-533: date of JI reconciliation for total reconciliation linked | ||
473 | 284 | # with above (4, 0) | ||
474 | 285 | self.pool.get('account.move.line').write(cr, uid, ids, { | ||
475 | 286 | 'reconcile_date': time.strftime('%Y-%m-%d'), | ||
476 | 287 | }) | ||
477 | 288 | |||
478 | 230 | # UF-2011: synchronize move lines (not "marked" after reconcile creation) | 289 | # UF-2011: synchronize move lines (not "marked" after reconcile creation) |
479 | 231 | if self.pool.get('sync.client.orm_extended'): | 290 | if self.pool.get('sync.client.orm_extended'): |
480 | 232 | self.pool.get('account.move.line').synchronize(cr, uid, ids, context=context) | 291 | self.pool.get('account.move.line').synchronize(cr, uid, ids, context=context) |
481 | 233 | 292 | ||
482 | === modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv' | |||
483 | --- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2016-07-12 09:57:48 +0000 | |||
484 | +++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2016-08-09 15:43:17 +0000 | |||
485 | @@ -70,7 +70,7 @@ | |||
486 | 70 | msf_sync_data_server.account_move_reconcile,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,[],"['name', 'type', 'is_multi_instance', 'multi_instance_level_creation', 'instance_id']",OC,account.move.reconcile,,Account Move Reconcile,Valid,,410 | 70 | msf_sync_data_server.account_move_reconcile,TRUE,TRUE,TRUE,FALSE,bidirectional,Bidirectional,[],"['name', 'type', 'is_multi_instance', 'multi_instance_level_creation', 'instance_id']",OC,account.move.reconcile,,Account Move Reconcile,Valid,,410 |
487 | 71 | 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 | 71 | 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 |
488 | 72 | 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']",OC,account.move,instance_id,Account Move,Valid,,411 | 72 | 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']",OC,account.move,instance_id,Account Move,Valid,,411 |
490 | 73 | 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']",OC,account.move.line,instance_id,Account Move Line,Valid,,412 | 73 | 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']",OC,account.move.line,instance_id,Account Move Line,Valid,,412 |
491 | 74 | 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']",OC,account.move.line,instance_id,Account Move Line Correction,Valid,,413 | 74 | 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']",OC,account.move.line,instance_id,Account Move Line Correction,Valid,,413 |
492 | 75 | 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 | 75 | 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 |
493 | 76 | 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 | 76 | 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 |
494 | @@ -177,7 +177,7 @@ | |||
495 | 177 | 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 | 177 | 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 |
496 | 178 | 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 | 178 | 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 |
497 | 179 | 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 | 179 | 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 |
499 | 180 | 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']",USB,account.move.line,,[MASTER] Account Move Line,Valid,,1521 | 180 | 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']",USB,account.move.line,,[MASTER] Account Move Line,Valid,,1521 |
500 | 181 | 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 | 181 | 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 |
501 | 182 | 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 | 182 | 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 |
502 | 183 | 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 | 183 | 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 |
503 | 184 | 184 | ||
504 | === modified file 'bin/addons/msf_tools/msf_tools.py' | |||
505 | --- bin/addons/msf_tools/msf_tools.py 2016-07-05 14:43:42 +0000 | |||
506 | +++ bin/addons/msf_tools/msf_tools.py 2016-08-09 15:43:17 +0000 | |||
507 | @@ -226,6 +226,35 @@ | |||
508 | 226 | tpl_drop_const = "alter table %s drop constraint %s" % sql_params | 226 | tpl_drop_const = "alter table %s drop constraint %s" % sql_params |
509 | 227 | cr.execute(tpl_drop_const) | 227 | cr.execute(tpl_drop_const) |
510 | 228 | 228 | ||
511 | 229 | def domain_get_field_index(self, domain, field_name): | ||
512 | 230 | """ | ||
513 | 231 | get field tuple index in domain | ||
514 | 232 | :return: index or < 0 if not found | ||
515 | 233 | :rtype: int | ||
516 | 234 | """ | ||
517 | 235 | index = 0 | ||
518 | 236 | if domain: | ||
519 | 237 | for t in domain: | ||
520 | 238 | if t[0] == field_name: | ||
521 | 239 | return index | ||
522 | 240 | index += 1 | ||
523 | 241 | return -1 | ||
524 | 242 | |||
525 | 243 | def domain_remove_field(self, domain, field_names): | ||
526 | 244 | """ | ||
527 | 245 | remove field(s) tuple(s) in domain | ||
528 | 246 | :param field_names: field(s) to remove | ||
529 | 247 | :type field_names: str/list/tuple | ||
530 | 248 | :return: new domain | ||
531 | 249 | """ | ||
532 | 250 | if not isinstance(field_names, (list, tuple, )): | ||
533 | 251 | field_names = [ field_names, ] | ||
534 | 252 | res = [] | ||
535 | 253 | for t in domain: | ||
536 | 254 | if t[0] not in field_names: | ||
537 | 255 | res.append(t) | ||
538 | 256 | return res | ||
539 | 257 | |||
540 | 229 | fields_tools() | 258 | fields_tools() |
541 | 230 | 259 | ||
542 | 231 | 260 |