[MERGE] forward port of branch saas-3 up to 55d6c19

This commit is contained in:
Christophe Simonis 2015-05-28 14:45:30 +02:00
commit 970f9466aa
2 changed files with 5 additions and 2 deletions

View File

@ -396,8 +396,8 @@ class account_asset_depreciation_line(osv.osv):
context.update({'date': depreciation_date})
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context)
sign = (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1
asset_name = line.asset_id.name
reference = line.name
asset_name = "/"
reference = line.asset_id.name
move_vals = {
'name': asset_name,
'date': depreciation_date,

View File

@ -57,6 +57,9 @@ class stock_return_picking(osv.osv_memory):
result1 = []
if context is None:
context = {}
if context and context.get('active_ids', False):
if len(context.get('active_ids')) > 1:
raise osv.except_osv(_('Warning!'), _("You may only return one picking at a time!"))
res = super(stock_return_picking, self).default_get(cr, uid, fields, context=context)
record_id = context and context.get('active_id', False) or False
uom_obj = self.pool.get('product.uom')