[FIX] account: valdating moves did not create analytic entries and small change in view
bzr revid: mra@mra-laptop-20100702055501-evpi2n97wnio5t19
This commit is contained in:
parent
c4aa8bc8a3
commit
047be68674
|
@ -1199,6 +1199,7 @@ class account_move(osv.osv):
|
|||
#
|
||||
# Validate a balanced move. If it is a centralised journal, create a move.
|
||||
#
|
||||
|
||||
def validate(self, cr, uid, ids, context={}):
|
||||
if context and ('__last_update' in context):
|
||||
del context['__last_update']
|
||||
|
@ -1283,11 +1284,11 @@ class account_move(osv.osv):
|
|||
'state': 'draft'
|
||||
}, context, check=False)
|
||||
ok = False
|
||||
if ok:
|
||||
list_ids = []
|
||||
for tmp in move.line_id:
|
||||
list_ids.append(tmp.id)
|
||||
self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
|
||||
if ok:
|
||||
list_ids = []
|
||||
for tmp in move.line_id:
|
||||
list_ids.append(tmp.id)
|
||||
self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
|
||||
return ok
|
||||
account_move()
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="terp-camera_test"/>
|
||||
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="stock_effects-object-colorize"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="terp-dolar"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue