[IMP]remove sale.shop from yml and improve code
bzr revid: sgo@tinyerp.com-20130123123828-z7rikkrunp1rem55
This commit is contained in:
parent
e4250d1558
commit
8e94b4c7ea
|
@ -1,14 +1,3 @@
|
|||
-
|
||||
Make sure the main company has at least one shop.
|
||||
-
|
||||
!python {model: sale.shop}: |
|
||||
company_id = self.pool.get('res.users')._get_company(cr, uid, context=context)
|
||||
shop_ids = self.search(cr, uid, [('company_id', '=', company_id)])
|
||||
if not shop_ids:
|
||||
# take a shop, and assign it to the user's company
|
||||
shop_ids = self.search(cr, uid, [])
|
||||
if shop_ids:
|
||||
self.write(cr, uid, [shop_ids[0]], {'company_id': company_id})
|
||||
-
|
||||
I open the wizard "Make sales".
|
||||
-
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
partner_invoice_id: base.res_partner_address_7
|
||||
partner_shipping_id: base.res_partner_address_7
|
||||
pricelist_id: product.list0
|
||||
shop_id: sale.sale_shop_1
|
||||
-
|
||||
I confirm the sale order
|
||||
-
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
partner_shipping_id: base.res_partner_address_7
|
||||
picking_policy: direct
|
||||
pricelist_id: product.list0
|
||||
shop_id: sale.sale_shop_1
|
||||
-
|
||||
I confirm the sale order
|
||||
-
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
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.shop_id.warehouse_id.lot_stock_id.id
|
||||
output_id = sale_order.shop_id.warehouse_id.lot_output_id.id
|
||||
location_id = sale_order.warehouse_id.lot_stock_id.id
|
||||
output_id = sale_order.warehouse_id.lot_output_id.id
|
||||
for move in picking.move_lines:
|
||||
order_line = move.sale_line_id
|
||||
date_planned = datetime.strptime(sale_order.date_order, DEFAULT_SERVER_DATE_FORMAT) + relativedelta(days=order_line.delay or 0.0)
|
||||
|
|
Loading…
Reference in New Issue