Merge lp:~unifield-team/unifield-wm/UFTP-245 into lp:unifield-wm
- UFTP-245
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 2210 |
Proposed branch: | lp:~unifield-team/unifield-wm/UFTP-245 |
Merge into: | lp:unifield-wm |
Diff against target: |
1167 lines (+482/-501) (has conflicts) 6 files modified
msf_doc_import/account.py (+33/-20) msf_doc_import/view/account_view.xml (+4/-5) register_accounting/account_bank_statement.py (+19/-6) register_accounting/account_view.xml (+1/-1) register_accounting/report/liquidity_position_xls.mako (+414/-463) register_accounting/report/report_liquidity_position.py (+11/-6) Text conflict in register_accounting/account_bank_statement.py |
To merge this branch: | bzr merge lp:~unifield-team/unifield-wm/UFTP-245 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+221720@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 'msf_doc_import/account.py' |
2 | --- msf_doc_import/account.py 2013-12-10 09:50:13 +0000 |
3 | +++ msf_doc_import/account.py 2014-06-02 12:07:57 +0000 |
4 | @@ -36,7 +36,7 @@ |
5 | _name = 'msf.doc.import.accounting' |
6 | |
7 | _columns = { |
8 | - 'date': fields.date(string="Migration date", required=True), |
9 | + 'date': fields.date(string="Date", required=True), |
10 | 'file': fields.binary(string="File", filters='*.xml, *.xls', required=True), |
11 | 'filename': fields.char(string="Imported filename", size=256), |
12 | 'progression': fields.float(string="Progression", readonly=True), |
13 | @@ -52,7 +52,7 @@ |
14 | 'message': lambda *a: _('Initialization…'), |
15 | } |
16 | |
17 | - def create_entries(self, cr, uid, ids, context=None): |
18 | + def create_entries(self, cr, uid, ids, journal_id, context=None): |
19 | """ |
20 | Create journal entry |
21 | """ |
22 | @@ -60,10 +60,10 @@ |
23 | if not context: |
24 | context = {} |
25 | # Prepare some values |
26 | - journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'migration'), ('is_current_instance', '=', True)]) |
27 | - if not journal_ids: |
28 | - raise osv.except_osv(_('Warning'), _('No migration journal found!')) |
29 | - journal_id = journal_ids[0] |
30 | + #journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'migration'), ('is_current_instance', '=', True)]) |
31 | + #if not journal_ids: |
32 | + # raise osv.except_osv(_('Warning'), _('No migration journal found!')) |
33 | + #journal_id = journal_ids[0] |
34 | # Fetch default funding pool: MSF Private Fund |
35 | try: |
36 | msf_fp_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'analytic_distribution', 'analytic_account_msf_private_funds')[1] |
37 | @@ -191,7 +191,7 @@ |
38 | raise osv.except_osv(_('Warning'), _('No period found!')) |
39 | period = self.pool.get('account.period').browse(cr, uid, wiz_period_ids[0], context) |
40 | if not period or period.state in ['created', 'done']: |
41 | - raise osv.except_osv(_('Warning'), _('Period for migration is not open!')) |
42 | + raise osv.except_osv(_('Warning'), _('Period is not open!')) |
43 | date = wiz.date or False |
44 | |
45 | # Check that a file was given |
46 | @@ -213,7 +213,7 @@ |
47 | self.write(cr, uid, [wiz.id], {'message': _('Reading headers…'), 'progression': 5.00}) |
48 | # Use the first row to find which column to use |
49 | cols = {} |
50 | - col_names = ['Description', 'Reference', 'Document Date', 'Posting Date', 'G/L Account', 'Third party', 'Destination', 'Cost Centre', 'Booking Debit', 'Booking Credit', 'Booking Currency'] |
51 | + col_names = ['Journal Code', 'Description', 'Reference', 'Document Date', 'Posting Date', 'G/L Account', 'Third party', 'Destination', 'Cost Centre', 'Booking Debit', 'Booking Credit', 'Booking Currency'] |
52 | for num, r in enumerate(rows): |
53 | header = [x and x.data for x in r.iter_cells()] |
54 | for el in col_names: |
55 | @@ -222,6 +222,10 @@ |
56 | break |
57 | # Number of line to bypass in line's count |
58 | base_num = 2 |
59 | + |
60 | + # global journal code for the file |
61 | + file_journal_id = 0 |
62 | + aj_obj = self.pool.get('account.journal') |
63 | |
64 | for el in col_names: |
65 | if not el in cols: |
66 | @@ -289,17 +293,26 @@ |
67 | if line[cols['Booking Credit']]: |
68 | money[line[cols['Booking Currency']]]['credit'] += line[cols['Booking Credit']] |
69 | r_credit = line[cols['Booking Credit']] |
70 | - # Check document/posting dates |
71 | - # UTP-766: Do not use Document date column, but wizard's one |
72 | - #if not line[cols['Document Date']]: |
73 | - # errors.append(_('Line %s. No document date specified!') % (current_line_num,)) |
74 | - # continue |
75 | - # UTP-766: Do not use Posting date column, but wizard's one |
76 | - #if line[cols['Document Date']] > date: |
77 | - # errors.append(_("Line %s. Document date '%s' should be inferior or equal to given Posting date '%s'.") % (current_line_num, line[cols['Document Date']], date,)) |
78 | - # continue |
79 | - # Fetch document date |
80 | - #r_document_date = line[cols['Document Date']].strftime('%Y-%m-%d') |
81 | + |
82 | + # Check which journal it is to be posted to: should be of type OD, MIG or INT |
83 | + if not line[cols['Journal Code']]: |
84 | + errors.append(_('Line %s. No Journal Code specified') % (current_line_num,)) |
85 | + continue |
86 | + else: |
87 | + # check for a valid journal code |
88 | + aj_id = aj_obj.search(cr, uid, [('type','in',['intermission','migration','correction']),('code','=',line[cols['Journal Code']])])[0] |
89 | + if aj_id: |
90 | + if num == 0: # Assume 1st line is the journal code for the entire spreadsheet |
91 | + file_journal_id = aj_id |
92 | + else: |
93 | + if file_journal_id != aj_id: |
94 | + errors.append(_('Line %s. Only a single Journal Code can be specified per file') % (current_line_num,)) |
95 | + continue |
96 | + else: |
97 | + errors.append(_('Line %s. Journal Code is not of type OD, INT or MIG') % (current_line_num,)) |
98 | + continue |
99 | + |
100 | + print 'journal codes: ', file_journal_id, aj_id |
101 | # Check G/L account |
102 | if not line[cols['G/L Account']]: |
103 | errors.append(_('Line %s. No G/L account specified!') % (current_line_num,)) |
104 | @@ -399,7 +412,7 @@ |
105 | # Update wizard |
106 | self.write(cr, uid, ids, {'message': _('Writing changes…'), 'progression': 0.0}) |
107 | # Create all journal entries |
108 | - self.create_entries(cr, uid, ids, context) |
109 | + self.create_entries(cr, uid, ids, file_journal_id, context) |
110 | message = _('Import successful.') |
111 | |
112 | # Update wizard |
113 | |
114 | === modified file 'msf_doc_import/view/account_view.xml' |
115 | --- msf_doc_import/view/account_view.xml 2013-10-28 12:59:14 +0000 |
116 | +++ msf_doc_import/view/account_view.xml 2014-06-02 12:07:57 +0000 |
117 | @@ -21,8 +21,8 @@ |
118 | <field name="model">msf.doc.import.accounting</field> |
119 | <field name="type">form</field> |
120 | <field name="arch" type="xml"> |
121 | - <form string="Import Migration Entries"> |
122 | - <label string="This will import Migration Entries from a XML file." colspan="4"/> |
123 | + <form string="Import Entries"> |
124 | + <label string="This will import Entries from a XML file." colspan="4"/> |
125 | <newline/> |
126 | <field name="file" filename="filename" attrs="{'invisible': [('state', '!=', 'draft')]}"/> |
127 | <field name="filename" invisible="1"/> |
128 | @@ -47,7 +47,7 @@ |
129 | --> |
130 | |
131 | <record id="action_migration_accounting_import_wizard" model="ir.actions.act_window"> |
132 | - <field name="name">Import Migration Entries</field> |
133 | + <field name="name">Import Entries</field> |
134 | <field name="res_model">msf.doc.import.accounting</field> |
135 | <field name="view_type">form</field> |
136 | <field name="view_mode">form</field> |
137 | @@ -55,8 +55,7 @@ |
138 | <field name="target">new</field> |
139 | </record> |
140 | |
141 | - <menuitem id="menu_finance_migration" name="Migration" parent="account.menu_finance_configuration" sequence="40"/> |
142 | - <menuitem id="menu_finance_migration_accounting" name="Import Migration Entries" parent="menu_finance_migration" sequence="1" action="action_migration_accounting_import_wizard"/> |
143 | + <menuitem id="menu_finance_migration_accounting" name="Import Entries" parent="account.menu_finance_entries" sequence="39" action="action_migration_accounting_import_wizard"/> |
144 | |
145 | </data> |
146 | </openerp> |
147 | |
148 | === modified file 'register_accounting/account_bank_statement.py' |
149 | --- register_accounting/account_bank_statement.py 2014-06-02 10:10:09 +0000 |
150 | +++ register_accounting/account_bank_statement.py 2014-06-02 12:07:57 +0000 |
151 | @@ -969,7 +969,6 @@ |
152 | return list(res) |
153 | |
154 | |
155 | - |
156 | def _get_fp_analytic_lines(self, cr, uid, ids, field_name=None, args=None, context=None): |
157 | """ |
158 | Get all analytic lines linked to the given register lines |
159 | @@ -1770,10 +1769,19 @@ |
160 | distrib_id = values.get('analytic_distribution_id') |
161 | if not distrib_id: |
162 | values = self._update_employee_analytic_distribution(cr, uid, values=values) |
163 | +<<<<<<< TREE |
164 | if 'cheque_number' in values: |
165 | cr.execute('''select id from account_bank_statement_line where cheque_number = %s ''', (values['cheque_number'], )) |
166 | for row in cr.dictfetchall(): |
167 | raise osv.except_osv(_('Info'),_('This cheque number has already been used')) |
168 | +======= |
169 | + |
170 | + if 'cheque_number' in values: |
171 | + cr.execute('''select id from account_bank_statement_line where cheque_number = '%s' ''' % (values['cheque_number'])) |
172 | + for row in cr.dictfetchall(): |
173 | + raise osv.except_osv(_('Info'),_('This cheque number has already been used')) |
174 | + |
175 | +>>>>>>> MERGE-SOURCE |
176 | # Then create a new bank statement line |
177 | absl = super(account_bank_statement_line, self).create(cr, uid, values, context=context) |
178 | return absl |
179 | @@ -1834,6 +1842,12 @@ |
180 | if line.get('is_down_payment', False) and line.get('down_payment_id'): |
181 | if not self.pool.get('wizard.down.payment').check_register_line_and_po(cr, uid, line.get('id'), line.get('down_payment_id')[0], context=context): |
182 | raise osv.except_osv(_('Warning'), _('An error occured on down_payment check. Please contact an administrator to resolve this problem.')) |
183 | + |
184 | + if 'cheque_number' in values: |
185 | + cr.execute('''select id from account_bank_statement_line where cheque_number = '%s' ''' % (cheque_number)) |
186 | + for row in cr.dictfetchall(): |
187 | + raise osv.except_osv(_('Info'),_('This cheque number has already been used')) |
188 | + |
189 | return res |
190 | |
191 | def copy(self, cr, uid, absl_id, default=None, context=None): |
192 | @@ -1991,7 +2005,6 @@ |
193 | # update the invoice 'name' (ref) TODO - does this need to be set to "/" ? |
194 | self.pool.get('account.invoice').read(cr, uid, absl.invoice_id.id, ['number'])['number'] |
195 | # self.write(cr, uid, [absl.id], {'name': "/"}) |
196 | - |
197 | # Optimization: Do check=True and update_check=True because it was out from previous lines. |
198 | account_move_line.write(cr, uid, account_move_line_ids, {'state': 'draft'}, context=context, check=True, update_check=True) |
199 | |
200 | @@ -2044,7 +2057,7 @@ |
201 | # do a move that enable a complete supplier follow-up |
202 | self.do_direct_expense(cr, uid, absl, context=context) |
203 | if previous_state == 'draft': |
204 | - direct_hard_post = True # UF-2316 |
205 | + direct_hard_post = True # UF-2316 |
206 | else: |
207 | direct_hard_post = False |
208 | self._set_register_line_audittrail_post_hard_state_log(cr, uid, absl, direct_hard_post, context=context) |
209 | @@ -2067,7 +2080,7 @@ |
210 | # get next sequence |
211 | domain = [ |
212 | ('model', '=', model_name), |
213 | - ('res_id', '=', absl.statement_id.id), |
214 | + ('res_id', '=', absl.statement_id.id), |
215 | ] |
216 | if direct_hard_post: |
217 | # for a direct hard post, an audit line with Draft 2 Temp is already created |
218 | @@ -2155,7 +2168,7 @@ |
219 | return self.posting(cr, uid, ids, 'temp', context=context) |
220 | |
221 | def button_analytic_lines(self, cr, uid, ids, context=None): |
222 | - """ |
223 | + """ |
224 | Give analytic lines linked to the given register lines |
225 | """ |
226 | if not context: |
227 | @@ -2196,7 +2209,7 @@ |
228 | raise osv.except_osv(_('Error'), _('This wizard only accept ONE advance line.')) |
229 | # others verifications |
230 | for st_line in self.browse(cr, uid, ids, context=context): |
231 | - # verify that the journal id is a cash journal |
232 | + # verify that the journal id is a cash journal |
233 | if not st_line.statement_id or not st_line.statement_id.journal_id or not st_line.statement_id.journal_id.type \ |
234 | or st_line.statement_id.journal_id.type != 'cash': |
235 | raise osv.except_osv(_('Error'), _("The attached journal is not a Cash Journal")) |
236 | |
237 | === modified file 'register_accounting/account_view.xml' |
238 | --- register_accounting/account_view.xml 2014-05-14 12:59:36 +0000 |
239 | +++ register_accounting/account_view.xml 2014-06-02 12:07:57 +0000 |
240 | @@ -539,7 +539,7 @@ |
241 | <field name="journal_id"/> |
242 | <field name="balance_start"/> |
243 | <field name="msf_calculated_balance"/> |
244 | - <field name="balance_end_real"/> |
245 | + <field name="balance_end_cash"/> |
246 | <field name="state"/> |
247 | <button type="object" string="Open" name="button_open_cash" states="draft" icon="terp-gtk-go-back-rtl"/> |
248 | <button type="object" string="Close Register" name="button_confirm_cash" states="open" icon="terp-camera_test"/> |
249 | |
250 | === modified file 'register_accounting/report/liquidity_position_xls.mako' |
251 | --- register_accounting/report/liquidity_position_xls.mako 2013-03-06 14:20:39 +0000 |
252 | +++ register_accounting/report/liquidity_position_xls.mako 2014-06-02 12:07:57 +0000 |
253 | @@ -1,131 +1,108 @@ |
254 | -<?xml version="1.0"?> |
255 | +<?xml version="1.0" encoding="UTF-8"?> |
256 | <?mso-application progid="Excel.Sheet"?> |
257 | -<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" |
258 | - xmlns:o="urn:schemas-microsoft-com:office:office" |
259 | - xmlns:x="urn:schemas-microsoft-com:office:excel" |
260 | - xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" |
261 | - xmlns:html="http://www.w3.org/TR/REC-html40"> |
262 | - <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> |
263 | - <Author>MSFUser</Author> |
264 | - <LastAuthor>MSFUser</LastAuthor> |
265 | - <Created>2012-06-18T15:46:09Z</Created> |
266 | - <Company>Medecins Sans Frontieres</Company> |
267 | - <Version>11.9999</Version> |
268 | - </DocumentProperties> |
269 | - <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> |
270 | - <WindowHeight>13170</WindowHeight> |
271 | - <WindowWidth>19020</WindowWidth> |
272 | - <WindowTopX>120</WindowTopX> |
273 | - <WindowTopY>60</WindowTopY> |
274 | - <ProtectStructure>False</ProtectStructure> |
275 | - <ProtectWindows>False</ProtectWindows> |
276 | - </ExcelWorkbook> |
277 | - |
278 | - |
279 | -<Styles> |
280 | - |
281 | -<Style ss:ID="Default" ss:Name="Normal"> |
282 | -<Alignment ss:Vertical="Bottom"/> |
283 | -<Borders/> |
284 | -<Font/> |
285 | -<NumberFormat/> |
286 | -<Protection/> |
287 | -</Style> |
288 | - |
289 | -<Style ss:ID="s16" ss:Name="Comma"> |
290 | -</Style> |
291 | - |
292 | - |
293 | -<Style ss:ID="header"> |
294 | -<Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
295 | -<Borders> |
296 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
297 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
298 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
299 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
300 | -</Borders> |
301 | -</Style> |
302 | - |
303 | -<Style ss:ID="line"> |
304 | -<Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
305 | -<Borders> |
306 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
307 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
308 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
309 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
310 | -</Borders> |
311 | -</Style> |
312 | - |
313 | -<Style ss:ID="title"> |
314 | -<Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
315 | -</Style> |
316 | - |
317 | -<Style ss:ID="s22"> |
318 | -<Borders> |
319 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
320 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
321 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
322 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
323 | -</Borders> |
324 | -</Style> |
325 | -<Style ss:ID="s23"> |
326 | -<Borders> |
327 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
328 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
329 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
330 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
331 | -</Borders> |
332 | -<NumberFormat ss:Format="Short Date"/> |
333 | -</Style> |
334 | -<Style ss:ID="s24"> |
335 | -<Borders> |
336 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
337 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
338 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
339 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
340 | -</Borders> |
341 | -<NumberFormat ss:Format="mmm\-yy"/> |
342 | -</Style> |
343 | - |
344 | -<Style ss:ID="short_date"> |
345 | -<Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
346 | -<Borders> |
347 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
348 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
349 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
350 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
351 | -</Borders> |
352 | -<NumberFormat ss:Format="Short Date"/> |
353 | -</Style> |
354 | - |
355 | -<Style ss:ID="short_date2"> |
356 | -<Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
357 | -<NumberFormat ss:Format="Short Date"/> |
358 | -</Style> |
359 | - |
360 | -<Style ss:ID="pop"> |
361 | -<Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
362 | -</Style> |
363 | - |
364 | -<Style ss:ID="s25"> |
365 | -<Borders> |
366 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
367 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
368 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
369 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
370 | -</Borders> |
371 | -<Interior ss:Pattern="Solid"/> |
372 | -</Style> |
373 | - |
374 | - |
375 | -<Style ss:ID="s25c"> |
376 | -</Style> |
377 | - |
378 | -<Style ss:ID="s25b"> |
379 | -<Font ss:Bold="1"/> |
380 | -</Style> |
381 | - |
382 | -<!-- <Style ss:ID="s25"> |
383 | +<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel"> |
384 | + <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> |
385 | + <Author>MSFUser</Author> |
386 | + <LastAuthor>MSFUser</LastAuthor> |
387 | + <Created>2012-06-18T15:46:09Z</Created> |
388 | + <Company>Medecins Sans Frontieres</Company> |
389 | + <Version>11.9999</Version> |
390 | + </DocumentProperties> |
391 | + <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> |
392 | + <WindowHeight>13170</WindowHeight> |
393 | + <WindowWidth>19020</WindowWidth> |
394 | + <WindowTopX>120</WindowTopX> |
395 | + <WindowTopY>60</WindowTopY> |
396 | + <ProtectStructure>False</ProtectStructure> |
397 | + <ProtectWindows>False</ProtectWindows> |
398 | + </ExcelWorkbook> |
399 | + <Styles> |
400 | + <Style ss:ID="Default" ss:Name="Normal"> |
401 | + <Alignment ss:Vertical="Bottom" /> |
402 | + <Borders /> |
403 | + <Font /> |
404 | + <NumberFormat /> |
405 | + <Protection /> |
406 | + </Style> |
407 | + <Style ss:ID="s16" ss:Name="Comma" /> |
408 | + <Style ss:ID="header"> |
409 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" /> |
410 | + <Borders> |
411 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
412 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
413 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
414 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
415 | + </Borders> |
416 | + </Style> |
417 | + <Style ss:ID="line"> |
418 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" /> |
419 | + <Borders> |
420 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
421 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
422 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
423 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
424 | + </Borders> |
425 | + </Style> |
426 | + <Style ss:ID="title"> |
427 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" /> |
428 | + </Style> |
429 | + <Style ss:ID="s22"> |
430 | + <Borders> |
431 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
432 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
433 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
434 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
435 | + </Borders> |
436 | + </Style> |
437 | + <Style ss:ID="s23"> |
438 | + <Borders> |
439 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
440 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
441 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
442 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
443 | + </Borders> |
444 | + <NumberFormat ss:Format="Short Date" /> |
445 | + </Style> |
446 | + <Style ss:ID="s24"> |
447 | + <Borders> |
448 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
449 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
450 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
451 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
452 | + </Borders> |
453 | + <NumberFormat ss:Format="mmm\-yy" /> |
454 | + </Style> |
455 | + <Style ss:ID="short_date"> |
456 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" /> |
457 | + <Borders> |
458 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
459 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
460 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
461 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
462 | + </Borders> |
463 | + <NumberFormat ss:Format="Short Date" /> |
464 | + </Style> |
465 | + <Style ss:ID="short_date2"> |
466 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" /> |
467 | + <NumberFormat ss:Format="Short Date" /> |
468 | + </Style> |
469 | + <Style ss:ID="pop"> |
470 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" /> |
471 | + </Style> |
472 | + <Style ss:ID="s25"> |
473 | + <Borders> |
474 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
475 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
476 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
477 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
478 | + </Borders> |
479 | + <Interior ss:Pattern="Solid" /> |
480 | + </Style> |
481 | + <Style ss:ID="s25c" /> |
482 | + <Style ss:ID="s25b"> |
483 | + <Font ss:Bold="1" /> |
484 | + </Style> |
485 | + <!-- <Style ss:ID="s25"> |
486 | <Borders> |
487 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
488 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
489 | @@ -144,339 +121,313 @@ |
490 | <NumberFormat /> |
491 | <NumberFormat ss:Format="Fixed"/> |
492 | </Style> --> |
493 | - |
494 | -<Style ss:ID="s26" > |
495 | -<Borders> |
496 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
497 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
498 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
499 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
500 | -</Borders> |
501 | -<NumberFormat ss:Format="Fixed"/> |
502 | -</Style> |
503 | - |
504 | - |
505 | - |
506 | -<Style ss:ID="s32"> |
507 | -<Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/> |
508 | -<Borders> |
509 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
510 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
511 | -</Borders> |
512 | -<Font x:Family="Swiss" ss:Bold="1"/> |
513 | -</Style> |
514 | - |
515 | -<Style ss:ID="s34"> |
516 | -<Alignment ss:Vertical="Center" ss:WrapText="1"/> |
517 | -<Borders> |
518 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
519 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
520 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
521 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
522 | -</Borders> |
523 | -<Font ss:Bold="1"/> |
524 | -</Style> |
525 | - |
526 | - |
527 | -<Style ss:ID="s35"> |
528 | -<Alignment ss:Vertical="Center" ss:WrapText="1"/> |
529 | -</Style> |
530 | - |
531 | - |
532 | -<Style ss:ID="s38"> |
533 | -<Borders> |
534 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
535 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
536 | -</Borders> |
537 | -</Style> |
538 | - |
539 | - |
540 | -<Style ss:ID="s39" > |
541 | -<Borders> |
542 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
543 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
544 | -</Borders> |
545 | -</Style> |
546 | - |
547 | -<Style ss:ID="s40"> |
548 | -<Borders> |
549 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
550 | -</Borders> |
551 | -</Style> |
552 | - |
553 | -<Style ss:ID="s41"> |
554 | -<Borders> |
555 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
556 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
557 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
558 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
559 | -</Borders> |
560 | -<Font x:Family="Swiss" ss:Bold="1"/> |
561 | -</Style> |
562 | - |
563 | -<Style ss:ID="s42"> |
564 | -<Borders> |
565 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
566 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
567 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
568 | -</Borders> |
569 | -</Style> |
570 | - |
571 | -<Style ss:ID="s43" > |
572 | -<Borders> |
573 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
574 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
575 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
576 | -</Borders> |
577 | -</Style> |
578 | - |
579 | -<Style ss:ID="s44" > |
580 | -<Borders> |
581 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
582 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
583 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
584 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
585 | -</Borders> |
586 | -<Font x:Family="Swiss" ss:Bold="1"/> |
587 | -<NumberFormat ss:Format="Fixed"/> |
588 | -</Style> |
589 | - |
590 | - |
591 | -<Style ss:ID="s49"> |
592 | -<Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/> |
593 | -<Borders> |
594 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/> |
595 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2"/> |
596 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
597 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/> |
598 | -</Borders> |
599 | -<Font x:Family="Swiss" ss:Bold="1"/> |
600 | -</Style> |
601 | - |
602 | -<Style ss:ID="s50" > |
603 | -<Borders> |
604 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/> |
605 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
606 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
607 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/> |
608 | -</Borders> |
609 | -<Font x:Family="Swiss" ss:Bold="1"/> |
610 | -<NumberFormat ss:Format="Fixed"/> |
611 | -</Style> |
612 | - |
613 | -<Style ss:ID="s51"> |
614 | -<Borders> |
615 | -<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2"/> |
616 | -<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
617 | -<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2"/> |
618 | -<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/> |
619 | -</Borders> |
620 | -<Font x:Family="Swiss" ss:Bold="1"/> |
621 | -</Style> |
622 | -</Styles> |
623 | - |
624 | - |
625 | -<Worksheet ss:Name="Liquidity position"> |
626 | -<Table > |
627 | -<Column ss:AutoFitWidth="0" ss:Width="110.5"/> |
628 | -<Column ss:AutoFitWidth="0" ss:Width="102.75" ss:Span="1"/> |
629 | -<Column ss:AutoFitWidth="0" ss:Width="103.5" ss:Span="1"/> |
630 | -<Column ss:AutoFitWidth="0" ss:Width="75.75"/> |
631 | -<Column ss:AutoFitWidth="0" ss:Width="103.5" ss:Span="1"/> |
632 | -<Column ss:AutoFitWidth="0" ss:Width="70.75"/> |
633 | - |
634 | -<Row> |
635 | -<Cell ss:StyleID="s25b" > |
636 | -<Data ss:Type="String">${_('LIQUIDITY POSITION')}</Data> |
637 | -</Cell> |
638 | -</Row> |
639 | -<Row ss:Height="13.5"/> |
640 | -<Row > |
641 | -<Cell> |
642 | -<Data ss:Type="String">${_('Report Date:')}</Data> |
643 | -</Cell> |
644 | -<Cell ss:StyleID="short_date2" > |
645 | -<Data ss:Type="DateTime">${time.strftime('%Y-%m-%d')|n}T00:00:00.000</Data> |
646 | -</Cell> |
647 | -</Row> |
648 | -<Row> |
649 | -<Cell> |
650 | -<Data ss:Type="String">${_('Prop Instance: ')}</Data> |
651 | -</Cell> |
652 | -<Cell ss:StyleID="pop"> |
653 | -<Data ss:Type="String">${( company.instance_id and company.instance_id.code or '')|x}</Data> |
654 | -</Cell> |
655 | -</Row> |
656 | -<Row ss:Height="13.5"/> |
657 | - |
658 | -<Row ss:AutoFitHeight="0" ss:Height="25.5" ss:StyleID="s35"> |
659 | - <Cell ss:StyleID="s34" > |
660 | -<Data ss:Type="String">${_('Proprietary instance')}</Data> |
661 | -</Cell> |
662 | - <Cell ss:StyleID="s34" > |
663 | -<Data ss:Type="String">${_('Journal Code')}</Data> |
664 | -</Cell> |
665 | - <Cell ss:StyleID="s34" > |
666 | -<Data ss:Type="String">${_('Journal Name')}</Data> |
667 | -</Cell> |
668 | - <Cell ss:StyleID="s34" > |
669 | -<Data ss:Type="String">${_('Calculated Balance in register currency')}</Data> |
670 | -</Cell> |
671 | - <Cell ss:StyleID="s34" > |
672 | -<Data ss:Type="String">${_('Register Balance in register currency')}</Data> |
673 | -</Cell> |
674 | - <Cell ss:StyleID="s34" > |
675 | -<Data ss:Type="String">${_('Register Currency')}</Data> |
676 | -</Cell> |
677 | - <Cell ss:StyleID="s34" > |
678 | -<Data ss:Type="String">${_('Calculated Balance in functional currency')}</Data> |
679 | -</Cell> |
680 | - <Cell ss:StyleID="s34" > |
681 | -<Data ss:Type="String">${_('Register Balance in functional currency')}</Data> |
682 | -</Cell> |
683 | - <Cell ss:StyleID="s34" > |
684 | -<Data ss:Type="String">${_('Functional Currency')}</Data> |
685 | -</Cell> |
686 | -</Row> |
687 | - |
688 | -% for reg in getRegister(): |
689 | - % for o in getRegister2()[reg]: |
690 | - <Row> |
691 | - <Cell ss:StyleID="s25" > |
692 | -<Data ss:Type="String">${(o.instance_id and o.instance_id.code or '')|x}</Data> |
693 | -</Cell> |
694 | - <Cell ss:StyleID="s25" > |
695 | -<Data ss:Type="String">${(o.journal_id and o.journal_id.code or '')|x}</Data> |
696 | -</Cell> |
697 | - <Cell ss:StyleID="s25" > |
698 | -<Data ss:Type="String">${(o.journal_id and o.journal_id.name or '')|x}</Data> |
699 | -</Cell> |
700 | - <Cell ss:StyleID="s26" > |
701 | -<Data ss:Type="Number">${(o.msf_calculated_balance or 0.0)|x}</Data> |
702 | -</Cell> |
703 | - % if o.journal_id.type == 'cash' : |
704 | - <Cell ss:StyleID="s26" > |
705 | -<Data ss:Type="Number">${(o.balance_end_cash or 0.0)|x}</Data> |
706 | -</Cell> |
707 | - % endif |
708 | - % if o.journal_id.type == 'bank' : |
709 | - <Cell ss:StyleID="s26" > |
710 | -<Data ss:Type="Number">${(o.balance_end_real or 0.0)|x}</Data> |
711 | -</Cell> |
712 | - % endif |
713 | - <Cell ss:StyleID="s25" > |
714 | -<Data ss:Type="String">${( o.journal_id and o.journal_id.currency and o.journal_id.currency.name or '')|x}</Data> |
715 | -</Cell> |
716 | - <Cell ss:StyleID="s26" > |
717 | -<Data ss:Type="Number">${( getConvert(o.journal_id.currency,o.journal_id.company_id.currency_id,o.msf_calculated_balance, 'cal') or 0.0 )|x}</Data> |
718 | -</Cell> |
719 | - |
720 | - % if o.journal_id.type == 'cash' : |
721 | - <Cell ss:StyleID="s26" > |
722 | -<Data ss:Type="Number">${( getConvert(o.journal_id.currency,o.journal_id.company_id.currency_id,o.balance_end_cash,'reg') or 0.0 )|x}</Data> |
723 | -</Cell> |
724 | - % endif |
725 | - % if o.journal_id.type == 'bank' : |
726 | - <Cell ss:StyleID="s26" > |
727 | -<Data ss:Type="Number">${( getConvert(o.journal_id.currency,o.journal_id.company_id.currency_id,o.balance_end_real,'reg') or 0.0 )|x}</Data> |
728 | -</Cell> |
729 | - % endif |
730 | - <Cell ss:StyleID="s25" > |
731 | -<Data ss:Type="String">${( getFuncCur(o) or '')|x}</Data> |
732 | -</Cell> |
733 | - </Row> |
734 | - |
735 | -% endfor |
736 | - |
737 | -<Row> |
738 | - <Cell ss:StyleID="s42"/> |
739 | - <Cell ss:StyleID="s38"> |
740 | - <NamedCell ss:Name="Print_Area"/> |
741 | - </Cell> |
742 | - <Cell ss:StyleID="s38"> |
743 | - <NamedCell ss:Name="Print_Area"/> |
744 | - </Cell> |
745 | - <Cell ss:StyleID="s39"> |
746 | - <NamedCell ss:Name="Print_Area"/> |
747 | - </Cell> |
748 | - <Cell ss:StyleID="s43"> |
749 | - <NamedCell ss:Name="Print_Area"/> |
750 | - </Cell> |
751 | - <Cell ss:StyleID="s32"> |
752 | - <Data ss:Type="String">${_('Sub-Total =')}</Data> |
753 | - <NamedCell ss:Name="Print_Area"/> |
754 | - </Cell> |
755 | - <Cell ss:StyleID="s44" ss:Formula="=SUM(R[-${getCal()}]C:R[-1]C)" > |
756 | - <Data ss:Type="Number"></Data> |
757 | - <NamedCell ss:Name="Print_Area"/> |
758 | - </Cell> |
759 | - <Cell ss:StyleID="s44" ss:Formula="=SUM(R[-${getRes()}]C:R[-1]C)" > |
760 | - <Data ss:Type="Number"></Data> |
761 | - <NamedCell ss:Name="Print_Area"/> |
762 | - </Cell> |
763 | - <Cell ss:StyleID="s41"> |
764 | - <Data ss:Type="String">${( getCurTot() or '')|x}</Data> |
765 | - <NamedCell ss:Name="Print_Area"/> |
766 | - </Cell> |
767 | -</Row> |
768 | -<Row ss:Height="13.5"/> |
769 | -% endfor |
770 | - |
771 | - |
772 | -<Row ss:Height="13.5"> |
773 | - <Cell ss:StyleID="s25c"/> |
774 | - <Cell ss:StyleID="s25c"/> |
775 | - <Cell ss:StyleID="s25c"/> |
776 | - <Cell ss:StyleID="s25c"/> |
777 | - <Cell ss:StyleID="s25c"/> |
778 | - |
779 | - <Cell ss:StyleID="s49"> |
780 | - <Data ss:Type="String">${_('Grand Total =')}</Data> |
781 | - <NamedCell ss:Name="Print_Area"/> |
782 | - </Cell> |
783 | - <Cell ss:StyleID="s50" ss:Formula="=${getFormula()}+R[-2]C"> |
784 | - <Data ss:Type="Number"></Data> |
785 | - <NamedCell ss:Name="Print_Area"/> |
786 | - </Cell> |
787 | - <Cell ss:StyleID="s50" ss:Formula="=${getFormula()}+R[-2]C"> |
788 | - <Data ss:Type="Number"></Data> |
789 | - <NamedCell ss:Name="Print_Area"/> |
790 | - </Cell> |
791 | - <Cell ss:StyleID="s51"> |
792 | - <Data ss:Type="String">${( getCurTot() or '')|x}</Data> |
793 | - <NamedCell ss:Name="Print_Area"/> |
794 | - </Cell> |
795 | -</Row> |
796 | - |
797 | - |
798 | -</Table> |
799 | - |
800 | - |
801 | -<WorksheetOptions> |
802 | -<FitToPage/> |
803 | -<Print> |
804 | -<ValidPrinterInfo/> |
805 | -<PaperSizeIndex>9</PaperSizeIndex> |
806 | -<Scale>63</Scale> |
807 | -<HorizontalResolution>600</HorizontalResolution> |
808 | -<VerticalResolution>0</VerticalResolution> |
809 | -</Print> |
810 | -<PageBreakZoom>60</PageBreakZoom> |
811 | -<Selected/> |
812 | -<DoNotDisplayGridlines/> |
813 | -<Panes> |
814 | -<Pane> |
815 | -<Number>3</Number> |
816 | -<ActiveRow>24</ActiveRow> |
817 | -<ActiveCol>3</ActiveCol> |
818 | -</Pane> |
819 | -</Panes> |
820 | -<ProtectObjects>False</ProtectObjects> |
821 | -<ProtectScenarios>False</ProtectScenarios> |
822 | -</WorksheetOptions> |
823 | - |
824 | -</Worksheet> |
825 | - |
826 | - |
827 | - |
828 | -</Workbook> |
829 | + <Style ss:ID="s26"> |
830 | + <Borders> |
831 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
832 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
833 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
834 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
835 | + </Borders> |
836 | + <NumberFormat ss:Format="Fixed" /> |
837 | + </Style> |
838 | + <Style ss:ID="s32"> |
839 | + <Alignment ss:Horizontal="Right" ss:Vertical="Bottom" /> |
840 | + <Borders> |
841 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
842 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
843 | + </Borders> |
844 | + <Font x:Family="Swiss" ss:Bold="1" /> |
845 | + </Style> |
846 | + <Style ss:ID="s34"> |
847 | + <Alignment ss:Vertical="Center" ss:WrapText="1" /> |
848 | + <Borders> |
849 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
850 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
851 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
852 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
853 | + </Borders> |
854 | + <Font ss:Bold="1" /> |
855 | + </Style> |
856 | + <Style ss:ID="s35"> |
857 | + <Alignment ss:Vertical="Center" ss:WrapText="1" /> |
858 | + </Style> |
859 | + <Style ss:ID="s38"> |
860 | + <Borders> |
861 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
862 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
863 | + </Borders> |
864 | + </Style> |
865 | + ( getFuncCur(o) or '')|x |
866 | + <Style ss:ID="s39"> |
867 | + <Borders> |
868 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
869 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
870 | + </Borders> |
871 | + </Style> |
872 | + <Style ss:ID="s40"> |
873 | + <Borders> |
874 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
875 | + </Borders> |
876 | + </Style> |
877 | + <Style ss:ID="s41"> |
878 | + <Borders> |
879 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
880 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
881 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
882 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
883 | + </Borders> |
884 | + <Font x:Family="Swiss" ss:Bold="1" /> |
885 | + </Style> |
886 | + <Style ss:ID="s42"> |
887 | + <Borders> |
888 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
889 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
890 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
891 | + </Borders> |
892 | + </Style> |
893 | + <Style ss:ID="s43"> |
894 | + <Borders> |
895 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
896 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
897 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
898 | + </Borders> |
899 | + </Style> |
900 | + <Style ss:ID="s44"> |
901 | + <Borders> |
902 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
903 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
904 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
905 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
906 | + </Borders> |
907 | + <Font x:Family="Swiss" ss:Bold="1" /> |
908 | + <NumberFormat ss:Format="Fixed" /> |
909 | + </Style> |
910 | + <Style ss:ID="s49"> |
911 | + <Alignment ss:Horizontal="Right" ss:Vertical="Bottom" /> |
912 | + <Borders> |
913 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" /> |
914 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2" /> |
915 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
916 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2" /> |
917 | + </Borders> |
918 | + <Font x:Family="Swiss" ss:Bold="1" /> |
919 | + </Style> |
920 | + <Style ss:ID="s50"> |
921 | + <Borders> |
922 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" /> |
923 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
924 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
925 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2" /> |
926 | + </Borders> |
927 | + <Font x:Family="Swiss" ss:Bold="1" /> |
928 | + <NumberFormat ss:Format="Fixed" /> |
929 | + </Style> |
930 | + <Style ss:ID="s51"> |
931 | + <Borders> |
932 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" /> |
933 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
934 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2" /> |
935 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2" /> |
936 | + </Borders> |
937 | + <Font x:Family="Swiss" ss:Bold="1" /> |
938 | + </Style> |
939 | + </Styles> |
940 | + <Worksheet ss:Name="Liquidity position"> |
941 | + <Table> |
942 | + <Column ss:AutoFitWidth="0" ss:Width="110.5" /> |
943 | + <Column ss:AutoFitWidth="0" ss:Width="102.75" ss:Span="1" /> |
944 | + <Column ss:AutoFitWidth="0" ss:Width="103.5" ss:Span="1" /> |
945 | + <Column ss:AutoFitWidth="0" ss:Width="75.75" /> |
946 | + <Column ss:AutoFitWidth="0" ss:Width="103.5" ss:Span="1" /> |
947 | + <Column ss:AutoFitWidth="0" ss:Width="70.75" /> |
948 | + <Row> |
949 | + <Cell ss:StyleID="s25b"> |
950 | + <Data ss:Type="String">${_('LIQUIDITY POSITION')}</Data> |
951 | + </Cell> |
952 | + </Row> |
953 | + <Row ss:Height="13.5" /> |
954 | + <Row> |
955 | + <Cell> |
956 | + <Data ss:Type="String">${_('Report Date:')}</Data> |
957 | + </Cell> |
958 | + <Cell ss:StyleID="short_date2"> |
959 | + <Data ss:Type="DateTime">${time.strftime('%Y-%m-%d')|n}T00:00:00.000</Data> |
960 | + </Cell> |
961 | + </Row> |
962 | + <Row> |
963 | + <Cell> |
964 | + <Data ss:Type="String">${_('Prop Instance: ')}</Data> |
965 | + </Cell> |
966 | + <Cell ss:StyleID="pop"> |
967 | + <Data ss:Type="String">${( company.instance_id and company.instance_id.code or '')|x}</Data> |
968 | + </Cell> |
969 | + </Row> |
970 | + <Row ss:Height="13.5" /> |
971 | + <Row ss:AutoFitHeight="0" ss:Height="25.5" ss:StyleID="s35"> |
972 | + <Cell ss:StyleID="s34"> |
973 | + <Data ss:Type="String">${_('Proprietary instance')}</Data> |
974 | + </Cell> |
975 | + <Cell ss:StyleID="s34"> |
976 | + <Data ss:Type="String">${_('Journal Code')}</Data> |
977 | + </Cell> |
978 | + <Cell ss:StyleID="s34"> |
979 | + <Data ss:Type="String">${_('Journal Name')}</Data> |
980 | + </Cell> |
981 | + <Cell ss:StyleID="s34"> |
982 | + <Data ss:Type="String">${_('Status')}</Data> |
983 | + </Cell> |
984 | + <Cell ss:StyleID="s34"> |
985 | + <Data ss:Type="String">${_('Period')}</Data> |
986 | + </Cell> |
987 | + <Cell ss:StyleID="s34"> |
988 | + <Data ss:Type="String">${_('Calculated Balance in register currency')}</Data> |
989 | + </Cell> |
990 | + <Cell ss:StyleID="s34"> |
991 | + <Data ss:Type="String">${_('Register Balance in register currency')}</Data> |
992 | + </Cell> |
993 | + <Cell ss:StyleID="s34"> |
994 | + <Data ss:Type="String">${_('Register Currency')}</Data> |
995 | + </Cell> |
996 | + <Cell ss:StyleID="s34"> |
997 | + <Data ss:Type="String">${_('Calculated Balance in functional currency')}</Data> |
998 | + </Cell> |
999 | + <Cell ss:StyleID="s34"> |
1000 | + <Data ss:Type="String">${_('Register Balance in functional currency')}</Data> |
1001 | + </Cell> |
1002 | + <Cell ss:StyleID="s34"> |
1003 | + <Data ss:Type="String">${_('Functional Currency')}</Data> |
1004 | + </Cell> |
1005 | + </Row> |
1006 | + % for reg in getRegister(): |
1007 | + % for o in getRegister2()[reg]: |
1008 | + <Row> |
1009 | + <Cell ss:StyleID="s25"> |
1010 | + <Data ss:Type="String">${(o.instance_id and o.instance_id.code or '')|x}</Data> |
1011 | + </Cell> |
1012 | + <Cell ss:StyleID="s25"> |
1013 | + <Data ss:Type="String">${(o.journal_id and o.journal_id.code or '')|x}</Data> |
1014 | + </Cell> |
1015 | + <Cell ss:StyleID="s25"> |
1016 | + <Data ss:Type="String">${(o.journal_id and o.journal_id.name or '')|x}</Data> |
1017 | + </Cell> |
1018 | + <Cell ss:StyleID="s25"> |
1019 | + <Data ss:Type="String">${(o.state or '')|x}</Data> |
1020 | + </Cell> |
1021 | + <Cell ss:StyleID="s25"> |
1022 | + <Data ss:Type="String">${(o.period_id.name or '')|x}</Data> |
1023 | + </Cell> |
1024 | + <Cell ss:StyleID="s26"> |
1025 | + <Data ss:Type="Number">${(o.msf_calculated_balance or 0.0)|x}</Data> |
1026 | + </Cell> |
1027 | + % if o.journal_id.type == 'cash' : |
1028 | + <Cell ss:StyleID="s26"> |
1029 | + <Data ss:Type="Number">${(o.balance_end_cash or 0.0)|x}</Data> |
1030 | + </Cell> |
1031 | + % endif |
1032 | + % if o.journal_id.type == 'bank' : |
1033 | + <Cell ss:StyleID="s26"> |
1034 | + <Data ss:Type="Number">${(o.balance_end_real or 0.0)|x}</Data> |
1035 | + </Cell> |
1036 | + % endif |
1037 | + <Cell ss:StyleID="s25"> |
1038 | + <Data ss:Type="String">${( o.journal_id and o.journal_id.currency and o.journal_id.currency.name or '')|x}</Data> |
1039 | + </Cell> |
1040 | + <Cell ss:StyleID="s26"> |
1041 | + <Data ss:Type="Number">${( getConvert(o.journal_id.currency,o.journal_id.company_id.currency_id,o.msf_calculated_balance, 'cal') or 0.0 )|x}</Data> |
1042 | + </Cell> |
1043 | + % if o.journal_id.type == 'cash' : |
1044 | + <Cell ss:StyleID="s26"> |
1045 | + <Data ss:Type="Number">${( getConvert(o.journal_id.currency,o.journal_id.company_id.currency_id,o.balance_end_cash,'reg') or 0.0 )|x}</Data> |
1046 | + </Cell> |
1047 | + % endif |
1048 | + % if o.journal_id.type == 'bank' : |
1049 | + <Cell ss:StyleID="s26"> |
1050 | + <Data ss:Type="Number">${( getConvert(o.journal_id.currency,o.journal_id.company_id.currency_id,o.balance_end_real,'reg') or 0.0 )|x}</Data> |
1051 | + </Cell> |
1052 | + % endif |
1053 | + <Cell ss:StyleID="s25"> |
1054 | + <Data ss:Type="String">${( getFuncCur(o) or '')|x}</Data> |
1055 | + </Cell> |
1056 | + </Row> |
1057 | + % endfor |
1058 | + <Row> |
1059 | + <Cell ss:StyleID="s42" /> |
1060 | + <Cell ss:StyleID="s38"> |
1061 | + <NamedCell ss:Name="Print_Area" /> |
1062 | + </Cell> |
1063 | + <Cell ss:StyleID="s38"> |
1064 | + <NamedCell ss:Name="Print_Area" /> |
1065 | + </Cell> |
1066 | + <Cell ss:StyleID="s39"> |
1067 | + <NamedCell ss:Name="Print_Area" /> |
1068 | + </Cell> |
1069 | + <Cell ss:StyleID="s43"> |
1070 | + <NamedCell ss:Name="Print_Area" /> |
1071 | + </Cell> |
1072 | + <Cell ss:StyleID="s32"> |
1073 | + <Data ss:Type="String">${_('Sub-Total =')}</Data> |
1074 | + <NamedCell ss:Name="Print_Area" /> |
1075 | + </Cell> |
1076 | + <Cell ss:StyleID="s44" ss:Formula="=SUM(R[-${getCal()}]C:R[-1]C)"> |
1077 | + <Data ss:Type="Number" /> |
1078 | + <NamedCell ss:Name="Print_Area" /> |
1079 | + </Cell> |
1080 | + <Cell ss:StyleID="s44" ss:Formula="=SUM(R[-${getRes()}]C:R[-1]C)"> |
1081 | + <Data ss:Type="Number" /> |
1082 | + <NamedCell ss:Name="Print_Area" /> |
1083 | + </Cell> |
1084 | + <Cell ss:StyleID="s41"> |
1085 | + <Data ss:Type="String">${( getCurTot() or '')|x}</Data> |
1086 | + <NamedCell ss:Name="Print_Area" /> |
1087 | + </Cell> |
1088 | + </Row> |
1089 | + <Row ss:Height="13.5" /> |
1090 | + % endfor |
1091 | + <Row ss:Height="13.5"> |
1092 | + <Cell ss:StyleID="s25c" /> |
1093 | + <Cell ss:StyleID="s25c" /> |
1094 | + <Cell ss:StyleID="s25c" /> |
1095 | + <Cell ss:StyleID="s25c" /> |
1096 | + <Cell ss:StyleID="s25c" /> |
1097 | + <Cell ss:StyleID="s49"> |
1098 | + <Data ss:Type="String">${_('Grand Total =')}</Data> |
1099 | + <NamedCell ss:Name="Print_Area" /> |
1100 | + </Cell> |
1101 | + <Cell ss:StyleID="s50" ss:Formula="=${getFormula()}+R[-2]C"> |
1102 | + <Data ss:Type="Number" /> |
1103 | + <NamedCell ss:Name="Print_Area" /> |
1104 | + </Cell> |
1105 | + <Cell ss:StyleID="s50" ss:Formula="=${getFormula()}+R[-2]C"> |
1106 | + <Data ss:Type="Number" /> |
1107 | + <NamedCell ss:Name="Print_Area" /> |
1108 | + </Cell> |
1109 | + <Cell ss:StyleID="s51"> |
1110 | + <Data ss:Type="String">${( getCurTot() or '')|x}</Data> |
1111 | + <NamedCell ss:Name="Print_Area" /> |
1112 | + </Cell> |
1113 | + </Row> |
1114 | + </Table> |
1115 | + <WorksheetOptions> |
1116 | + <FitToPage /> |
1117 | + <Print> |
1118 | + <ValidPrinterInfo /> |
1119 | + <PaperSizeIndex>9</PaperSizeIndex> |
1120 | + <Scale>63</Scale> |
1121 | + <HorizontalResolution>600</HorizontalResolution> |
1122 | + <VerticalResolution>0</VerticalResolution> |
1123 | + </Print> |
1124 | + <PageBreakZoom>60</PageBreakZoom> |
1125 | + <Selected /> |
1126 | + <DoNotDisplayGridlines /> |
1127 | + <Panes> |
1128 | + <Pane> |
1129 | + <Number>3</Number> |
1130 | + <ActiveRow>24</ActiveRow> |
1131 | + <ActiveCol>3</ActiveCol> |
1132 | + </Pane> |
1133 | + </Panes> |
1134 | + <ProtectObjects>False</ProtectObjects> |
1135 | + <ProtectScenarios>False</ProtectScenarios> |
1136 | + </WorksheetOptions> |
1137 | + </Worksheet> |
1138 | +</Workbook> |
1139 | \ No newline at end of file |
1140 | |
1141 | === modified file 'register_accounting/report/report_liquidity_position.py' |
1142 | --- register_accounting/report/report_liquidity_position.py 2014-03-07 11:05:37 +0000 |
1143 | +++ register_accounting/report/report_liquidity_position.py 2014-06-02 12:07:57 +0000 |
1144 | @@ -83,12 +83,17 @@ |
1145 | pool = pooler.get_pool(self.cr.dbname) |
1146 | |
1147 | sql_register_ids = """ |
1148 | - SELECT abs.id FROM account_bank_statement abs |
1149 | - LEFT JOIN account_journal aj ON abs.journal_id = aj.id |
1150 | - WHERE |
1151 | - aj.type != 'cheque' AND abs.state != 'draft' AND abs.id not in ( |
1152 | - SELECT prev_reg_id FROM account_bank_statement WHERE prev_reg_id is not null AND state != 'draft' |
1153 | - ) |
1154 | + SELECT abs.id |
1155 | + FROM account_bank_statement abs |
1156 | + LEFT JOIN account_journal aj ON abs.journal_id = aj.id |
1157 | + WHERE aj.type != 'cheque' |
1158 | + AND abs.state != 'draft' |
1159 | + AND abs.period_number = (SELECT max(abs2.period_number) |
1160 | + FROM account_bank_statement abs2 |
1161 | + LEFT JOIN account_journal aj2 ON abs2.journal_id = aj2.id |
1162 | + WHERE aj2.type != 'cheque' AND abs2.state != 'draft' |
1163 | + AND abs2.instance_id = abs.instance_id |
1164 | + AND abs2.journal_id = abs.journal_id) |
1165 | """ |
1166 | |
1167 | self.cr.execute(sql_register_ids) |