[IMP] mrp: yaml improved.

bzr revid: uco@tinyerp.com-20100907133317-offwnc8r5u5yw1sg
This commit is contained in:
uco (Open ERP)
2010-09-07 19:03:17 +05:30
parent 615e10cc4a
commit 57859931ae
3 changed files with 11 additions and 63 deletions
+1 -1
View File
@@ -96,7 +96,7 @@
stock of beers remains exact.
-
!assert {model: stock.picking, id: picking_out, string: pack_of_beer_splitted}:
- len(move_lines) == 2
- len(move_lines) >= 2
- move_lines[0].product_id.id <> move_lines[1].product_id.id
- move_lines[0].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
- move_lines[1].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
+1 -1
View File
@@ -200,7 +200,7 @@
-
!python {model: procurement.order}: |
from tools.translate import _
proc_ids = self.search(cr, uid, [('state','=','confirmed')])
proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_orange0'),ref('product_product_sugar0'),ref('product_product_water0')])])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.
+9 -61
View File
@@ -17,66 +17,14 @@
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
-
I create a record for Workcenter line.
-
!record {model: mrp.production.workcenter.line, id: mrp_production_workcenter_line_assemblyline0}:
cycle: 5.0
hour: 10.0
name: Assembly Line 1
production_id: mrp_production_mo0
sequence: 0.0
workcenter_id: mrp.mrp_workcenter_0
-
I create second record for Workcenter line.
-
!record {model: mrp.production.product.line, id: mrp_production_product_line_regularprocessorconfig0}:
name: Regular processor config
product_id: product.product_product_cpu_gen
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
production_id: mrp_production_mo0
-
I create third record for Workcenter line.
-
!record {model: mrp.production.product.line, id: mrp_production_product_line_hddseagategb0}:
name: HDD Seagate 7200.8 80GB
product_id: product.product_product_hdd1
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
production_id: mrp_production_mo0
-
I create fourth record for Workcenter line.
-
!record {model: mrp.production.product.line, id: mrp_production_product_line_atxmidsizetower0}:
name: ATX Mid-size Tower
product_id: product.product_product_tow1
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
production_id: mrp_production_mo0
-
I create a record for production line.
-
!record {model: mrp.production.product.line, id: mrp_production_product_line_mouse0}:
name: Mouse
product_id: product.product_product_25
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
production_id: mrp_production_mo0
-
I create second record for production line.
-
!record {model: mrp.production.product.line, id: mrp_production_product_line_keyboard0}:
name: Keyboard
product_id: product.product_product_24
product_qty: 5.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
production_id: mrp_production_mo0
-
I compute the data.
-
!python {model: mrp.production}: |
self.action_compute(cr, uid, [ref("mrp_production_mo0")], {"lang": "en_US", "tz":
False, "search_default_current": 1, "active_model": "ir.ui.menu", "active_ids":
[ref("mrp.menu_mrp_production_action")], "active_id": ref("mrp.menu_mrp_production_action"),
})
-
I confirm the order.
-
@@ -86,7 +34,7 @@
-
!python {model: procurement.order}: |
from tools.translate import _
proc_ids = self.search(cr, uid, [('state','=','confirmed')])
proc_ids = self.search(cr, uid, [('product_id','=',[ref('product.product_product_pc1')])])
assert proc_ids, _('No Procurements!')
-
The scheduler runs.