[MERGE] forward port of branch 7.0 up to e33bcde
This commit is contained in:
commit
55d6c190da
|
@ -402,8 +402,8 @@ class account_asset_depreciation_line(osv.osv):
|
||||||
context.update({'date': depreciation_date})
|
context.update({'date': depreciation_date})
|
||||||
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context)
|
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
|
sign = (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1
|
||||||
asset_name = line.asset_id.name
|
asset_name = "/"
|
||||||
reference = line.name
|
reference = line.asset_id.name
|
||||||
move_vals = {
|
move_vals = {
|
||||||
'name': asset_name,
|
'name': asset_name,
|
||||||
'date': depreciation_date,
|
'date': depreciation_date,
|
||||||
|
|
|
@ -61,6 +61,9 @@ class stock_return_picking(osv.osv_memory):
|
||||||
result1 = []
|
result1 = []
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
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)
|
res = super(stock_return_picking, self).default_get(cr, uid, fields, context=context)
|
||||||
record_id = context and context.get('active_id', False) or False
|
record_id = context and context.get('active_id', False) or False
|
||||||
pick_obj = self.pool.get('stock.picking')
|
pick_obj = self.pool.get('stock.picking')
|
||||||
|
|
Loading…
Reference in New Issue