[MERGE] forward port of branch 7.0 up to 2080ea0
This commit is contained in:
commit
e347011f24
|
@ -1632,7 +1632,7 @@ class stock_move(osv.osv):
|
||||||
'location_dest_id': fields.many2one('stock.location', 'Destination Location', required=True,states={'done': [('readonly', True)]}, select=True, help="Location where the system will stock the finished products."),
|
'location_dest_id': fields.many2one('stock.location', 'Destination Location', required=True,states={'done': [('readonly', True)]}, select=True, help="Location where the system will stock the finished products."),
|
||||||
'partner_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
|
'partner_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
|
||||||
|
|
||||||
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', states={'done': [('readonly', True)]}, help="Serial number is used to put a serial number on the production", select=True),
|
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', help="Serial number is used to put a serial number on the production", select=True, ondelete='restrict'),
|
||||||
'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, states={'done': [('readonly', True)]}, help="Logistical shipping unit: pallet, box, pack ..."),
|
'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, states={'done': [('readonly', True)]}, help="Logistical shipping unit: pallet, box, pack ..."),
|
||||||
|
|
||||||
'auto_validate': fields.boolean('Auto Validate'),
|
'auto_validate': fields.boolean('Auto Validate'),
|
||||||
|
|
|
@ -46,23 +46,24 @@ class stock_invoice_onshipping(osv.osv_memory):
|
||||||
browse_picking = model_pool.browse(cr, uid, res_ids, context=context)
|
browse_picking = model_pool.browse(cr, uid, res_ids, context=context)
|
||||||
|
|
||||||
for pick in browse_picking:
|
for pick in browse_picking:
|
||||||
if not pick.move_lines:
|
domain = [('type', 'in', ['sale', 'sale_refund', 'purchase', 'purchase_refund'])]
|
||||||
continue
|
if pick.move_lines:
|
||||||
src_usage = pick.move_lines[0].location_id.usage
|
src_usage = pick.move_lines[0].location_id.usage
|
||||||
dest_usage = pick.move_lines[0].location_dest_id.usage
|
dest_usage = pick.move_lines[0].location_dest_id.usage
|
||||||
type = pick.type
|
type = pick.type
|
||||||
if type == 'out' and dest_usage == 'supplier':
|
if type == 'out' and dest_usage == 'supplier':
|
||||||
journal_type = 'purchase_refund'
|
journal_type = 'purchase_refund'
|
||||||
elif type == 'out' and dest_usage == 'customer':
|
elif type == 'out' and dest_usage == 'customer':
|
||||||
journal_type = 'sale'
|
journal_type = 'sale'
|
||||||
elif type == 'in' and src_usage == 'supplier':
|
elif type == 'in' and src_usage == 'supplier':
|
||||||
journal_type = 'purchase'
|
journal_type = 'purchase'
|
||||||
elif type == 'in' and src_usage == 'customer':
|
elif type == 'in' and src_usage == 'customer':
|
||||||
journal_type = 'sale_refund'
|
journal_type = 'sale_refund'
|
||||||
else:
|
else:
|
||||||
journal_type = 'sale'
|
journal_type = 'sale'
|
||||||
|
domain = [('type', '=', journal_type)]
|
||||||
|
|
||||||
value = journal_obj.search(cr, uid, [('type', '=',journal_type )])
|
value = journal_obj.search(cr, uid, domain)
|
||||||
for jr_type in journal_obj.browse(cr, uid, value, context=context):
|
for jr_type in journal_obj.browse(cr, uid, value, context=context):
|
||||||
t1 = jr_type.id,jr_type.name
|
t1 = jr_type.id,jr_type.name
|
||||||
if t1 not in vals:
|
if t1 not in vals:
|
||||||
|
|
|
@ -545,8 +545,9 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
|
||||||
self.records.remove(record);
|
self.records.remove(record);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_(_.keys(values)).each(function(key){
|
_.each(values, function (value, key) {
|
||||||
record.set(key, values[key], {silent: true});
|
record.set(key + '__display', false, {silent: true});
|
||||||
|
record.set(key, value, {silent: true});
|
||||||
});
|
});
|
||||||
record.trigger('change', record);
|
record.trigger('change', record);
|
||||||
});
|
});
|
||||||
|
|
|
@ -190,6 +190,7 @@ class res_partner_bank(osv.osv):
|
||||||
try:
|
try:
|
||||||
if not data.get('bank_name'):
|
if not data.get('bank_name'):
|
||||||
data['bank_name'] = _('BANK')
|
data['bank_name'] = _('BANK')
|
||||||
|
data = dict((k, v or '') for (k, v) in data.iteritems())
|
||||||
name = bank_code_format[data['state']] % data
|
name = bank_code_format[data['state']] % data
|
||||||
except Exception:
|
except Exception:
|
||||||
raise osv.except_osv(_("Formating Error"), _("Invalid Bank Account Type Name format."))
|
raise osv.except_osv(_("Formating Error"), _("Invalid Bank Account Type Name format."))
|
||||||
|
|
Loading…
Reference in New Issue