[WIP] Undo ondelete settings, work out of dropship tests
bzr revid: jco@openerp.com-20130723075053-4bodpyhx5oliz14q
This commit is contained in:
parent
53ea7007f2
commit
7b5875caea
|
@ -58,6 +58,7 @@ class procurement_group(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Reference'),
|
||||
'partner_id': fields.many2one('res.partner', string = 'Partner'), #Sale should pass it here
|
||||
'procurement_ids': fields.many2one('procurement.order', 'group_id', 'Procurements'),
|
||||
}
|
||||
_defaults = {
|
||||
'name': lambda self, cr, uid, c: self.pool.get('ir.sequence').get(cr, uid, 'procurement.group') or ''
|
||||
|
|
|
@ -2305,11 +2305,11 @@ class stock_package(osv.osv):
|
|||
store={'stock.quant.package': (_get_subpackages, ['name', 'parent_id'], 10)}),
|
||||
'parent_left': fields.integer('Left Parent', select=1),
|
||||
'parent_right': fields.integer('Right Parent', select=1),
|
||||
'packaging_id': fields.many2one('product.packaging', 'Type of Packaging'),
|
||||
'packaging_id': fields.many2one('product.packaging', 'Type of Packaging', type="many2one"),
|
||||
'quant_ids': fields.one2many('stock.quant', 'package_id', 'Bulk Content'),
|
||||
'location_id': fields.related('quant_ids', 'location_id', type='many2one', relation='stock.location', string='Location',
|
||||
store = {'stock.quant': (_get_packages, ['location_id'], 10)}, readonly=True),
|
||||
'quant_ids': fields.one2many('stock.quant', 'package_id', 'Bulk Content'),
|
||||
'parent_id': fields.many2one('stock.quant.package', 'Container Package', help="The package containing this item", ondelete = "cascade"),
|
||||
'parent_id': fields.many2one('stock.quant.package', 'Container Package', help="The package containing this item"),
|
||||
'children_ids': fields.one2many('stock.quant.package', 'parent_id', 'Contained Packages'),
|
||||
|
||||
}
|
||||
|
|
|
@ -1,21 +1,53 @@
|
|||
-
|
||||
Create new product candy without any routes
|
||||
Create new product without any routes
|
||||
-
|
||||
!record {model:product.product, id:}
|
||||
-
|
||||
Create a sales order with a line of 200 PCE incoming shipment, with route_id drop shipping
|
||||
-
|
||||
!record {model: sale.order}
|
||||
!record {model: sale.order, id: } :
|
||||
customer:
|
||||
- product_id:
|
||||
product_qty: 200
|
||||
product_uom:
|
||||
supplier_ids:
|
||||
|
||||
|
||||
-
|
||||
Confirm sales order
|
||||
-
|
||||
!python{model: sale.order}: |
|
||||
|
||||
self.browse(cr, uid, ref()).action_b
|
||||
-
|
||||
Run schedulers
|
||||
Check the sales order created a procurement group which has a procurement of 200 pieces
|
||||
-
|
||||
!python{model: procurement.order, id: }: |
|
||||
|
||||
!python{model: procurement.group}: |
|
||||
proc_group = self.search(cr, uid, [('sale_id', '=', ref())])
|
||||
assert self.browse(cr, uid, proc_group)[0].procurement_ids[0].product_qty == 200
|
||||
-
|
||||
Check a quotation was created to a certain supplier and confirm so it becomes a confirmed purchase order
|
||||
-
|
||||
|
||||
-
|
||||
Check the sales order has one picking with 200 pieces
|
||||
-
|
||||
!python{model: sale.order}: |
|
||||
assert len(self.browse(cr, uid, ref()).picking_ids) == 1
|
||||
-
|
||||
Use 'View Delivery Order' button to immediately view this picking and check shipped of purchase order is False
|
||||
-
|
||||
|
||||
-
|
||||
Send the 200 pieces
|
||||
-
|
||||
!python{model: stock.partial.picking}: |
|
||||
|
||||
|
||||
-
|
||||
Check one quant was created in Customers location with 200 pieces and one move in the move_history_ids
|
||||
-
|
||||
|
||||
-
|
||||
Check the sum of the moves related to this product and the sum of the quants is equal
|
||||
-
|
||||
|
||||
|
|
Loading…
Reference in New Issue