mrp_demo.xml 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data noupdate="1">
  4. <record id="base.user_demo" model="res.users">
  5. <field eval="[(4, ref('group_mrp_user'))]" name="groups_id"/>
  6. </record>
  7. <!-- Resource: res.company -->
  8. <record id="stock.res_company_1" model="res.company">
  9. <field eval="1.0" name="manufacturing_lead"/>
  10. </record>
  11. <!-- Resource: mrp.workcenter -->
  12. <record id="mrp_workcenter_3" model="mrp.workcenter">
  13. <field name="name">Assembly Line 1</field>
  14. <field name="resource_calendar_id" ref="resource.resource_calendar_std"/>
  15. </record>
  16. <record id="mrp_workcenter_1" model="mrp.workcenter">
  17. <field name="name">Drill Station 1</field>
  18. <field name="resource_calendar_id" ref="resource.resource_calendar_std"/>
  19. </record>
  20. <record id="mrp_workcenter_2" model="mrp.workcenter">
  21. <field name="name">Assembly Line 2</field>
  22. <field name="resource_calendar_id" ref="resource.resource_calendar_std"/>
  23. </record>
  24. <!-- Resource: mrp.bom -->
  25. <record id="product.product_product_3_product_template" model="product.template">
  26. <field name="route_ids" eval="[(6, 0, [ref('stock.route_warehouse0_mto'), ref('mrp.route_warehouse0_manufacture')])]"/>
  27. </record>
  28. <record id="mrp_bom_manufacture" model="mrp.bom">
  29. <field name="product_tmpl_id" ref="product.product_product_3_product_template"/>
  30. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  31. <field name="sequence">1</field>
  32. </record>
  33. <record id="mrp_routing_workcenter_0" model="mrp.routing.workcenter">
  34. <field name="bom_id" ref="mrp_bom_manufacture"/>
  35. <field name="active">False</field>
  36. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  37. <field name="name">Manual Assembly</field>
  38. <field name="time_cycle">60</field>
  39. <field name="sequence">5</field>
  40. <field name="worksheet_type">pdf</field>
  41. <field name="worksheet" type="base64" file="mrp/static/img/assebly-worksheet.pdf"/>
  42. </record>
  43. <record id="mrp_bom_manufacture_line_1" model="mrp.bom.line">
  44. <field name="product_id" ref="product.product_product_12"/>
  45. <field name="product_qty">1</field>
  46. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  47. <field name="sequence">5</field>
  48. <field name="bom_id" ref="mrp_bom_manufacture"/>
  49. </record>
  50. <record id="mrp_bom_manufacture_line_2" model="mrp.bom.line">
  51. <field name="product_id" ref="product.product_product_13"/>
  52. <field name="product_qty">1</field>
  53. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  54. <field name="sequence">5</field>
  55. <field name="bom_id" ref="mrp_bom_manufacture"/>
  56. </record>
  57. <record id="mrp_bom_manufacture_line_3" model="mrp.bom.line">
  58. <field name="product_id" ref="product.product_product_16"/>
  59. <field name="product_qty">1</field>
  60. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  61. <field name="sequence">5</field>
  62. <field name="bom_id" ref="mrp_bom_manufacture"/>
  63. </record>
  64. <record id="mrp_production_1" model="mrp.production">
  65. <field name="product_id" ref="product.product_product_3"/>
  66. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  67. <field name="product_qty">3</field>
  68. <field name="bom_id" ref="mrp_bom_manufacture"/>
  69. </record>
  70. <!-- Table -->
  71. <record id="product_product_computer_desk" model="product.product">
  72. <field name="name">Table</field>
  73. <field name="categ_id" ref="product.product_category_5"/>
  74. <field name="standard_price">290</field>
  75. <field name="list_price">520</field>
  76. <field name="detailed_type">product</field>
  77. <field name="weight">0.01</field>
  78. <field name="uom_id" ref="uom.product_uom_unit"/>
  79. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  80. <field name="description">Solid wood table.</field>
  81. <field name="default_code">FURN_9666</field>
  82. <field name="tracking">serial</field>
  83. <field name="image_1920" type="base64" file="mrp/static/img/table.png"/>
  84. </record>
  85. <record id="stock_warehouse_orderpoint_table" model="stock.warehouse.orderpoint">
  86. <field name="product_max_qty">0.0</field>
  87. <field name="product_min_qty">0.0</field>
  88. <field name="product_uom" ref="uom.product_uom_unit"/>
  89. <field name="company_id" ref="base.main_company"/>
  90. <field name="warehouse_id" ref="stock.warehouse0"/>
  91. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  92. <field name="product_id" ref="product_product_computer_desk"/>
  93. </record>
  94. <record id="product_product_computer_desk_head" model="product.product">
  95. <field name="name">Table Top</field>
  96. <field name="categ_id" ref="product.product_category_5"/>
  97. <field name="standard_price">240</field>
  98. <field name="list_price">380</field>
  99. <field name="detailed_type">product</field>
  100. <field name="weight">0.01</field>
  101. <field name="uom_id" ref="uom.product_uom_unit"/>
  102. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  103. <field name="description">Solid wood is a durable natural material.</field>
  104. <field name="default_code">FURN_8522</field>
  105. <field name="tracking">serial</field>
  106. <field name="image_1920" type="base64" file="mrp/static/img/table_top.png"/>
  107. </record>
  108. <record id="product_product_computer_desk_leg" model="product.product">
  109. <field name="name">Table Leg</field>
  110. <field name="categ_id" ref="product.product_category_5"/>
  111. <field name="standard_price">10</field>
  112. <field name="list_price">50</field>
  113. <field name="detailed_type">product</field>
  114. <field name="weight">0.01</field>
  115. <field name="uom_id" ref="uom.product_uom_unit"/>
  116. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  117. <field name="description">18″ x 2½″ Square Leg</field>
  118. <field name="default_code">FURN_2333</field>
  119. <field name="tracking">lot</field>
  120. <field name="image_1920" type="base64" file="mrp/static/img/table_leg.png"/>
  121. </record>
  122. <record id="product_product_computer_desk_bolt" model="product.product">
  123. <field name="name">Bolt</field>
  124. <field name="categ_id" ref="product.product_category_consumable"/>
  125. <field name="standard_price">0.5</field>
  126. <field name="list_price">0.5</field>
  127. <field name="detailed_type">consu</field>
  128. <field name="weight">0.01</field>
  129. <field name="uom_id" ref="uom.product_uom_unit"/>
  130. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  131. <field name="description">Stainless steel screw full (dia - 5mm, Length - 10mm)</field>
  132. <field name="default_code">CONS_89957</field>
  133. <field name="image_1920" type="base64" file="mrp/static/img/product_product_computer_desk_bolt.png"/>
  134. </record>
  135. <record id="product_product_computer_desk_screw" model="product.product">
  136. <field name="name">Screw</field>
  137. <field name="categ_id" ref="product.product_category_consumable"/>
  138. <field name="standard_price">0.1</field>
  139. <field name="list_price">0.2</field>
  140. <field name="detailed_type">consu</field>
  141. <field name="weight">0.01</field>
  142. <field name="uom_id" ref="uom.product_uom_unit"/>
  143. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  144. <field name="description">Stainless steel screw</field>
  145. <field name="default_code">CONS_25630</field>
  146. <field name="image_1920" type="base64" file="mrp/static/img/product_product_computer_desk_screw.png"/>
  147. </record>
  148. <record id="product_product_wood_ply" model="product.product">
  149. <field name="name">Ply Layer</field>
  150. <field name="categ_id" ref="product.product_category_5"/>
  151. <field name="standard_price">10</field>
  152. <field name="list_price">10</field>
  153. <field name="detailed_type">product</field>
  154. <field name="weight">0.01</field>
  155. <field name="uom_id" ref="uom.product_uom_unit"/>
  156. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  157. <field name="description">Layers that are stick together to assemble wood panels.</field>
  158. <field name="default_code">FURN_7111</field>
  159. <field name="image_1920" type="base64" file="mrp/static/img/product_product_wood_ply.png"/>
  160. </record>
  161. <record id="product_product_wood_wear" model="product.product">
  162. <field name="name">Wear Layer</field>
  163. <field name="categ_id" ref="product.product_category_5"/>
  164. <field name="standard_price">10</field>
  165. <field name="list_price">10</field>
  166. <field name="detailed_type">product</field>
  167. <field name="weight">0.01</field>
  168. <field name="uom_id" ref="uom.product_uom_unit"/>
  169. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  170. <field name="description">Top layer of a wood panel.</field>
  171. <field name="default_code">FURN_8111</field>
  172. <field name="image_1920" type="base64" file="mrp/static/img/product_product_wood_wear.png"/>
  173. </record>
  174. <record id="product_product_ply_veneer" model="product.product">
  175. <field name="name">Ply Veneer</field>
  176. <field name="categ_id" ref="product.product_category_5"/>
  177. <field name="standard_price">10</field>
  178. <field name="list_price">10</field>
  179. <field name="detailed_type">product</field>
  180. <field name="weight">0.01</field>
  181. <field name="uom_id" ref="uom.product_uom_unit"/>
  182. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  183. <field name="default_code">FURN_9111</field>
  184. <field name="image_1920" type="base64" file="mrp/static/img/product_product_ply_veneer.png"/>
  185. </record>
  186. <record id="product_product_wood_panel" model="product.product">
  187. <field name="name">Wood Panel</field>
  188. <field name="categ_id" ref="product.product_category_5"/>
  189. <field name="standard_price">80</field>
  190. <field name="list_price">100</field>
  191. <field name="detailed_type">product</field>
  192. <field name="weight">0.01</field>
  193. <field name="uom_id" ref="uom.product_uom_unit"/>
  194. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  195. <field name="default_code">FURN_7023</field>
  196. <field name="image_1920" type="base64" file="mrp/static/img/product_product_wood_panel.png"/>
  197. </record>
  198. <record id="product_product_plastic_laminate" model="product.product">
  199. <field name="name">Plastic Laminate</field>
  200. <field name="categ_id" ref="product.product_category_5"/>
  201. <field name="standard_price">3000</field>
  202. <field name="list_price">1000</field>
  203. <field name="detailed_type">product</field>
  204. <field name="weight">0.01</field>
  205. <field name="uom_id" ref="uom.product_uom_unit"/>
  206. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  207. <field name="default_code">FURN_8621</field>
  208. <field name="image_1920" type="base64" file="mrp/static/img/product_product_plastic_laminate.png"/>
  209. </record>
  210. <record id="product_product_computer_desk_product_template" model="product.template">
  211. <field name="route_ids" eval="[(6, 0, [ref('stock.route_warehouse0_mto'), ref('mrp.route_warehouse0_manufacture')])]"/>
  212. </record>
  213. <record id="mrp_bom_desk" model="mrp.bom">
  214. <field name="product_tmpl_id" ref="product_product_computer_desk_product_template"/>
  215. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  216. <field name="sequence">3</field>
  217. <field name="consumption">flexible</field>
  218. </record>
  219. <record id="mrp_routing_workcenter_5" model="mrp.routing.workcenter">
  220. <field name="bom_id" ref="mrp_bom_desk"/>
  221. <field name="active">False</field>
  222. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  223. <field name="time_cycle">120</field>
  224. <field name="sequence">10</field>
  225. <field name="name">Assembly</field>
  226. <field name="worksheet_type">pdf</field>
  227. <field name="worksheet" type="base64" file="mrp/static/img/cutting-worksheet.pdf"/>
  228. </record>
  229. <record id="mrp_bom_desk_line_1" model="mrp.bom.line">
  230. <field name="product_id" ref="product_product_computer_desk_head"/>
  231. <field name="product_qty">1</field>
  232. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  233. <field name="sequence">1</field>
  234. <field name="bom_id" ref="mrp_bom_desk"/>
  235. <field name="operation_id" ref="mrp.mrp_routing_workcenter_5"/>
  236. </record>
  237. <record id="mrp_bom_desk_line_2" model="mrp.bom.line">
  238. <field name="product_id" ref="product_product_computer_desk_leg"/>
  239. <field name="product_qty">4</field>
  240. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  241. <field name="sequence">2</field>
  242. <field name="bom_id" ref="mrp_bom_desk"/>
  243. <field name="operation_id" ref="mrp.mrp_routing_workcenter_5"/>
  244. </record>
  245. <record id="mrp_bom_desk_line_3" model="mrp.bom.line">
  246. <field name="product_id" ref="product_product_computer_desk_bolt"/>
  247. <field name="product_qty">4</field>
  248. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  249. <field name="sequence">3</field>
  250. <field name="bom_id" ref="mrp_bom_desk"/>
  251. </record>
  252. <record id="mrp_bom_desk_line_4" model="mrp.bom.line">
  253. <field name="product_id" ref="product_product_computer_desk_screw"/>
  254. <field name="product_qty">10</field>
  255. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  256. <field name="sequence">4</field>
  257. <field name="bom_id" ref="mrp_bom_desk"/>
  258. </record>
  259. <!-- Table MO -->
  260. <record id="mrp_production_3" model="mrp.production">
  261. <field name="product_id" ref="product_product_computer_desk"/>
  262. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  263. <field name="product_qty">1</field>
  264. <field name="date_planned_start" eval="(DateTime.today() + relativedelta(days=1)).strftime('%Y-%m-%d %H:%M')"/>
  265. <field name="bom_id" ref="mrp_bom_desk"/>
  266. </record>
  267. <record id="mrp_bom_table_top" model="mrp.bom">
  268. <field name="product_tmpl_id" ref="product_product_computer_desk_head_product_template"/>
  269. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  270. <field name="sequence">1</field>
  271. </record>
  272. <record id="mrp_routing_workcenter_0" model="mrp.routing.workcenter">
  273. <field name="bom_id" ref="mrp_bom_table_top"/>
  274. <field name="active">False</field>
  275. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  276. <field name="name">Manual Assembly</field>
  277. <field name="time_cycle">60</field>
  278. <field name="sequence">5</field>
  279. <field name="worksheet_type">pdf</field>
  280. <field name="worksheet" type="base64" file="mrp/static/img/assebly-worksheet.pdf"/>
  281. </record>
  282. <record id="mrp_bom_line_wood_panel" model="mrp.bom.line">
  283. <field name="product_id" ref="product_product_wood_panel"/>
  284. <field name="product_qty">2</field>
  285. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  286. <field name="sequence">1</field>
  287. <field name="bom_id" ref="mrp_bom_table_top"/>
  288. </record>
  289. <record id="mrp_bom_line_plastic_laminate" model="mrp.bom.line">
  290. <field name="product_id" ref="product_product_plastic_laminate"/>
  291. <field name="product_qty">4</field>
  292. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  293. <field name="sequence">2</field>
  294. <field name="bom_id" ref="mrp_bom_table_top"/>
  295. </record>
  296. <record id="mrp_bom_plastic_laminate" model="mrp.bom">
  297. <field name="product_tmpl_id" ref="product_product_plastic_laminate_product_template"/>
  298. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  299. <field name="sequence">1</field>
  300. </record>
  301. <record id="mrp_routing_workcenter_1" model="mrp.routing.workcenter">
  302. <field name="bom_id" ref="mrp_bom_plastic_laminate"/>
  303. <field name="active">False</field>
  304. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  305. <field name="name">Long time assembly</field>
  306. <field name="time_cycle">180</field>
  307. <field name="sequence">15</field>
  308. <field name="worksheet_type">pdf</field>
  309. <field name="worksheet" type="base64" file="mrp/static/img/cutting-worksheet.pdf"/>
  310. </record>
  311. <record id="mrp_routing_workcenter_3" model="mrp.routing.workcenter">
  312. <field name="bom_id" ref="mrp_bom_plastic_laminate"/>
  313. <field name="active">False</field>
  314. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  315. <field name="name">Testing</field>
  316. <field name="time_cycle">60</field>
  317. <field name="sequence">10</field>
  318. <field name="worksheet_type">pdf</field>
  319. <field name="worksheet" type="base64" file="mrp/static/img/assebly-worksheet.pdf"/>
  320. </record>
  321. <record id="mrp_routing_workcenter_4" model="mrp.routing.workcenter">
  322. <field name="bom_id" ref="mrp_bom_plastic_laminate"/>
  323. <field name="active">False</field>
  324. <field name="workcenter_id" ref="mrp_workcenter_1"/>
  325. <field name="name">Packing</field>
  326. <field name="time_cycle">30</field>
  327. <field name="sequence">5</field>
  328. <field name="worksheet_type">pdf</field>
  329. <field name="worksheet" type="base64" file="mrp/static/img/cutting-worksheet.pdf"/>
  330. </record>
  331. <record id="mrp_bom_line_plastic_laminate" model="mrp.bom.line">
  332. <field name="product_id" ref="product_product_ply_veneer"/>
  333. <field name="product_qty">1</field>
  334. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  335. <field name="sequence">1</field>
  336. <field name="bom_id" ref="mrp_bom_plastic_laminate"/>
  337. </record>
  338. <record id="mrp_bom_wood_panel" model="mrp.bom">
  339. <field name="product_tmpl_id" ref="product_product_wood_panel_product_template"/>
  340. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  341. <field name="sequence">1</field>
  342. </record>
  343. <record id="mrp_bom_line_wood_panel_ply" model="mrp.bom.line">
  344. <field name="product_id" ref="product_product_wood_ply"/>
  345. <field name="product_qty">3</field>
  346. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  347. <field name="sequence">1</field>
  348. <field name="bom_id" ref="mrp_bom_wood_panel"/>
  349. </record>
  350. <record id="mrp_bom_line_wood_panel_wear" model="mrp.bom.line">
  351. <field name="product_id" ref="product_product_wood_wear"/>
  352. <field name="product_qty">1</field>
  353. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  354. <field name="sequence">1</field>
  355. <field name="bom_id" ref="mrp_bom_wood_panel"/>
  356. </record>
  357. <!-- Table Top MO -->
  358. <record id="mrp_production_4" model="mrp.production">
  359. <field name="product_id" ref="product_product_computer_desk_head"/>
  360. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  361. <field name="product_qty">2</field>
  362. <field name="location_src_id" ref="stock.stock_location_stock"/>
  363. <field name="location_dest_id" ref="stock.stock_location_stock"/>
  364. <field name="bom_id" ref="mrp_bom_table_top"/>
  365. </record>
  366. <!-- Table Kit -->
  367. <record id="product_product_table_kit" model="product.product">
  368. <field name="name">Table Kit</field>
  369. <field name="categ_id" ref="product.product_category_5"/>
  370. <field name="standard_price">600.0</field>
  371. <field name="list_price">147.0</field>
  372. <field name="detailed_type">consu</field>
  373. <field name="weight">0.01</field>
  374. <field name="uom_id" ref="uom.product_uom_unit"/>
  375. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  376. <field name="description">Table kit</field>
  377. <field name="default_code">FURN_78236</field>
  378. <field name="image_1920" type="base64" file="mrp/static/img/product_product_table_kit.png"/>
  379. </record>
  380. <record id="product_product_table_kit_product_template" model="product.template">
  381. <field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
  382. </record>
  383. <record id="mrp_bom_kit" model="mrp.bom">
  384. <field name="product_tmpl_id" ref="product_product_table_kit_product_template"/>
  385. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  386. <field name="sequence">2</field>
  387. <field name="type">phantom</field>
  388. </record>
  389. <record id="mrp_bom_kit_line_1" model="mrp.bom.line">
  390. <field name="product_id" ref="product_product_wood_panel"/>
  391. <field name="product_qty">1</field>
  392. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  393. <field name="bom_id" ref="mrp_bom_kit"/>
  394. </record>
  395. <record id="mrp_bom_kit_line_2" model="mrp.bom.line">
  396. <field name="product_id" ref="product_product_computer_desk_bolt"/>
  397. <field name="product_qty">4</field>
  398. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  399. <field name="bom_id" ref="mrp_bom_kit"/>
  400. </record>
  401. <!-- Manufacturing Order Demo With Lots-->
  402. <record id="product_product_drawer_drawer" model="product.product">
  403. <field name="name">Drawer Black</field>
  404. <field name="categ_id" ref="product.product_category_5"/>
  405. <field name="tracking">lot</field>
  406. <field name="standard_price">20.0</field>
  407. <field name="list_price">24.0</field>
  408. <field name="detailed_type">product</field>
  409. <field name="weight">0.01</field>
  410. <field name="uom_id" ref="uom.product_uom_unit"/>
  411. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  412. <field name="description">Drawer on casters for great usability.</field>
  413. <field name="default_code">FURN_2100</field>
  414. <field name="barcode">601647855646</field>
  415. <field name="image_1920" type="base64" file="mrp/static/img/product_product_drawer_black.png"/>
  416. </record>
  417. <record id="product_product_drawer_case" model="product.product">
  418. <field name="name">Drawer Case Black</field>
  419. <field name="categ_id" ref="product.product_category_5"/>
  420. <field name="tracking">lot</field>
  421. <field name="standard_price">10</field>
  422. <field name="list_price">20</field>
  423. <field name="detailed_type">product</field>
  424. <field name="weight">0.01</field>
  425. <field name="uom_id" ref="uom.product_uom_unit"/>
  426. <field name="uom_po_id" ref="uom.product_uom_unit"/>
  427. <field name="default_code">FURN_5623</field>
  428. <field name="barcode">601647855647</field>
  429. <field name="image_1920" type="base64" file="mrp/static/img/product_product_drawer_case_black.png"/>
  430. </record>
  431. <record id="product.product_product_27" model="product.product">
  432. <field name="tracking">lot</field>
  433. </record>
  434. <record id="lot_product_27_0" model="stock.lot">
  435. <field name="name">0000000000030</field>
  436. <field name="product_id" ref="product.product_product_27"/>
  437. <field name="company_id" ref="base.main_company"/>
  438. </record>
  439. <record id="lot_product_27_1" model="stock.lot">
  440. <field name="name">0000000000031</field>
  441. <field name="product_id" ref="product.product_product_27"/>
  442. <field name="company_id" ref="base.main_company"/>
  443. </record>
  444. <record id="lot_product_product_drawer_drawer_0" model="stock.lot">
  445. <field name="name">0000000010001</field>
  446. <field name="product_id" ref="product_product_drawer_drawer"/>
  447. <field name="company_id" ref="base.main_company"/>
  448. </record>
  449. <record id="lot_product_product_drawer_case_0" model="stock.lot">
  450. <field name="name">0000000020045</field>
  451. <field name="product_id" ref="product_product_drawer_case"/>
  452. <field name="company_id" ref="base.main_company"/>
  453. </record>
  454. <!-- Initital Inventory -->
  455. <record id="stock_inventory_drawer_lot0" model="stock.quant">
  456. <field name="product_id" ref="product.product_product_27"/>
  457. <field name="inventory_quantity">50.0</field>
  458. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  459. <field name="lot_id" ref="lot_product_27_0"/>
  460. </record>
  461. <record id="stock_inventory_drawer_lot1" model="stock.quant">
  462. <field name="product_id" ref="product.product_product_27"/>
  463. <field name="inventory_quantity">40.0</field>
  464. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  465. <field name="lot_id" ref="lot_product_27_1"/>
  466. </record>
  467. <record id="stock_inventory_product_drawer_drawer" model="stock.quant">
  468. <field name="product_id" ref="product_product_drawer_drawer"/>
  469. <field name="inventory_quantity">50.0</field>
  470. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  471. <field name="lot_id" ref="lot_product_product_drawer_drawer_0"/>
  472. </record>
  473. <record id="stock_inventory_product_drawer_case" model="stock.quant">
  474. <field name="product_id" ref="product_product_drawer_case"/>
  475. <field name="inventory_quantity">50.0</field>
  476. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  477. <field name="lot_id" ref="lot_product_product_drawer_case_0"/>
  478. </record>
  479. <record id="stock_inventory_product_wood_panel" model="stock.quant">
  480. <field name="product_id" ref="product_product_wood_panel"/>
  481. <field name="inventory_quantity">50.0</field>
  482. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  483. </record>
  484. <record id="stock_inventory_product_ply" model="stock.quant">
  485. <field name="product_id" ref="product_product_wood_ply"/>
  486. <field name="inventory_quantity">20.0</field>
  487. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  488. </record>
  489. <record id="stock_inventory_product_wear" model="stock.quant">
  490. <field name="product_id" ref="product_product_wood_wear"/>
  491. <field name="inventory_quantity">30.0</field>
  492. <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
  493. </record>
  494. <function model="stock.quant" name="action_apply_inventory">
  495. <function eval="[[('id', 'in', (ref('stock_inventory_drawer_lot0'),
  496. ref('stock_inventory_drawer_lot1'),
  497. ref('stock_inventory_product_drawer_drawer'),
  498. ref('stock_inventory_product_drawer_case'),
  499. ref('stock_inventory_product_wood_panel'),
  500. ref('stock_inventory_product_ply'),
  501. ref('stock_inventory_product_wear'),
  502. ))]]" model="stock.quant" name="search"/>
  503. </function>
  504. <!-- BoM -->
  505. <record id="mrp_bom_drawer" model="mrp.bom">
  506. <field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
  507. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  508. <field name="sequence">1</field>
  509. <field name="code">PRIM-ASSEM</field>
  510. </record>
  511. <record id="mrp_bom_drawer_line_1" model="mrp.bom.line">
  512. <field name="product_id" ref="product_product_drawer_drawer"/>
  513. <field name="product_qty">1</field>
  514. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  515. <field name="sequence">1</field>
  516. <field name="bom_id" ref="mrp_bom_drawer"/>
  517. </record>
  518. <record id="mrp_bom_drawer_line_2" model="mrp.bom.line">
  519. <field name="product_id" ref="product_product_drawer_case"/>
  520. <field name="product_qty">1</field>
  521. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  522. <field name="sequence">2</field>
  523. <field name="bom_id" ref="mrp_bom_drawer"/>
  524. </record>
  525. <record id="mrp_bom_drawer_rout" model="mrp.bom">
  526. <field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
  527. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  528. <field name="sequence">2</field>
  529. <field name="code">SEC-ASSEM</field>
  530. </record>
  531. <record id="mrp_routing_workcenter_1" model="mrp.routing.workcenter">
  532. <field name="bom_id" ref="mrp_bom_drawer_rout"/>
  533. <field name="active">False</field>
  534. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  535. <field name="name">Long time assembly</field>
  536. <field name="time_cycle">180</field>
  537. <field name="sequence">15</field>
  538. <field name="worksheet_type">pdf</field>
  539. <field name="worksheet" type="base64" file="mrp/static/img/cutting-worksheet.pdf"/>
  540. </record>
  541. <record id="mrp_routing_workcenter_3" model="mrp.routing.workcenter">
  542. <field name="bom_id" ref="mrp_bom_drawer_rout"/>
  543. <field name="active">False</field>
  544. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  545. <field name="name">Testing</field>
  546. <field name="time_cycle">60</field>
  547. <field name="sequence">10</field>
  548. <field name="worksheet_type">pdf</field>
  549. <field name="worksheet" type="base64" file="mrp/static/img/assebly-worksheet.pdf"/>
  550. </record>
  551. <record id="mrp_routing_workcenter_4" model="mrp.routing.workcenter">
  552. <field name="bom_id" ref="mrp_bom_drawer_rout"/>
  553. <field name="active">False</field>
  554. <field name="workcenter_id" ref="mrp_workcenter_1"/>
  555. <field name="name">Packing</field>
  556. <field name="time_cycle">30</field>
  557. <field name="sequence">5</field>
  558. <field name="worksheet_type">pdf</field>
  559. <field name="worksheet" type="base64" file="mrp/static/img/cutting-worksheet.pdf"/>
  560. </record>
  561. <record id="mrp_bom_drawer_rout_line_1" model="mrp.bom.line">
  562. <field name="product_id" ref="product_product_drawer_drawer"/>
  563. <field name="product_qty">1</field>
  564. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  565. <field name="sequence">1</field>
  566. <field name="bom_id" ref="mrp_bom_drawer_rout"/>
  567. </record>
  568. <record id="mrp_bom_drawer_rout_line_2" model="mrp.bom.line">
  569. <field name="product_id" ref="product_product_drawer_case"/>
  570. <field name="product_qty">1</field>
  571. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  572. <field name="sequence">2</field>
  573. <field name="bom_id" ref="mrp_bom_drawer_rout"/>
  574. </record>
  575. <record id="product.product_product_27" model="product.product">
  576. <field name="detailed_type">product</field>
  577. </record>
  578. <record id="mrp_production_drawer" model="mrp.production">
  579. <field name="product_id" ref="product.product_product_27"/>
  580. <field name="product_uom_id" ref="uom.product_uom_unit"/>
  581. <field name="product_qty">5</field>
  582. <field name="location_src_id" ref="stock.stock_location_stock"/>
  583. <field name="location_dest_id" ref="stock.stock_location_stock"/>
  584. <field name="bom_id" ref="mrp_bom_drawer"/>
  585. </record>
  586. <!-- Run Scheduler -->
  587. <function model="procurement.group" name="run_scheduler"/>
  588. <!-- OEE -->
  589. <record id="mrp_workcenter_efficiency_0" model="mrp.workcenter.productivity">
  590. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  591. <field name="loss_id" ref="block_reason7"/>
  592. <field name="date_start" eval="(datetime.now() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  593. <field name="date_end" eval="(datetime.now() - relativedelta(days=2)).strftime('%Y-%m-%d %H:%M:%S')"/>
  594. </record>
  595. <record id="mrp_workcenter_efficiency_1" model="mrp.workcenter.productivity">
  596. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  597. <field name="loss_id" ref="block_reason0"/>
  598. <field name="date_start" eval="(datetime.now() - timedelta(hours=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  599. <field name="date_end" eval="(datetime.now() - timedelta(hours=3)).strftime('%Y-%m-%d %H:%M:%S')"/>
  600. </record>
  601. <record id="mrp_workcenter_efficiency_2" model="mrp.workcenter.productivity">
  602. <field name="workcenter_id" ref="mrp_workcenter_3"/>
  603. <field name="loss_id" ref="block_reason1"/>
  604. <field name="date_start" eval="(datetime.now() - timedelta(days=5, hours=4)).strftime('%Y-%m-%d %H:%M:%S')"/>
  605. <field name="date_end" eval="(datetime.now() - timedelta(days=5, hours=3)).strftime('%Y-%m-%d %H:%M:%S')"/>
  606. </record>
  607. <record id="mrp_workcenter_efficiency_3" model="mrp.workcenter.productivity">
  608. <field name="workcenter_id" ref="mrp_workcenter_1"/>
  609. <field name="loss_id" ref="block_reason7"/>
  610. <field name="date_start" eval="(datetime.now() - relativedelta(days=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  611. <field name="date_end" eval="(datetime.now() - relativedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S')"/>
  612. </record>
  613. <record id="mrp_workcenter_efficiency_4" model="mrp.workcenter.productivity">
  614. <field name="workcenter_id" ref="mrp_workcenter_1"/>
  615. <field name="loss_id" ref="block_reason0"/>
  616. <field name="date_start" eval="(datetime.now() - timedelta(days=5,hours=5)).strftime('%Y-%m-%d %H:%M:%S')"/>
  617. <field name="date_end" eval="(datetime.now() - timedelta(days=5,hours=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
  618. </record>
  619. <record id="mrp_workcenter_efficiency_5" model="mrp.workcenter.productivity">
  620. <field name="workcenter_id" ref="mrp_workcenter_1"/>
  621. <field name="loss_id" ref="block_reason1"/>
  622. <field name="date_start" eval="(datetime.now() - timedelta(hours=1)).strftime('%Y-%m-%d %H:%M:%S')"/>
  623. </record>
  624. <function model="mrp.production" name="action_confirm" eval="[[
  625. ref('mrp.mrp_production_3'),
  626. ref('mrp.mrp_production_4'),
  627. ref('mrp.mrp_production_drawer'),
  628. ]]"/>
  629. <function model="mrp.production" name="button_plan">
  630. <value eval="[ref('mrp.mrp_production_3')]"/>
  631. </function>
  632. <function model="mrp.production" name="write">
  633. <value eval="[ref('mrp.mrp_production_drawer')]"/>
  634. <value eval="{'qty_producing': 5, 'lot_producing_id': ref('mrp.lot_product_27_0')}"/>
  635. </function>
  636. <function model="mrp.production" name="action_assign">
  637. <value eval="[ref('mrp.mrp_production_drawer')]"/>
  638. </function>
  639. <function model="stock.move" name="write">
  640. <value model="stock.move" eval="obj().env['stock.move'].search([('raw_material_production_id', '=', obj().env.ref('mrp.mrp_production_drawer').id)]).ids"/>
  641. <value eval="{'quantity_done': 5}"/>
  642. </function>
  643. <function model="mrp.production" name="button_mark_done">
  644. <value eval="[ref('mrp.mrp_production_drawer')]"/>
  645. </function>
  646. <!-- set 'create component' as True for the demo manufacturing picking type
  647. while leaving the default value to False for the others -->
  648. <function model="stock.warehouse" name="write">
  649. <value model="stock.warehouse" eval="obj().env['stock.warehouse'].search([]).ids"/>
  650. <value eval="{'manufacture_to_resupply': True}"/>
  651. </function>
  652. <function model="stock.picking.type" name="write">
  653. <value model="stock.picking.type" eval="obj().env['stock.picking.type'].search([('code', '=', 'mrp_operation')]).ids"/>
  654. <value eval="{'use_create_components_lots': True}"/>
  655. </function>
  656. </data>
  657. </odoo>