summaryrefslogtreecommitdiff
path: root/addons/mrp/tests/test_workorder_operation.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2020-04-07 13:51:30 +0000
committerRaphael Collet <rco@odoo.com>2020-05-18 09:51:43 +0000
commitea3e39506a2b360545ec0cd1d3235e69ad16ea6c (patch)
tree9d103c7a40911c988e1a3cbecfd8d6a76a3a9a85 /addons/mrp/tests/test_workorder_operation.py
parent2e56191c8b86d05bbce17790de8a4732c0478013 (diff)
[IMP] models: use slots for BaseModel
This restricts the attributes of a BaseModel instance to `env`, `_ids` and `_prefetch_ids`. This way, one can only assign fields on a record; other assignments are programming errors. This also reduces the memory footprint of records from 168 to 64 bytes (-62%), and makes their instanciation faster. closes odoo/odoo#51075 Related: odoo/enterprise#10529 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/mrp/tests/test_workorder_operation.py')
-rw-r--r--addons/mrp/tests/test_workorder_operation.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/addons/mrp/tests/test_workorder_operation.py b/addons/mrp/tests/test_workorder_operation.py
index c1125633bf1..de8b40ae1b4 100644
--- a/addons/mrp/tests/test_workorder_operation.py
+++ b/addons/mrp/tests/test_workorder_operation.py
@@ -1264,20 +1264,6 @@ class TestWorkOrderProcess(TestWorkOrderProcessCommon):
production sooner """
self.workcenter_1.alternative_workcenter_ids = self.wc_alt_1 | self.wc_alt_2
self.env['mrp.workcenter'].search([]).write({'tz': 'UTC'}) # compute all date in UTC
- mrp_routing_0 = self.env['mrp.routing'].create({
- 'name': 'Primary Assembly',
- })
- mrp_workcenter_3 = self.env['mrp.workcenter'].create({
- 'name': 'Assembly Line 1',
- 'resource_calendar_id': self.env.ref('resource.resource_calendar_std').id,
- })
- mrp_routing_workcenter_0 = self.env['mrp.routing.workcenter'].create({
- 'routing_id': mrp_routing_0.id,
- 'workcenter_id': mrp_workcenter_3.id,
- 'name': 'Manual Assembly',
- 'time_cycle': 60,
- })
- self.planning_bom.routing = mrp_routing_0
mo_form = Form(self.env['mrp.production'])
mo_form.product_id = self.product_4
mo_form.bom_id = self.planning_bom