[IMP] mrp,purchase,pos: Improve demo data

SPECIFICATIONS
==============

PoS
---

https://drive.google.com/a/odoo.com/file/d/1BkVVQTR7V_kZpNsOO0CwqTQtxAH9boLB/view?usp=drivesdk
Add new products : Cola, Water, Orange Juice (+ images)
in internal category : All/Saleable/PoS
available in PoS

Traceability
------------

The [FURN_9666] Table (MTO) should be tracked by serial number
There should be one purchase order already received for 1 Table Top
There should be one purchase order already received for 4 Table legs
There should be one MO done for the table (consuming the products received in the PO you've created)
> The goal is to have a complete traceability report for one table
Delete SN/LN : https://drive.google.com/a/odoo.com/file/d/1cxdE-2laGYaZ2rnSFKjEbVg6k6MVyLdw/view?usp=drivesdk

Assign crm.lead to the admin user : when opening the pipe, there must be some leads and opportunities

Products
--------

https://drive.google.com/a/odoo.com/file/d/1qaO7MlufZbj7bw6z5S8DtmKPYiK0sQNK/view?usp=drivesdk
route buy should be ticked on pedal bin product

remove some ecommerce categories: https://drive.google.com/a/odoo.com/file/d/1sgIJE49BHVDcoF5CXngbJAvWb2fN_3Wk/view?usp=drivesdk
This commit is contained in:
Yannick Tivisse
2018-07-17 17:37:42 +02:00
parent b60de0db41
commit 3031ab8f0f
16 changed files with 66 additions and 123 deletions
+1 -15
View File
@@ -169,6 +169,7 @@
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="description">Solid wood table.</field>
<field name="default_code">FURN_9666</field>
<field name="tracking">serial</field>
<field name="image" type="base64" file="mrp/static/img/table.png"/>
</record>
<record id="product_product_computer_desk_head" model="product.product">
@@ -470,18 +471,6 @@
<field name="name">0000000000030</field>
<field name="product_id" ref="product.product_product_27"/>
</record>
<record id="lot_product_27_1" model="stock.production.lot">
<field name="name">0000000000031</field>
<field name="product_id" ref="product.product_product_27"/>
</record>
<record id="lot_product_drawer_drawer" model="stock.production.lot">
<field name="name">0000000000032</field>
<field name="product_id" ref="product_product_drawer_drawer"/>
</record>
<record id="lot_product_drawer_case" model="stock.production.lot">
<field name="name">0000000000033</field>
<field name="product_id" ref="product_product_drawer_case"/>
</record>
<!-- Initital Inventory -->
@@ -503,7 +492,6 @@
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_drawer"/>
<field name="product_qty">40</field>
<field name="prod_lot_id" ref="lot_product_27_1"/>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
<record id="stock_inventory_line_product_drawer_drawer" model="stock.inventory.line">
@@ -511,7 +499,6 @@
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_drawer"/>
<field name="product_qty">50</field>
<field name="prod_lot_id" ref="lot_product_drawer_drawer"/>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
<record id="stock_inventory_line_product_drawer_case" model="stock.inventory.line">
@@ -519,7 +506,6 @@
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_drawer"/>
<field name="product_qty">50</field>
<field name="prod_lot_id" ref="lot_product_drawer_case"/>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
<record id="stock_inventory_line_product_wood_panel" model="stock.inventory.line">
+3
View File
@@ -305,6 +305,9 @@ class MrpWorkorder(models.Model):
@api.multi
def record_production(self):
if not self:
return True
self.ensure_one()
if self.qty_producing <= 0:
raise UserError(_('Please set the quantity you are currently producing. It should be different from zero.'))
@@ -37,7 +37,7 @@
</record>
<record model="pos.config" id="pos_config_main">
<field name="name">Main</field>
<field name="name">Shop</field>
<field name="picking_type_id" ref="picking_type_posout"/>
<field name="barcode_nomenclature_id" ref="barcodes.default_barcode_nomenclature"/>
</record>
@@ -11,9 +11,47 @@
<field name="product_categories_ids" eval="[(6, 0, [ref('point_of_sale.pos_category_miscellaneous')])]" />
</record>
<!-- Pos Config -->
<record id="product_category_pos" model="product.category">
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">PoS</field>
</record>
<record id="point_of_sale.pos_config_main" model="pos.config">
<record id="drinks" model="pos.category">
<field name="name">Drinks</field>
</record>
<record id="coke" model="product.product">
<field name="available_in_pos">True</field>
<field name="list_price">2.20</field>
<field name="name">Coca-Cola</field>
<field name="pos_categ_id" ref="drinks"/>
<field name="categ_id" ref="pos_restaurant.product_category_pos"/>
<field name="image" type="base64" file="pos_restaurant/static/img/th-coke.jpg"/>
</record>
<record id="water" model="product.product">
<field name="available_in_pos">True</field>
<field name="list_price">2.20</field>
<field name="name">Water</field>
<field name="pos_categ_id" ref="drinks"/>
<field name="categ_id" ref="pos_restaurant.product_category_pos"/>
<field name="image" type="base64" file="pos_restaurant/static/img/th-water.jpg"/>
</record>
<record id="minute_maid" model="product.product">
<field name="available_in_pos">True</field>
<field name="list_price">2.20</field>
<field name="name">Minute Maid</field>
<field name="pos_categ_id" ref="drinks"/>
<field name="categ_id" ref="pos_restaurant.product_category_pos"/>
<field name="image" type="base64" file="pos_restaurant/static/img/th-minute_maid.jpg"/>
</record>
<!-- Pos Config -->
<record model="pos.config" id="pos_config_restaurant">
<field name="name">Bar</field>
<field name="picking_type_id" ref="point_of_sale.picking_type_posout"/>
<field name="barcode_nomenclature_id" ref="barcodes.default_barcode_nomenclature"/>
<field name="module_pos_restaurant">True</field>
<field name="is_table_management">True</field>
<field name="iface_splitbill">True</field>
@@ -27,7 +65,7 @@
<record id="floor_main" model="restaurant.floor">
<field name="name">Main Floor</field>
<field name="background_color">rgb(136,137,242)</field>
<field name="pos_config_id" eval="ref('point_of_sale.pos_config_main')" />
<field name="pos_config_id" eval="ref('pos_restaurant.pos_config_restaurant')" />
</record>
<record id="table_01" model="restaurant.table">
@@ -167,7 +205,7 @@
<record id="floor_patio" model="restaurant.floor">
<field name="name">Patio</field>
<field name="background_color">rgb(130, 233, 171)</field>
<field name="pos_config_id" eval="ref('point_of_sale.pos_config_main')" />
<field name="pos_config_id" eval="ref('pos_restaurant.pos_config_restaurant')" />
</record>
<!-- Patio: Left table row -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+1 -1
View File
@@ -159,7 +159,7 @@
</record>
<record id="product_product_4_product_template" model="product.template">
<field name="name">Desk Customizable</field>
<field name="name">Customizable Desk</field>
<field name="categ_id" ref="product_category_5"/>
<field name="standard_price">500.0</field>
<field name="list_price">750.0</field>
@@ -65,11 +65,11 @@ class TestProductPricelist(TransactionCase):
def test_10_calculation_price_of_products_pricelist(self):
"""Test calculation of product price based on pricelist"""
# I check sale price of Desk Customizable
# I check sale price of Customizable Desk
context = {}
context.update({'pricelist': self.customer_pricelist.id, 'quantity': 1})
ipad_retina_display = self.ipad_retina_display.with_context(context)
msg = "Wrong sale price: Desk Customizable. should be %s instead of %s" % (ipad_retina_display.price, (ipad_retina_display.lst_price-ipad_retina_display.lst_price*(0.10)))
msg = "Wrong sale price: Customizable Desk. should be %s instead of %s" % (ipad_retina_display.price, (ipad_retina_display.lst_price-ipad_retina_display.lst_price*(0.10)))
self.assertEqual(float_compare(ipad_retina_display.price, (ipad_retina_display.lst_price-ipad_retina_display.lst_price*(0.10)), precision_digits=2), 0, msg)
# I check sale price of Laptop.
-2
View File
@@ -15,8 +15,6 @@ from purchase order.
""",
'website': 'https://www.odoo.com/page/manufacturing',
'depends': ['mrp', 'purchase'],
'data': [],
'demo': [],
'installable': True,
'auto_install': True,
}
@@ -18,6 +18,9 @@
<field name="route_ids" eval="[(4,ref('route_warehouse0_buy'))]"></field>
</record>
<record id="product.product_product_9" model="product.product">
<field name="route_ids" eval="[(4,ref('route_warehouse0_buy'))]"></field>
</record>
</data>
<data noupdate="0">
+2 -9
View File
@@ -52,18 +52,13 @@
<field name="image" type="base64" file="stock/static/img/cable_management.png"/>
</record>
<record id="lot_icecream_0" model="stock.production.lot">
<record id="lot_product_cable_management" model="stock.production.lot">
<field name="name">0000000000017</field>
<field name="product_id" ref="stock.product_cable_management_box"/>
</record>
<record id="lot_icecream_1" model="stock.production.lot">
<field name="name">0000000000024</field>
<field name="product_id" ref="stock.product_cable_management_box"/>
</record>
<record id="stock_inventory_icecream" model="stock.inventory">
<field name="name">Inventory for icecream</field>
<field name="name">Inventory for Cable Management Box</field>
<field name="filter">product</field>
<field name="product_id" ref="stock.product_cable_management_box"/>
</record>
@@ -73,7 +68,6 @@
<field name="product_uom_id" ref="uom.product_uom_kgm"/>
<field name="inventory_id" ref="stock.stock_inventory_icecream"/>
<field name="product_qty">50.0</field>
<field name="prod_lot_id" ref="stock.lot_icecream_0"/>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
@@ -82,7 +76,6 @@
<field name="product_uom_id" ref="uom.product_uom_kgm"/>
<field name="inventory_id" ref="stock.stock_inventory_icecream"/>
<field name="product_qty">40.0</field>
<field name="prod_lot_id" ref="stock.lot_icecream_1"/>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
+1 -1
View File
@@ -39,7 +39,7 @@ class ProductionLot(models.Model):
@api.multi
def write(self, vals):
if 'product_id' in vals:
if 'product_id' in vals and any([vals['product_id'] != lot.product_id.id for lot in self]):
move_lines = self.env['stock.move.line'].search([('lot_id', 'in', self.ids)])
if move_lines:
raise UserError(_(
+3 -81
View File
@@ -135,85 +135,10 @@
<field name="name">Lamps</field>
<field name="sequence">22</field>
</record>
<record id="public_category_tables" model="product.public.category">
<field name="name">Tables</field>
<field name="sequence">23</field>
</record>
<record id="public_category_multimedia" model="product.public.category">
<field name="name">Multimedia</field>
<field name="sequence">24</field>
</record>
<record id="devices" model="product.public.category">
<field name="name">Devices</field>
<field name="sequence">5</field>
</record>
<record id="Screen" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">Screen</field>
<field name="sequence">11</field>
</record>
<record id="Pen_Drive" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">Pen Drive</field>
<field name="sequence">9</field>
</record>
<record id="External_Hard_Drive" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">External Hard Drive</field>
<field name="sequence">6</field>
</record>
<record id="Keyboard_Mouse" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">Keyboard / Mouse</field>
<field name="sequence">8</field>
</record>
<record id="printer" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">Printer</field>
<field name="sequence">10</field>
</record>
<record id="Speakers" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">Speakers</field>
<field name="sequence">13</field>
</record>
<record id="Headset" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">Headset</field>
<field name="sequence">7</field>
</record>
<record id="Software" model="product.public.category">
<field name="parent_id" ref="devices"/>
<field name="name">Software</field>
<field name="sequence">12</field>
</record>
<record id="laptops" model="product.public.category">
<field name="name">Laptops</field>
<field name="sequence">1</field>
</record>
<record id="sub_computers" model="product.public.category">
<field name="name">Computers</field>
<field name="sequence">2</field>
</record>
<record id="Computer_all_in_one" model="product.public.category">
<field name="parent_id" ref="sub_computers"/>
<field name="name">Computer all-in-one</field>
<field name="sequence">3</field>
</record>
<record id="server" model="product.public.category">
<field name="parent_id" ref="sub_computers"/>
<field name="name">Server</field>
<field name="sequence">4</field>
</record>
<record id="network" model="product.public.category">
<field name="name">Network</field>
<field name="sequence">14</field>
</record>
<record id="services" model="product.public.category">
<field name="name">Services</field>
@@ -277,9 +202,6 @@
<record id="product.product_product_27_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('public_category_drawers')])]"/>
</record>
<record id="product.product_delivery_02_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('External_Hard_Drive')])]"/>
</record>
<record id="product.product_order_01_product_template" model="product.template">
<field name="public_categ_ids" eval="[(6,0,[ref('public_category_multimedia')])]"/>
</record>
@@ -405,7 +327,7 @@
<record id="website_sale_order_line_2" model="sale.order.line">
<field name="order_id" ref="website_sale_order_2"/>
<field name="name">Desk Customizable</field>
<field name="name">Customizable Desk</field>
<field name="product_id" ref="product.product_product_4"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="uom.product_uom_unit"/>
@@ -426,7 +348,7 @@
<record id="website_sale_order_line_3" model="sale.order.line">
<field name="order_id" ref="website_sale_order_3"/>
<field name="name">Desk Customizable</field>
<field name="name">Customizable Desk</field>
<field name="product_id" ref="product.product_product_4"/>
<field name="product_uom_qty">1</field>
<field name="product_uom" ref="uom.product_uom_unit"/>
@@ -468,7 +390,7 @@
<record id="website_sale_order_line_5" model="sale.order.line">
<field name="order_id" ref="website_sale_order_5"/>
<field name="name">Desk Customizable</field>
<field name="name">Customizable Desk</field>
<field name="product_id" ref="product.product_product_4"/>
<field name="product_uom_qty">3</field>
<field name="product_uom" ref="uom.product_uom_unit"/>
@@ -43,7 +43,7 @@ tour.register('shop_customize', {
{
content: "select product",
extra_trigger: 'body:not(:has(.oe_website_sale .oe_product_cart:eq(2)))',
trigger: '.oe_product_cart a:contains("Desk Customizable")',
trigger: '.oe_product_cart a:contains("Customizable Desk")',
},
{
content: "open customize menu",
@@ -47,18 +47,18 @@ tour.register('shop_wishlist', {
},
},
{
content: "check that logged in and search for desk customizable",
content: "check that logged in and search for Customizable Desk",
extra_trigger: 'li span:contains(Administrator)',
trigger: 'form input[name="search"]',
run: "text Desk Customizable",
run: "text Customizable Desk",
},
{
content: "submit search",
trigger: 'form:has(input[name="search"]) .oe_search_button',
},
{
content: "click on desk customizable",
trigger: '.oe_product_cart a:contains("Desk Customizable")',
content: "click on Customizable Desk",
trigger: '.oe_product_cart a:contains("Customizable Desk")',
},
{
content: "select desk cutomizable",
@@ -75,8 +75,8 @@ tour.register('shop_wishlist', {
trigger: 'a[href="/shop/wishlist"]',
},
{
content: "remove desk customizable",
trigger: 'tr:contains("Desk Customizable") a.o_wish_rm:first',
content: "remove Customizable Desk",
trigger: 'tr:contains("Customizable Desk") a.o_wish_rm:first',
},
{
content: "check that wishlist contains 1 item",