[MERGE] joel's branch containing fixes about constraints newly added
bzr revid: qdp-launchpad@openerp.com-20121127102442-l4qolhlmbn4g788o
This commit is contained in:
commit
65d03bad15
|
@ -33,8 +33,10 @@ class Invoice(osv.osv):
|
|||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
payment_line_obj = self.pool.get('payment.line')
|
||||
for inv in self.browse(cr, uid, ids, context=context):
|
||||
inv_mv_lines = [x.id for x in inv.move_id.line_id]
|
||||
pl_line_ids = payment_line_obj.search(cr, uid, [('move_line_id','in',inv_mv_lines)], context=context)
|
||||
pl_line_ids = []
|
||||
if inv.move_id and inv.move_id.line_id:
|
||||
inv_mv_lines = [x.id for x in inv.move_id.line_id]
|
||||
pl_line_ids = payment_line_obj.search(cr, uid, [('move_line_id','in',inv_mv_lines)], context=context)
|
||||
if pl_line_ids:
|
||||
pay_line = payment_line_obj.browse(cr, uid, pl_line_ids, context=context)
|
||||
payment_order_name = ','.join(map(lambda x: x.order_id.reference, pay_line))
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
-
|
||||
I create a cash account with currency USD
|
||||
-
|
||||
!record {model: account.account, id: account_cash_usd_id}:
|
||||
!record {model: account.account, id: account_cash_usd_id2}:
|
||||
currency_id: base.USD
|
||||
name: "cash account in usd"
|
||||
code: "Xcash usd"
|
||||
|
@ -56,8 +56,8 @@
|
|||
type: bank
|
||||
analytic_journal_id: account.sit
|
||||
sequence_id: account.sequence_bank_journal
|
||||
default_debit_account_id: account_cash_usd_id
|
||||
default_credit_account_id: account_cash_usd_id
|
||||
default_debit_account_id: account_cash_usd_id2
|
||||
default_credit_account_id: account_cash_usd_id2
|
||||
currency: base.USD
|
||||
company_id: base.main_company
|
||||
view_id: account.account_journal_bank_view
|
||||
|
|
Loading…
Reference in New Issue