parent
c72da62763
commit
fe8fa28064
|
@ -139,7 +139,8 @@ class res_partner(osv.osv):
|
|||
return [('id','in',map(lambda x:x[0], res))]
|
||||
|
||||
_columns = {
|
||||
'credit': fields.function(_credit_debit_get, fnct_search=_credit_search, method=True, string='Total Receivable', multi='dc', help="Total amount this customer owes you."),
|
||||
'credit': fields.function(_credit_debit_get,
|
||||
fnct_search=_credit_search, method=True, string='Total Receivable', multi='dc', help="Total amount this customer owes you."),
|
||||
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, method=True, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
|
||||
'debit_limit': fields.float('Payable Limit'),
|
||||
'property_account_payable': fields.property(
|
||||
|
|
|
@ -460,13 +460,17 @@ class stock_picking(osv.osv):
|
|||
def action_confirm(self, cr, uid, ids, context={}):
|
||||
self.write(cr, uid, ids, {'state': 'confirmed'})
|
||||
todo = []
|
||||
todo2 = []
|
||||
for picking in self.browse(cr, uid, ids):
|
||||
for r in picking.move_lines:
|
||||
if r.state=='draft':
|
||||
todo.append(r.id)
|
||||
else:
|
||||
todo2.append(r.id)
|
||||
todo = self.action_explode(cr, uid, todo, context)
|
||||
if len(todo):
|
||||
self.pool.get('stock.move').action_confirm(cr, uid, todo, context)
|
||||
self.pool.get('stock.move').action_chain(cr, uid, todo+todo2, context)
|
||||
return True
|
||||
|
||||
def test_auto_picking(self, cr, uid, ids):
|
||||
|
@ -1009,8 +1013,12 @@ class stock_move(osv.osv):
|
|||
|
||||
def action_confirm(self, cr, uid, ids, context={}):
|
||||
# ids = map(lambda m: m.id, moves)
|
||||
moves = self.browse(cr, uid, ids)
|
||||
self.write(cr, uid, ids, {'state':'confirmed'})
|
||||
return []
|
||||
|
||||
def action_chain(self, cr, uid, ids, context={}):
|
||||
moves = self.browse(cr, uid, ids)
|
||||
|
||||
for picking, todo in self._chain_compute(cr, uid, moves, context).items():
|
||||
ptype = self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])
|
||||
pickid = self.pool.get('stock.picking').create(cr, uid, {
|
||||
|
|
Loading…
Reference in New Issue