Merge lp:~unifield-team/unifield-server/us-533 into lp:unifield-server

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
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+302438@code.launchpad.net
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
=== modified file 'bin/addons/account/account_move_line.py'
--- bin/addons/account/account_move_line.py 2016-06-08 09:08:11 +0000
+++ bin/addons/account/account_move_line.py 2016-08-09 15:43:17 +0000
@@ -1135,6 +1135,9 @@
1135 unlink_ids += part_rec_ids1135 unlink_ids += part_rec_ids
1136 if unlink_ids:1136 if unlink_ids:
1137 obj_move_rec.unlink(cr, uid, unlink_ids)1137 obj_move_rec.unlink(cr, uid, unlink_ids)
1138 obj_move_line.write(cr, uid, move_ids, {
1139 'reconcile_date': False, # US-533 reset reconcilation date
1140 }, context=context)
1138 return True1141 return True
11391142
1140 def check_unlink(self, cr, uid, ids, context=None):1143 def check_unlink(self, cr, uid, ids, context=None):
11411144
=== modified file 'bin/addons/account/report/account_general_ledger.py'
--- bin/addons/account/report/account_general_ledger.py 2016-05-26 15:01:18 +0000
+++ bin/addons/account/report/account_general_ledger.py 2016-08-09 15:43:17 +0000
@@ -107,11 +107,33 @@
107 self.title = _('Trial Balance')107 self.title = _('Trial Balance')
108108
109 self.account_ids = self._get_data_form(data, 'account_ids') or []109 self.account_ids = self._get_data_form(data, 'account_ids') or []
110 # unreconciled: not reconciled or partial reconciled110
111 # (partial: reconcile_partia_id set vs reconcile_id)111 # US-533 reconciled filter:
112 self.unreconciled_filter = \112 # decision matrix
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
114 and " AND reconcile_id is null AND a.reconcile='t'" or ''114 reconcile_date = self._get_data_form(data, 'reconcile_date', False)
115 reconciled = self._get_data_form(data, 'reconciled', 'empty')
116 self.reconciled_filter = ''
117 if reconciled == 'empty':
118 # no reconcile criteria: get rid of reconcile date filter
119 if reconcile_date:
120 del data['form']['reconcile_date']
121 reconcile_date = False
122 elif reconciled == 'no':
123 # reconcile 'No' filter: become reconciled since (day+1)
124 # or not reconciled (cases 6/9 of Jira comment matrix)
125 not_reconciled = "l.reconcile_id is null AND a.reconcile='t'"
126 if reconcile_date:
127 self.reconciled_filter = \
128 " AND (l.reconcile_date > '%s' or (%s))" % (
129 reconcile_date, not_reconciled, )
130 else:
131 self.reconciled_filter = " AND %s" % (not_reconciled, )
132 elif reconciled == 'yes':
133 self.reconciled_filter = " AND l.reconcile_id is not null"
134 if reconcile_date:
135 self.reconciled_filter += " AND l.reconcile_date <= '%s'" % (
136 reconcile_date, )
115137
116 self.context['state'] = data['form']['target_move']138 self.context['state'] = data['form']['target_move']
117139
@@ -161,8 +183,8 @@
161 self.cr, self.uid, self.account_ids)183 self.cr, self.uid, self.account_ids)
162184
163 query = self.query185 query = self.query
164 if self.unreconciled_filter:186 if self.reconciled_filter:
165 query += self.unreconciled_filter187 query += self.reconciled_filter
166188
167 move_states = [ 'posted', ] if self.target_move == 'posted' \189 move_states = [ 'posted', ] if self.target_move == 'posted' \
168 else [ 'draft', 'posted', ]190 else [ 'draft', 'posted', ]
@@ -171,7 +193,7 @@
171 include_accounts=self.account_ids,193 include_accounts=self.account_ids,
172 account_report_types=self.account_report_types,194 account_report_types=self.account_report_types,
173 with_balance_only=self.display_account == 'bal_solde',195 with_balance_only=self.display_account == 'bal_solde',
174 reconcile_filter=self.unreconciled_filter,196 reconcile_filter=self.reconciled_filter,
175 context=used_context)197 context=used_context)
176198
177 return res199 return res
@@ -248,7 +270,7 @@
248 if node.is_zero \270 if node.is_zero \
249 and (self.account_ids271 and (self.account_ids
250 or self.account_report_types272 or self.account_report_types
251 or self.unreconciled_filter273 or self.reconciled_filter
252 or self.display_account == 'bal_movement'):274 or self.display_account == 'bal_movement'):
253 # hide zero amounts for above filters on275 # hide zero amounts for above filters on
254 # no movements <=> no amount276 # no movements <=> no amount
@@ -332,7 +354,7 @@
332 JOIN account_account a on (a.id=l.account_id)354 JOIN account_account a on (a.id=l.account_id)
333 WHERE %s AND m.state IN %s AND l.account_id = %%s{{reconcile}} ORDER by %s355 WHERE %s AND m.state IN %s AND l.account_id = %%s{{reconcile}} ORDER by %s
334 """ %(self.query, move_state_in, sql_sort)356 """ %(self.query, move_state_in, sql_sort)
335 sql = sql.replace('{{reconcile}}', self.unreconciled_filter)357 sql = sql.replace('{{reconcile}}', self.reconciled_filter)
336 self.cr.execute(sql, (account.id, ))358 self.cr.execute(sql, (account.id, ))
337 res = self.cr.dictfetchall()359 res = self.cr.dictfetchall()
338 else:360 else:
@@ -417,6 +439,14 @@
417 if line:439 if line:
418 infos.append(line)440 infos.append(line)
419441
442 # reconcile / reconcile date
443 reconciled = self._get_data_form(data, 'reconciled')
444 if reconciled and reconciled != 'empty':
445 dt = self._get_data_form(data, 'reconcile_date')
446 if dt:
447 dt = ' ' + self.formatLang(dt, date=True)
448 infos.append(_("Reconcile %s%s") % (reconciled.title(), dt or '', ))
449
420 return infos and ", \n".join(infos) or _('No Filter')450 return infos and ", \n".join(infos) or _('No Filter')
421451
422 def _get_line_debit(self, line, booking=False):452 def _get_line_debit(self, line, booking=False):
@@ -489,7 +519,7 @@
489519
490 # reconciled account520 # reconciled account
491 info_data.append((_('Unreconciled'),521 info_data.append((_('Unreconciled'),
492 self.unreconciled_filter and yes_str or no_str, ))522 self.reconciled_filter and yes_str or no_str, ))
493523
494 display_account = all_str524 display_account = all_str
495 if 'display_account' in data['form']:525 if 'display_account' in data['form']:
496526
=== modified file 'bin/addons/account/wizard/account_report_account_balance.py'
--- bin/addons/account/wizard/account_report_account_balance.py 2016-05-23 13:52:38 +0000
+++ bin/addons/account/wizard/account_report_account_balance.py 2016-08-09 15:43:17 +0000
@@ -39,6 +39,14 @@
39 ('bl','Balance Sheet'),39 ('bl','Balance Sheet'),
40 ], 'B/S / P&L account', required=True),40 ], 'B/S / P&L account', required=True),
4141
42 'reconciled': fields.selection([
43 ('empty', ''),
44 ('yes', 'Yes'),
45 ('no', 'No'),
46 ], "Reconciled",
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"),
48 'reconcile_date': fields.date("At"),
49
42 'account_ids': fields.many2many('account.account',50 'account_ids': fields.many2many('account.account',
43 'account_report_general_ledger_account_account_rel',51 'account_report_general_ledger_account_account_rel',
44 'report_id', 'account_id', 'Accounts'),52 'report_id', 'account_id', 'Accounts'),
@@ -58,6 +66,7 @@
58 'initial_balance': False,66 'initial_balance': False,
59 'export_format': 'pdf',67 'export_format': 'pdf',
60 'account_type': 'all',68 'account_type': 'all',
69 'reconciled': 'empty',
61 'journal_ids': _get_journals,70 'journal_ids': _get_journals,
62 'display_account': 'bal_movement', # by default only result with JIs71 'display_account': 'bal_movement', # by default only result with JIs
63 }72 }
@@ -86,7 +95,7 @@
8695
87 data['form']['initial_balance'] = False96 data['form']['initial_balance'] = False
88 form_fields = [ 'initial_balance', 'instance_ids', 'export_format',97 form_fields = [ 'initial_balance', 'instance_ids', 'export_format',
89 'account_type', 'account_ids', ]98 'account_type', 'account_ids', 'reconciled', 'reconcile_date', ]
90 data['form'].update(self.read(cr, uid, ids, form_fields)[0])99 data['form'].update(self.read(cr, uid, ids, form_fields)[0])
91100
92 if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record101 if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record
93102
=== modified file 'bin/addons/account/wizard/account_report_account_balance_view.xml'
--- bin/addons/account/wizard/account_report_account_balance_view.xml 2016-03-23 14:52:23 +0000
+++ bin/addons/account/wizard/account_report_account_balance_view.xml 2016-08-09 15:43:17 +0000
@@ -24,6 +24,9 @@
24 <newline/>24 <newline/>
25 <field name="account_type" />25 <field name="account_type" />
26 <newline/>26 <newline/>
27 <field name="reconciled" />
28 <field name="reconcile_date" />
29 <newline/>
27 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">30 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">
28 <tree noteditable="1" editable="top" string="Proprietary Instances">31 <tree noteditable="1" editable="top" string="Proprietary Instances">
29 <field name="code" />32 <field name="code" />
3033
=== modified file 'bin/addons/account/wizard/account_report_general_ledger.py'
--- bin/addons/account/wizard/account_report_general_ledger.py 2016-05-26 15:01:18 +0000
+++ bin/addons/account/wizard/account_report_general_ledger.py 2016-08-09 15:43:17 +0000
@@ -54,8 +54,13 @@
54 ('bl','Balance Sheet'),54 ('bl','Balance Sheet'),
55 ], 'B/S / P&L account', required=True),55 ], 'B/S / P&L account', required=True),
5656
57 'unreconciled': fields.boolean("Unreconciled",57 'reconciled': fields.selection([
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', ''),
59 ('yes', 'Yes'),
60 ('no', 'No'),
61 ], "Reconciled",
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"),
63 'reconcile_date': fields.date("At"),
5964
60 'account_ids': fields.many2many('account.account',65 'account_ids': fields.many2many('account.account',
61 'account_report_general_ledger_account_account_rel',66 'account_report_general_ledger_account_account_rel',
@@ -79,7 +84,7 @@
79 'export_format': 'pdf',84 'export_format': 'pdf',
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)
81 'account_type': 'all',86 'account_type': 'all',
82 'unreconciled': False,87 'reconciled': 'empty',
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)
84 'display_account': 'bal_movement', # by default only result with JIs89 'display_account': 'bal_movement', # by default only result with JIs
85 }90 }
@@ -163,7 +168,8 @@
163168
164 form_fields = [ 'initial_balance', 'amount_currency', 'sortby',169 form_fields = [ 'initial_balance', 'amount_currency', 'sortby',
165 'output_currency', 'instance_ids', 'export_format',170 'output_currency', 'instance_ids', 'export_format',
166 'account_type', 'unreconciled', 'account_ids', ]171 'account_type', 'reconciled', 'reconcile_date',
172 'account_ids', ]
167 data['form'].update(self.read(cr, uid, ids, form_fields)[0])173 data['form'].update(self.read(cr, uid, ids, form_fields)[0])
168174
169 # US-822: safe initial balance check box175 # US-822: safe initial balance check box
170176
=== modified file 'bin/addons/account/wizard/account_report_general_ledger_view.xml'
--- bin/addons/account/wizard/account_report_general_ledger_view.xml 2016-03-23 14:52:23 +0000
+++ bin/addons/account/wizard/account_report_general_ledger_view.xml 2016-08-09 15:43:17 +0000
@@ -24,7 +24,9 @@
24 <field name="amount_currency" invisible="1" />24 <field name="amount_currency" invisible="1" />
25 <newline/>25 <newline/>
26 <field name="account_type" />26 <field name="account_type" />
27 <field name="unreconciled" />27 <newline/>
28 <field name="reconciled" />
29 <field name="reconcile_date" />
28 <newline/>30 <newline/>
29 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">31 <field name="instance_ids" domain="[('instance_to_display_ids','=',True)]">
30 <tree noteditable="1" editable="top" string="Proprietary Instances">32 <tree noteditable="1" editable="top" string="Proprietary Instances">
3133
=== modified file 'bin/addons/account_mcdb/account_mcdb.py'
--- bin/addons/account_mcdb/account_mcdb.py 2016-06-28 12:02:56 +0000
+++ bin/addons/account_mcdb/account_mcdb.py 2016-08-09 15:43:17 +0000
@@ -60,6 +60,7 @@
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',
61 string="Account type"),61 string="Account type"),
62 'reconcile_id': fields.many2one('account.move.reconcile', string="Reconcile Reference"),62 'reconcile_id': fields.many2one('account.move.reconcile', string="Reconcile Reference"),
63 'reconcile_date': fields.date("Reconciled at"),
63 'ref': fields.char(string='Reference', size=255),64 'ref': fields.char(string='Reference', size=255),
64 'name': fields.char(string='Description', size=255),65 'name': fields.char(string='Description', size=255),
65 'rev_account_ids': fields.boolean('Exclude account selection'),66 'rev_account_ids': fields.boolean('Exclude account selection'),
@@ -335,10 +336,17 @@
335 # total or partial and override reconciled status336 # total or partial and override reconciled status
336 domain.append(('reconcile_total_partial_id', '=', wiz.reconcile_id.id))337 domain.append(('reconcile_total_partial_id', '=', wiz.reconcile_id.id))
337 elif wiz.reconciled:338 elif wiz.reconciled:
339 # US-533: new search matrix
340 # http://jira.unifield.org/browse/US-533?focusedCommentId=50218&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-50218
341 # search always regarding FULL reconcile (is_reconciled do that)
338 if wiz.reconciled == 'reconciled':342 if wiz.reconciled == 'reconciled':
339 domain.append(('reconcile_id', '!=', False)) # only full reconcile343 domain.append(('is_reconciled', '=', True))
340 elif wiz.reconciled == 'unreconciled':344 elif wiz.reconciled == 'unreconciled':
341 domain.append(('reconcile_id', '=', False)) # partial or not reconcile (dont take care of reconcile_partial_id state)345 domain.append(('is_reconciled', '=', False))
346 if wiz.reconcile_date:
347 domain.append(('reconcile_date', '<=', wiz.reconcile_date))
348 # note that for US-533 JI search is overrided in
349 # account_reconcile/account_move_line.py
342350
343 # REALLOCATION field351 # REALLOCATION field
344 if wiz.reallocated:352 if wiz.reallocated:
345353
=== modified file 'bin/addons/account_mcdb/account_mcdb_view.xml'
--- bin/addons/account_mcdb/account_mcdb_view.xml 2016-05-30 07:12:04 +0000
+++ bin/addons/account_mcdb/account_mcdb_view.xml 2016-08-09 15:43:17 +0000
@@ -67,7 +67,9 @@
67 &account;67 &account;
68 <separator string="Reconciliation" colspan="4"/>68 <separator string="Reconciliation" colspan="4"/>
69 <field name="reconciled"/>69 <field name="reconciled"/>
70 <field name="reconcile_date" string="At"/>
70 <field name="reconcile_id"/>71 <field name="reconcile_id"/>
72
71 &currency;73 &currency;
72 <group colspan="4" col="6">74 <group colspan="4" col="6">
73 <separator string="Third Party" colspan="6"/>75 <separator string="Third Party" colspan="6"/>
@@ -342,7 +344,7 @@
342 <field name="view_id" ref="account_mcdb_tree"/>344 <field name="view_id" ref="account_mcdb_tree"/>
343 <field name="search_view_id" ref="account_mcdb_search"/>345 <field name="search_view_id" ref="account_mcdb_search"/>
344 <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field>346 <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field>
345 <field name="context">{'search_default_user': uid}</field>347 <field name="context">{'search_default_user': uid, 'from_web_menu': True}</field>
346 </record>348 </record>
347349
348 <record id="action_account_mcdb_analytic" model="ir.actions.act_window">350 <record id="action_account_mcdb_analytic" model="ir.actions.act_window">
@@ -365,7 +367,7 @@
365 <field name="view_id" ref="account_mcdb_form"/>367 <field name="view_id" ref="account_mcdb_form"/>
366 <field name="search_view_id" ref="account_mcdb_search"/>368 <field name="search_view_id" ref="account_mcdb_search"/>
367 <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field>369 <field name="domain">[('description', '!=', False), ('model', '=', 'account.move.line')]</field>
368 <field name="context">{'search_default_user': uid}</field>370 <field name="context">{'search_default_user': uid, 'from_web_menu': True}</field>
369 </record>371 </record>
370372
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">
372374
=== modified file 'bin/addons/account_mcdb/account_view.xml'
--- bin/addons/account_mcdb/account_view.xml 2016-05-26 13:18:50 +0000
+++ bin/addons/account_mcdb/account_view.xml 2016-08-09 15:43:17 +0000
@@ -161,9 +161,12 @@
161 <field name="partner_id" select='1' string="3RD Party Partner"/>161 <field name="partner_id" select='1' string="3RD Party Partner"/>
162 <field name="employee_id" select='1' string="3RD Party Employee"/>162 <field name="employee_id" select='1' string="3RD Party Employee"/>
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']}"/>
164 </group>
165 <newline/>
166 <group>
164 <field name="is_reconciled" select='1'/>167 <field name="is_reconciled" select='1'/>
165 <field name="reconcile_total_partial_id" select='1'/>168 <field name="reconcile_total_partial_id" select='1'/>
166 <newline/>169 <field name="reconcile_date" select='1' string="At"/>
167 </group>170 </group>
168 <newline/>171 <newline/>
169 <group>172 <group>
170173
=== modified file 'bin/addons/account_mcdb/report/account_mcdb_export.py'
--- bin/addons/account_mcdb/report/account_mcdb_export.py 2016-05-20 09:42:27 +0000
+++ bin/addons/account_mcdb/report/account_mcdb_export.py 2016-08-09 15:43:17 +0000
@@ -66,7 +66,7 @@
66 head += [_('Func. Debit'), _('Func. Credit'), _('Func. Currency')]66 head += [_('Func. Debit'), _('Func. Credit'), _('Func. Currency')]
67 else:67 else:
68 head += [_('Output Debit'), _('Output Credit'), _('Output Currency')]68 head += [_('Output Debit'), _('Output Credit'), _('Output Currency')]
69 head += [_('Reconcile'), _('State')]69 head += [_('Reconcile'), _('Reconcile Date'), _('State')]
70 writer.writerow(map(lambda x: x.encode('utf-8'), head))70 writer.writerow(map(lambda x: x.encode('utf-8'), head))
71 # Sort items71 # Sort items
72 ids.sort()72 ids.sort()
@@ -138,6 +138,8 @@
138 csv_line.append(currency_name.encode('utf-8') or '')138 csv_line.append(currency_name.encode('utf-8') or '')
139 #reconcile139 #reconcile
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 '')
141 #reconcile date US-533
142 csv_line.append(ml.reconcile_date or '')
141 #state143 #state
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'))
143 # Write line145 # Write line
144146
=== modified file 'bin/addons/account_mcdb/report/report_account_move_line.rml'
--- bin/addons/account_mcdb/report/report_account_move_line.rml 2016-05-20 09:42:27 +0000
+++ bin/addons/account_mcdb/report/report_account_move_line.rml 2016-08-09 15:43:17 +0000
@@ -116,6 +116,9 @@
116 <para style="P3">Reconcile</para>116 <para style="P3">Reconcile</para>
117 </td>117 </td>
118 <td>118 <td>
119 <para style="P3">Reconcile Date</para>
120 </td>
121 <td>
119 <para style="P3">State</para>122 <para style="P3">State</para>
120 </td>123 </td>
121 </tr>124 </tr>
@@ -173,6 +176,9 @@
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>
174 </td>177 </td>
175 <td>178 <td>
179 <para style="P3">[[ formatLang(o.reconcile_date, date=True) or '']]</para>
180 </td>
181 <td>
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>
177 </td>183 </td>
178 </tr>184 </tr>
179185
=== modified file 'bin/addons/account_mcdb/report/report_account_move_line_xls.mako'
--- bin/addons/account_mcdb/report/report_account_move_line_xls.mako 2016-05-20 09:42:27 +0000
+++ bin/addons/account_mcdb/report/report_account_move_line_xls.mako 2016-08-09 15:43:17 +0000
@@ -55,7 +55,7 @@
55<Column ss:AutoFitWidth="1" ss:Width="70" />55<Column ss:AutoFitWidth="1" ss:Width="70" />
56% endfor56% endfor
57<Row>57<Row>
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')]:
59<Cell ss:StyleID="ssH"><Data ss:Type="String">${header}</Data></Cell>59<Cell ss:StyleID="ssH"><Data ss:Type="String">${header}</Data></Cell>
60% endfor60% endfor
61</Row>61</Row>
@@ -124,6 +124,15 @@
124<Cell ss:StyleID="ssBorder">124<Cell ss:StyleID="ssBorder">
125 <Data ss:Type="String">${(o.reconcile_txt or '')|x}</Data>125 <Data ss:Type="String">${(o.reconcile_txt or '')|x}</Data>
126</Cell>126</Cell>
127% if o.reconcile_date and o.reconcile_date != 'False':
128<Cell ss:StyleID="ssBorderDate">
129 <Data ss:Type="DateTime">${o.reconcile_date|n}T00:00:00</Data>
130</Cell>
131% else:
132<Cell ss:StyleID="ssBorder">
133 <Data ss:Type="String"> </Data>
134</Cell>
135% endif
127<Cell ss:StyleID="ssBorder">136<Cell ss:StyleID="ssBorder">
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>
129</Cell>138</Cell>
130139
=== modified file 'bin/addons/account_reconciliation/account.py'
--- bin/addons/account_reconciliation/account.py 2011-11-28 09:29:51 +0000
+++ bin/addons/account_reconciliation/account.py 2016-08-09 15:43:17 +0000
@@ -38,8 +38,10 @@
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)
39 if not total:39 if not total:
40 self.pool.get('account.move.line').write(cr, uid,40 self.pool.get('account.move.line').write(cr, uid,
41 map(lambda x: x.id, rec.line_partial_ids),41 map(lambda x: x.id, rec.line_partial_ids), {
42 {'reconcile_id': rec.id }42 'reconcile_id': rec.id,
43 'reconcile_date': time.strftime('%Y-%m-%d'), # US-533 date of JI reconciliation
44 }
43 )45 )
44 # @@@end46 # @@@end
45 return True47 return True
4648
=== modified file 'bin/addons/account_reconciliation/account_move_line.py'
--- bin/addons/account_reconciliation/account_move_line.py 2014-10-27 13:40:35 +0000
+++ bin/addons/account_reconciliation/account_move_line.py 2016-08-09 15:43:17 +0000
@@ -31,6 +31,54 @@
31class account_move_line(osv.osv):31class account_move_line(osv.osv):
32 _inherit = 'account.move.line'32 _inherit = 'account.move.line'
33 _name = 'account.move.line'33 _name = 'account.move.line'
34
35 _columns = {
36 'reconcile_date': fields.date('Reconcile date',
37 help="Date of reconciliation"),
38 }
39
40 def search(self, cr, uid, args, offset=0, limit=None, order=None,
41 context=None, count=False):
42 if context is None:
43 context = {}
44
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
46 # always consider:
47 # 1) reconcile empty to cancel the reconcile date criteria
48 # 2) reconcile 'No' filter: become reconciled since (day+1)
49 # or not reconciled (cases 6/9 of Jira comment matrix)
50 if context.get('from_web_menu', True):
51 ft_obj = self.pool.get('fields.tools')
52 if ft_obj.domain_get_field_index(args, 'reconcile_date') >= 0:
53 is_reconciled_index = ft_obj.domain_get_field_index(args,
54 'is_reconciled')
55 if is_reconciled_index < 0:
56 # 1)
57 args = ft_obj.domain_remove_field(args, 'reconcile_date')
58 else:
59 reconciled_date_index = ft_obj.domain_get_field_index(args,
60 'reconcile_date')
61 if reconciled_date_index >= 0 \
62 and args[is_reconciled_index][1] == '=' \
63 and not args[is_reconciled_index][2]:
64 # 2)
65 reconcile_date = args[reconciled_date_index][2]
66 args = ft_obj.domain_remove_field(args, [
67 'is_reconciled',
68 'reconcile_id',
69 'reconcile_date',
70 ])
71 domain = [
72 '|',
73 ('reconcile_date', '>', reconcile_date),
74 ('reconcile_id', '=', False),
75 ('account_id.reconcile', '=', True),
76 ]
77 args = domain + args
78
79 return super(account_move_line, self).search(cr, uid, args,
80 offset=offset, limit=limit, order=order, context=context,
81 count=count)
3482
35 def check_imported_invoice(self, cr, uid, ids, context=None):83 def check_imported_invoice(self, cr, uid, ids, context=None):
36 """84 """
@@ -119,6 +167,11 @@
119 'line_partial_ids': map(lambda x: (4,x,False), merges+unmerge),167 'line_partial_ids': map(lambda x: (4,x,False), merges+unmerge),
120 'is_multi_instance': different_level,168 'is_multi_instance': different_level,
121 })169 })
170 # US-533: date of JI reconciliation for line_partial_ids linked with
171 # above (4, 0)
172 self.pool.get('account.move.line').write(cr, uid, merges+unmerge, {
173 'reconcile_date': time.strftime('%Y-%m-%d'),
174 })
122 175
123 # UF-2011: synchronize move lines (not "marked" after reconcile creation)176 # UF-2011: synchronize move lines (not "marked" after reconcile creation)
124 if self.pool.get('sync.client.orm_extended'):177 if self.pool.get('sync.client.orm_extended'):
@@ -227,6 +280,12 @@
227 'multi_instance_level_creation': multi_instance_level_creation,280 'multi_instance_level_creation': multi_instance_level_creation,
228 })281 })
229 282
283 # US-533: date of JI reconciliation for total reconciliation linked
284 # with above (4, 0)
285 self.pool.get('account.move.line').write(cr, uid, ids, {
286 'reconcile_date': time.strftime('%Y-%m-%d'),
287 })
288
230 # UF-2011: synchronize move lines (not "marked" after reconcile creation)289 # UF-2011: synchronize move lines (not "marked" after reconcile creation)
231 if self.pool.get('sync.client.orm_extended'):290 if self.pool.get('sync.client.orm_extended'):
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)
233292
=== modified file 'bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv'
--- bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2016-07-12 09:57:48 +0000
+++ bin/addons/msf_sync_data_server/data/sync_server.sync_rule.csv 2016-08-09 15:43:17 +0000
@@ -70,7 +70,7 @@
70msf_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,,41070msf_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
71msf_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,,40571msf_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
72msf_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,,41172msf_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
73msf_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,,41273msf_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
74msf_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,,41374msf_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
75msf_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,,41475msf_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
76msf_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,,41576msf_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
@@ -177,7 +177,7 @@
177msf_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,,1507177msf_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
178msf_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,,1510178msf_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
179msf_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,,1520179msf_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
180msf_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,,1521180msf_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
181msf_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,,1522181msf_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
182msf_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,,1523182msf_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
183msf_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,,1530183msf_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
184184
=== modified file 'bin/addons/msf_tools/msf_tools.py'
--- bin/addons/msf_tools/msf_tools.py 2016-07-05 14:43:42 +0000
+++ bin/addons/msf_tools/msf_tools.py 2016-08-09 15:43:17 +0000
@@ -226,6 +226,35 @@
226 tpl_drop_const = "alter table %s drop constraint %s" % sql_params226 tpl_drop_const = "alter table %s drop constraint %s" % sql_params
227 cr.execute(tpl_drop_const)227 cr.execute(tpl_drop_const)
228228
229 def domain_get_field_index(self, domain, field_name):
230 """
231 get field tuple index in domain
232 :return: index or < 0 if not found
233 :rtype: int
234 """
235 index = 0
236 if domain:
237 for t in domain:
238 if t[0] == field_name:
239 return index
240 index += 1
241 return -1
242
243 def domain_remove_field(self, domain, field_names):
244 """
245 remove field(s) tuple(s) in domain
246 :param field_names: field(s) to remove
247 :type field_names: str/list/tuple
248 :return: new domain
249 """
250 if not isinstance(field_names, (list, tuple, )):
251 field_names = [ field_names, ]
252 res = []
253 for t in domain:
254 if t[0] not in field_names:
255 res.append(t)
256 return res
257
229fields_tools()258fields_tools()
230259
231260

Subscribers

People subscribed via source and target branches

to all changes: