[MERGE] forward port of branch 8.0 up to e664d30
This commit is contained in:
@@ -1416,7 +1416,8 @@ class account_move_line(osv.osv):
|
|||||||
account_id = 'account_collected_id'
|
account_id = 'account_collected_id'
|
||||||
base_sign = 'base_sign'
|
base_sign = 'base_sign'
|
||||||
tax_sign = 'tax_sign'
|
tax_sign = 'tax_sign'
|
||||||
if journal.type in ('purchase_refund', 'sale_refund') or (journal.type in ('cash', 'bank') and total < 0 and tax_id.type_tax_use != 'sale'):
|
is_refund = ((total > 0 and tax_id.type_tax_use == 'sale') or (total < 0 and tax_id.type_tax_use != 'sale'))
|
||||||
|
if journal.type in ('purchase_refund', 'sale_refund') or (journal.type in ('cash', 'bank') and is_refund):
|
||||||
base_code = 'ref_base_code_id'
|
base_code = 'ref_base_code_id'
|
||||||
tax_code = 'ref_tax_code_id'
|
tax_code = 'ref_tax_code_id'
|
||||||
account_id = 'account_paid_id'
|
account_id = 'account_paid_id'
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class stock_production_lot(osv.osv):
|
|||||||
# Assign dates according to products data
|
# Assign dates according to products data
|
||||||
def create(self, cr, uid, vals, context=None):
|
def create(self, cr, uid, vals, context=None):
|
||||||
context = dict(context or {})
|
context = dict(context or {})
|
||||||
context['product_id'] = vals.get('product_id', context.get('default_product_id'))
|
context['product_id'] = vals.get('product_id', context.get('default_product_id') or context.get('product_id'))
|
||||||
return super(stock_production_lot, self).create(cr, uid, vals, context=context)
|
return super(stock_production_lot, self).create(cr, uid, vals, context=context)
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
|
|||||||
Reference in New Issue
Block a user