|
1 | | -<?xml version="1.0" encoding="utf-8"?> |
| 1 | +<?xml version="1.0" encoding="utf-8" ?> |
2 | 2 | <odoo> |
3 | 3 | <data noupdate="1"> |
4 | 4 |
|
5 | 5 | <record id="stock_warehouse_maintenance" model="stock.warehouse"> |
6 | 6 | <field name="name">Maintenance Warehouse</field> |
7 | | - <field name="partner_id" ref="stock.res_partner_address_41"/> |
8 | | - <field name="company_id" ref="stock.res_company_1"/> |
| 7 | + <field name="partner_id" ref="stock.res_partner_address_41" /> |
| 8 | + <field name="company_id" ref="stock.res_company_1" /> |
9 | 9 | <field name="code">Main</field> |
10 | 10 | </record> |
11 | 11 |
|
12 | 12 | <function model="ir.model.data" name="_update_xmlids"> |
13 | | - <value model="base" eval="[{ |
| 13 | + <value |
| 14 | + model="base" |
| 15 | + eval="[{ |
14 | 16 | 'xml_id': 'maintenance_stock.main_picking_type_cons', |
15 | 17 | 'record': obj().env.ref('maintenance_stock.stock_warehouse_maintenance').cons_type_id, |
16 | 18 | 'noupdate': True, |
|
22 | 24 | 'xml_id': 'maintenance_stock.main_location_cons', |
23 | 25 | 'record': obj().env.ref('maintenance_stock.stock_warehouse_maintenance').wh_cons_loc_id, |
24 | 26 | 'noupdate': True, |
25 | | - }]"/> |
| 27 | + }]" |
| 28 | + /> |
26 | 29 | </function> |
27 | 30 |
|
28 | 31 | <record id="product_toner" model="product.product"> |
29 | 32 | <field name="default_code">TON_1234</field> |
30 | 33 | <field name="name">Toner</field> |
31 | 34 | <field name="type">product</field> |
32 | | - <field name="categ_id" ref="product.product_category_5"/> |
| 35 | + <field name="categ_id" ref="product.product_category_5" /> |
33 | 36 | <field name="lst_price">100.0</field> |
34 | 37 | <field name="standard_price">70.0</field> |
35 | | - <field name="uom_id" ref="uom.product_uom_unit"/> |
36 | | - <field name="uom_po_id" ref="uom.product_uom_unit"/> |
37 | | - <field name="property_stock_inventory" ref="stock.location_inventory"/> |
38 | | - <field name="image" type="base64" file="maintenance_stock/static/img/toner.png"/> |
| 38 | + <field name="uom_id" ref="uom.product_uom_unit" /> |
| 39 | + <field name="uom_po_id" ref="uom.product_uom_unit" /> |
| 40 | + <field name="property_stock_inventory" ref="stock.location_inventory" /> |
| 41 | + <field |
| 42 | + name="image" |
| 43 | + type="base64" |
| 44 | + file="maintenance_stock/static/img/toner.png" |
| 45 | + /> |
39 | 46 | </record> |
40 | 47 |
|
41 | 48 | <record id="stock_inventory_toner" model="stock.inventory"> |
42 | 49 | <field name="name">Inventory for Toner</field> |
43 | 50 | <field name="filter">product</field> |
44 | | - <field name="product_id" ref="maintenance_stock.product_toner"/> |
| 51 | + <field name="product_id" ref="maintenance_stock.product_toner" /> |
45 | 52 | </record> |
46 | 53 |
|
47 | 54 | <record id="stock_inventory_toner_line" model="stock.inventory.line"> |
48 | | - <field name="product_id" ref="maintenance_stock.product_toner"/> |
49 | | - <field name="product_uom_id" ref="uom.product_uom_unit"/> |
50 | | - <field name="inventory_id" ref="maintenance_stock.stock_inventory_toner"/> |
| 55 | + <field name="product_id" ref="maintenance_stock.product_toner" /> |
| 56 | + <field name="product_uom_id" ref="uom.product_uom_unit" /> |
| 57 | + <field name="inventory_id" ref="maintenance_stock.stock_inventory_toner" /> |
51 | 58 | <field name="product_qty">50.0</field> |
52 | | - <field name="location_id" ref="maintenance_stock.main_location_stock"/> |
| 59 | + <field name="location_id" ref="maintenance_stock.main_location_stock" /> |
53 | 60 | </record> |
54 | 61 |
|
55 | 62 | <function model="stock.inventory" name="action_validate"> |
56 | | - <function eval="[[('state','=','draft'),('id', '=', ref('maintenance_stock.stock_inventory_toner'))]]" model="stock.inventory" name="search"/> |
| 63 | + <function |
| 64 | + eval="[[('state','=','draft'),('id', '=', ref('maintenance_stock.stock_inventory_toner'))]]" |
| 65 | + model="stock.inventory" |
| 66 | + name="search" |
| 67 | + /> |
57 | 68 | </function> |
58 | 69 |
|
59 | 70 | <record id="maintenance.equipment_printer1" model="maintenance.equipment"> |
60 | | - <field name="allow_consumptions" eval="True"/> |
61 | | - <field name="default_consumption_warehouse_id" |
62 | | - ref="maintenance_stock.stock_warehouse_maintenance"/> |
| 71 | + <field name="allow_consumptions" eval="True" /> |
| 72 | + <field |
| 73 | + name="default_consumption_warehouse_id" |
| 74 | + ref="maintenance_stock.stock_warehouse_maintenance" |
| 75 | + /> |
63 | 76 | </record> |
64 | 77 |
|
65 | 78 | <record id="m_request_1" model="maintenance.request"> |
66 | 79 | <field name="name">Change toner</field> |
67 | | - <field name="user_id" ref="base.user_demo"/> |
68 | | - <field name="owner_user_id" ref="base.user_admin"/> |
69 | | - <field name="equipment_id" ref="maintenance.equipment_printer1"/> |
| 80 | + <field name="user_id" ref="base.user_demo" /> |
| 81 | + <field name="owner_user_id" ref="base.user_admin" /> |
| 82 | + <field name="equipment_id" ref="maintenance.equipment_printer1" /> |
70 | 83 | <field name="color">7</field> |
71 | | - <field name="stage_id" ref="maintenance.stage_1"/> |
72 | | - <field name="maintenance_team_id" ref="maintenance.equipment_team_maintenance"/> |
| 84 | + <field name="stage_id" ref="maintenance.stage_1" /> |
| 85 | + <field |
| 86 | + name="maintenance_team_id" |
| 87 | + ref="maintenance.equipment_team_maintenance" |
| 88 | + /> |
73 | 89 | </record> |
74 | 90 |
|
75 | 91 | <record id="consuption_picking_m_request_1" model="stock.picking"> |
76 | | - <field name="picking_type_id" ref="maintenance_stock.main_picking_type_cons"/> |
77 | | - <field name="date" eval="DateTime.today() - timedelta(days=15)"/> |
78 | | - <field name="location_id" ref="maintenance_stock.main_location_stock"/> |
79 | | - <field name="location_dest_id" ref="maintenance_stock.main_location_cons"/> |
80 | | - <field name="maintenance_request_id" ref="maintenance_stock.m_request_1"/> |
81 | | - <field name="move_lines" model="stock.move" eval="[(0, 0, { |
| 92 | + <field |
| 93 | + name="picking_type_id" |
| 94 | + ref="maintenance_stock.main_picking_type_cons" |
| 95 | + /> |
| 96 | + <field name="date" eval="DateTime.today() - timedelta(days=15)" /> |
| 97 | + <field name="location_id" ref="maintenance_stock.main_location_stock" /> |
| 98 | + <field name="location_dest_id" ref="maintenance_stock.main_location_cons" /> |
| 99 | + <field name="maintenance_request_id" ref="maintenance_stock.m_request_1" /> |
| 100 | + <field |
| 101 | + name="move_lines" |
| 102 | + model="stock.move" |
| 103 | + eval="[(0, 0, { |
82 | 104 | 'name': obj().env.ref('maintenance_stock.product_toner').name, |
83 | 105 | 'product_id': ref('maintenance_stock.product_toner'), |
84 | 106 | 'product_uom': ref('uom.product_uom_unit'), |
|
93 | 115 | 'location_id': ref('maintenance_stock.main_location_stock'), |
94 | 116 | 'location_dest_id': ref('maintenance_stock.main_location_cons'), |
95 | 117 | })], |
96 | | - })]"/> |
| 118 | + })]" |
| 119 | + /> |
97 | 120 | </record> |
98 | 121 |
|
99 | 122 | <function model="stock.picking" name="action_confirm"> |
100 | | - <value model="stock.picking" eval="[ |
101 | | - obj().env.ref('maintenance_stock.consuption_picking_m_request_1').id]"/> |
| 123 | + <value |
| 124 | + model="stock.picking" |
| 125 | + eval="[ |
| 126 | + obj().env.ref('maintenance_stock.consuption_picking_m_request_1').id]" |
| 127 | + /> |
102 | 128 | </function> |
103 | 129 |
|
104 | 130 | <function model="stock.picking" name="action_done"> |
105 | | - <value model="stock.picking" eval="[ |
106 | | - obj().env.ref('maintenance_stock.consuption_picking_m_request_1').id]"/> |
| 131 | + <value |
| 132 | + model="stock.picking" |
| 133 | + eval="[ |
| 134 | + obj().env.ref('maintenance_stock.consuption_picking_m_request_1').id]" |
| 135 | + /> |
107 | 136 | </function> |
108 | 137 |
|
109 | 138 | </data> |
|
0 commit comments