[IMP] Maifest for Github README.md on main apps
[odoo/odoo.git] / addons / stock_dropshipping / test / crossdock.yml
1
2   Create new product without any routes
3
4   !record {model: product.product, id: cross_shop_product}:
5     name: PCE
6     type: product
7     categ_id: product.product_category_1
8     list_price: 100.0
9     standard_price: 70.0
10     seller_ids:
11       - delay: 1
12         name: base.res_partner_2
13         min_qty: 2.0
14         qty: 5.0
15     type: product
16     uom_id: product.product_uom_unit
17     uom_po_id: product.product_uom_unit
18
19   Create a sales order with a line of 100 PCE incoming shipment, with route_id crossdock shipping.
20
21   !record {model: sale.order, id: sale_order_crossdock_shpng}:
22     partner_id: base.res_partner_4
23     note: Create Sales order
24     order_line:
25       - product_id: cross_shop_product
26         product_uom_qty: 100.00
27 -
28     !python {model: sale.order.line}: |
29         route_warehouse0_crossdock = self.pool.get('stock.warehouse').browse(cr, uid, ref('stock.warehouse0')).crossdock_route_id.id 
30         order = self.pool.get('sale.order').browse(cr, uid, ref('sale_order_crossdock_shpng'))
31         line_ids = [x.id for x in order.order_line]
32         self.write(cr, uid, line_ids, {'route_id': route_warehouse0_crossdock})
33
34   Confirm sales order
35
36   !workflow {model: sale.order, action: order_confirm, ref: sale_order_crossdock_shpng}
37
38     Check a quotation was created to a certain supplier and confirm so it becomes a confirmed purchase order
39 -
40     !python {model: purchase.order}: |
41         po_id = self.search(cr, uid, [('partner_id', '=', ref('base.res_partner_2'))])
42         self.wkf_confirm_order(cr, uid, po_id)