[FIX] sale_margin: error in yaml test
bzr revid: qdp-launchpad@openerp.com-20121024130925-k431qqhmpx5aok20
This commit is contained in:
parent
920d85d80c
commit
fb9af9f8bb
|
@ -305,8 +305,15 @@ class account_analytic_line(osv.osv):
|
|||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
|
||||
}
|
||||
|
||||
def _get_default_datum(self, cr, uid, context=None):
|
||||
import pprint; PP = pprint.PrettyPrinter()
|
||||
import pdb; pdb.set_trace()
|
||||
print 'dans analytic'
|
||||
return fields.date.context_today()
|
||||
|
||||
_defaults = {
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'date': _get_default_datum,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
|
||||
'amount': 0.00
|
||||
}
|
||||
|
|
|
@ -210,4 +210,15 @@ class account_analytic_account(osv.osv):
|
|||
|
||||
account_analytic_account()
|
||||
|
||||
class account_analytic_line(osv.osv):
|
||||
_inherit = 'account.analytic.line'
|
||||
|
||||
def _get_default_date(self, cr, uid, context=None):
|
||||
print 'not called'
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('timesheet_date'):
|
||||
return context.get('timesheet_date')
|
||||
return super(account_analytic_line, self)._get_default_date(cr, uid, context=context)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
partner_id: base.res_partner_4
|
||||
partner_invoice_id: base.res_partner_address_7
|
||||
partner_shipping_id: base.res_partner_address_7
|
||||
picking_policy: direct
|
||||
pricelist_id: product.list0
|
||||
shop_id: sale.sale_shop_1
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue