[MERGE] merged the branch related to the server patch to not special case the fields.related
bzr revid: qdp-launchpad@openerp.com-20121019122100-02os971iy8yihml4
This commit is contained in:
commit
5d315fac34
|
@ -1422,7 +1422,7 @@ class account_voucher_line(osv.osv):
|
|||
}
|
||||
|
||||
def onchange_reconcile(self, cr, uid, ids, reconcile, amount, amount_unreconciled, context=None):
|
||||
vals = { 'amount': 0.0}
|
||||
vals = {'amount': 0.0}
|
||||
if reconcile:
|
||||
vals = { 'amount': amount_unreconciled}
|
||||
return {'value': vals}
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
account_id: account.cash
|
||||
amount: 1000.0
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher Axelor
|
||||
narration: PC Assemble SC234
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
'account_id': ref('account.cash'),
|
||||
'amount': 450.0,
|
||||
'company_id': ref('base.main_company'),
|
||||
'currency_id': ref('base.EUR'),
|
||||
'journal_id': ref('account.bank_journal'),
|
||||
'partner_id': ref('base.res_partner_19'),
|
||||
'period_id': ref('account.period_8'),
|
||||
|
@ -53,6 +52,10 @@
|
|||
}
|
||||
if not res['value']['line_cr_ids']:
|
||||
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
|
||||
#clients aren't sending value of readonly fields in the view, and there is a good reason for that, so here the
|
||||
#create should only use values of fields that are not readonly. That's why i'm removing some of these values
|
||||
del(res['value']['line_cr_ids'][0]['date_original'])
|
||||
del(res['value']['line_cr_ids'][0]['date_due'])
|
||||
res['value']['line_cr_ids'][0]['amount'] = 450.0
|
||||
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
|
||||
id = self.create(cr, uid, vals)
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
'account_id': ref('account.cash'),
|
||||
'amount': 30000.0,
|
||||
'company_id': ref('base.main_company'),
|
||||
'currency_id': ref('base.EUR'),
|
||||
'journal_id': ref('account.bank_journal'),
|
||||
'partner_id': ref('base.res_partner_19'),
|
||||
'period_id': ref('account.period_8'),
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
import time
|
||||
uid = ref('base.user_demo')
|
||||
new_id = self.create(cr, uid, {'emp_id': ref('hr.employee_qdp'), 'name': 'Quentin Paolino',
|
||||
'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'present'})
|
||||
'server_date': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
self.sign_in_result(cr, uid, [new_id], context)
|
||||
-
|
||||
I change my project "Thymbra" and I click on the "Change Work" button of this wizard
|
||||
|
|
Loading…
Reference in New Issue