merge
[fix] date bzr revid: nel@tinyerp.com-20090122124507-45iux29zjejpoc9m
This commit is contained in:
commit
a3b8583729
|
@ -152,16 +152,16 @@
|
|||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ '%.2f' % sum_debit(o.period_id.id, o.journal_id.id) or '0.00' ]]</u></para>
|
||||
<para style="P12"><u>[[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P12"><u>[[ '%.2f' % sum_credit(o.period_id.id, o.journal_id.id) or '0.00' ]]</u></para>
|
||||
<para style="P12"><u>[[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_8">[[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]]</para>
|
||||
<para style="terp_default_8">[[ line.date ]]</para>
|
||||
<para style="terp_default_8">[[ formatLang(line.date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ line.ref ]]</para>
|
||||
|
@ -176,10 +176,10 @@
|
|||
<para style="terp_default_8">[[ line.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ line.debit and '%.2f' % line.debit or '0.00' ]]</para>
|
||||
<para style="P8">[[ formatLang(line.debit) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ line.credit and '%.2f' % line.credit or '0.00' ]]</para>
|
||||
<para style="P8">[[ formatLang(line.credit) ]]</para>
|
||||
</td>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
<para style="P2">Partners</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]] [[data['form']['date1'] ]]</para>
|
||||
<para style="P8">[[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]] [[formatLang(data['form']['date1'],date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P8">[[ data['form']['4']['name'] ]]</para>
|
||||
|
|
|
@ -89,8 +89,11 @@ class account_report(osv.osv):
|
|||
if not context['fiscalyear']:
|
||||
del context['fiscalyear']
|
||||
acc = self.pool.get('account.account')
|
||||
acc_id = acc.search(cr, uid, [('code','in',code)])
|
||||
return reduce(lambda y,x=0: x.balance+y, acc.browse(cr, uid, acc_id, context),0.0)
|
||||
account_ids = []
|
||||
for c in code:
|
||||
for i in c.split('-'):
|
||||
account_ids += acc.search(cr, uid, [('code', 'ilike', i)])
|
||||
return reduce(lambda y,x=0: x.balance+y, acc.browse(cr, uid, account_ids, context),0.0)
|
||||
|
||||
def _calc_report(*code):
|
||||
acc = self.pool.get('account.report.report')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
|
@ -205,22 +205,23 @@ class mrp_procurement(osv.osv):
|
|||
continue
|
||||
if qty<=0:
|
||||
continue
|
||||
proc_id = procurement_obj.create(cr, uid, {
|
||||
'name': 'OP:'+str(op.id),
|
||||
'date_planned': newdate.strftime('%Y-%m-%d'),
|
||||
'product_id': op.product_id.id,
|
||||
'product_qty': qty,
|
||||
'product_uom': op.product_uom.id,
|
||||
'location_id': op.warehouse_id.lot_input_id.id,
|
||||
'procure_method': 'make_to_order',
|
||||
'origin': op.name
|
||||
})
|
||||
wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
|
||||
'button_confirm', cr)
|
||||
wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
|
||||
'button_check', cr)
|
||||
orderpoint_obj.write(cr, uid, [op.id],
|
||||
{'procurement_id': proc_id})
|
||||
if op.product_id.type not in ('consu'):
|
||||
proc_id = procurement_obj.create(cr, uid, {
|
||||
'name': 'OP:'+str(op.id),
|
||||
'date_planned': newdate.strftime('%Y-%m-%d'),
|
||||
'product_id': op.product_id.id,
|
||||
'product_qty': qty,
|
||||
'product_uom': op.product_uom.id,
|
||||
'location_id': op.warehouse_id.lot_input_id.id,
|
||||
'procure_method': 'make_to_order',
|
||||
'origin': op.name
|
||||
})
|
||||
wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
|
||||
'button_confirm', cr)
|
||||
wf_service.trg_validate(uid, 'mrp.procurement', proc_id,
|
||||
'button_check', cr)
|
||||
orderpoint_obj.write(cr, uid, [op.id],
|
||||
{'procurement_id': proc_id})
|
||||
offset += len(ids)
|
||||
if use_new_cursor:
|
||||
cr.commit()
|
||||
|
|
Loading…
Reference in New Issue