[IMP] remove invoice_state field from create,write methods and _default at stock.picking
bzr revid: rma@tinyerp.com-20130807130948-vcvh73ufmv7zed7i
This commit is contained in:
parent
b5d729d874
commit
8773c107c6
|
@ -189,7 +189,6 @@
|
|||
-
|
||||
!record {model: stock.picking, id: stock_picking_out001}:
|
||||
partner_id: base.res_partner_13
|
||||
invoice_state: 2binvoiced
|
||||
move_lines:
|
||||
- company_id: base.main_company
|
||||
location_id: stock.stock_location_stock
|
||||
|
|
|
@ -192,7 +192,6 @@
|
|||
-
|
||||
!record {model: stock.picking, id: stock_picking_out001_fifo}:
|
||||
partner_id: base.res_partner_13
|
||||
invoice_state: 2binvoiced
|
||||
move_lines:
|
||||
- company_id: base.main_company
|
||||
location_id: stock.stock_location_stock
|
||||
|
|
|
@ -526,7 +526,6 @@ class mrp_repair(osv.osv):
|
|||
'move_type': 'one',
|
||||
'partner_id': repair.address_id and repair.address_id.id or False,
|
||||
'note': repair.internal_notes,
|
||||
'invoice_state': 'none',
|
||||
'picking_type_id': self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'picking_type_out', context=context).id
|
||||
})
|
||||
move_id = move_obj.create(cr, uid, {
|
||||
|
|
|
@ -704,7 +704,6 @@ class pos_order(osv.osv):
|
|||
'company_id': order.company_id.id,
|
||||
'move_type': 'direct',
|
||||
'note': order.note or "",
|
||||
'invoice_state': 'none',
|
||||
}, context=context)
|
||||
self.write(cr, uid, [order.id], {'picking_id': picking_id}, context=context)
|
||||
location_id = order.warehouse_id.lot_stock_id.id
|
||||
|
|
|
@ -659,7 +659,6 @@ class purchase_order(osv.osv):
|
|||
'origin': order.name + ((order.origin and (':' + order.origin)) or ''),
|
||||
'date': self.date_to_datetime(cr, uid, order.date_order, context),
|
||||
'partner_id': order.dest_address_id.id or order.partner_id.id,
|
||||
'invoice_state': '2binvoiced' if order.invoice_method == 'picking' else 'none',
|
||||
'partner_id': order.dest_address_id.id or order.partner_id.id,
|
||||
'purchase_id': order.id,
|
||||
'company_id': order.company_id.id,
|
||||
|
|
|
@ -162,7 +162,7 @@ class sale_order(osv.osv):
|
|||
res = super(sale_order,self).action_invoice_create(cr, uid, ids, grouped=grouped, states=states, date_invoice = date_invoice, context=context)
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
if order.order_policy == 'picking':
|
||||
picking_obj.write(cr, uid, map(lambda x: x.id, order.picking_ids), {'invoice_state': 'invoiced'})
|
||||
picking_obj.write(cr, uid, map(lambda x: x.id, order.picking_ids))
|
||||
return res
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -57,9 +57,6 @@ class stock_picking(osv.osv):
|
|||
},
|
||||
),
|
||||
}
|
||||
_defaults = {
|
||||
'invoice_state': lambda *args, **argv: 'none'
|
||||
}
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, journal_id=False, group=False, type='out_invoice', context=None):
|
||||
""" Creates invoice based on the invoice state selected for picking.
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
assert picking.move_type == sale_order.picking_policy,"Delivery Method is not corresponding with delivery method of sale order."
|
||||
assert picking.partner_id.id == sale_order.partner_shipping_id.id,"Shipping Address is not correspond with sale order."
|
||||
assert picking.note == sale_order.note,"Note is not correspond with sale order."
|
||||
assert picking.invoice_state == (sale_order.order_policy=='picking' and '2binvoiced') or 'none',"Invoice policy is not correspond with sale order."
|
||||
assert len(picking.move_lines) == len(sale_order.order_line), "Total move of delivery order are not corresposning with total sale order lines."
|
||||
location_id = sale_order.warehouse_id.lot_stock_id.id
|
||||
output_id = sale_order.warehouse_id.lot_output_id.id
|
||||
|
|
|
@ -78,9 +78,6 @@
|
|||
|
||||
-
|
||||
I return last incomming shipment for 10 kgm Ice-cream.
|
||||
-
|
||||
!record {model: stock.return.picking, id: return_incomming}:
|
||||
invoice_state: none
|
||||
-
|
||||
!python {model: stock.return.picking }: |
|
||||
# this work without giving the id of the picking to return, magically, thanks to the context
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
-
|
||||
!record {model: stock.picking, id: stock_picking_out0}:
|
||||
partner_id: base.res_partner_address_22
|
||||
invoice_state: 2binvoiced
|
||||
move_lines:
|
||||
- company_id: base.main_company
|
||||
location_id: stock.stock_location_stock
|
||||
|
|
Loading…
Reference in New Issue