[IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in order to be able to use uom without product. A simple example is be to be able to use UoM for timesheets. This commit only move code, and adapt xml ids without chaging any feature or functionnal behavior. Note: 'product' module now depends on new 'uom' module.
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
<field name="name"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="uom_id" groups="uom.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="price_subtotal"/>
|
||||
@@ -65,7 +65,7 @@
|
||||
<label for="quantity"/>
|
||||
<div>
|
||||
<field name="quantity" class="oe_inline"/>
|
||||
<field name="uom_id" class="oe_inline" groups="product.group_uom"/>
|
||||
<field name="uom_id" class="oe_inline" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
@@ -278,7 +278,7 @@
|
||||
context="{'default_partner_id': parent.partner_id}"/>
|
||||
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="uom_id" groups="uom.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
|
||||
@@ -435,7 +435,7 @@
|
||||
context="{'default_partner_id': parent.partner_id}"/>
|
||||
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="uom_id" groups="uom.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" groups="base.group_no_one"/>
|
||||
<field name="invoice_line_tax_ids" widget="many2many_tags" options="{'no_create': True}" context="{'type':parent.type, 'tree_view_ref': 'account.account_tax_view_tree', 'search_view_ref': 'account.account_tax_view_search'}"
|
||||
@@ -447,7 +447,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="price_subtotal"/>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" groups="product.group_uom"/>
|
||||
<field name="uom_id" groups="uom.group_uom"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
<td class="hidden"><span t-field="l.origin"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.quantity"/>
|
||||
<span t-field="l.uom_id" groups="product.group_uom"/>
|
||||
<span t-field="l.uom_id" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<td class="hidden"><span t-field="l.origin"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.quantity"/>
|
||||
<span t-field="l.uom_id" groups="product.group_uom"/>
|
||||
<span t-field="l.uom_id" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
|
||||
@@ -18,11 +18,11 @@ class TestDeliveryCost(common.TransactionCase):
|
||||
self.partner_18 = self.env.ref('base.res_partner_18')
|
||||
self.pricelist = self.env.ref('product.list0')
|
||||
self.product_4 = self.env.ref('product.product_product_4')
|
||||
self.product_uom_unit = self.env.ref('product.product_uom_unit')
|
||||
self.product_uom_unit = self.env.ref('uom.product_uom_unit')
|
||||
self.normal_delivery = self.env.ref('delivery.normal_delivery_carrier')
|
||||
self.partner_4 = self.env.ref('base.res_partner_4')
|
||||
self.partner_address_13 = self.env.ref('base.res_partner_address_13')
|
||||
self.product_uom_hour = self.env.ref('product.product_uom_hour')
|
||||
self.product_uom_hour = self.env.ref('uom.product_uom_hour')
|
||||
self.account_data = self.env.ref('account.data_account_type_revenue')
|
||||
self.account_tag_operating = self.env.ref('account.account_tag_operating')
|
||||
self.product_2 = self.env.ref('product.product_product_2')
|
||||
|
||||
@@ -17,7 +17,7 @@ class StockMoveInvoice(AccountingTestCase):
|
||||
self.pricelist_id = self.env.ref('product.list0')
|
||||
self.product_11 = self.env.ref('product.product_product_11')
|
||||
self.product_icecream = self.env.ref('stock.product_icecream')
|
||||
self.product_uom_kgm = self.env.ref('product.product_uom_kgm')
|
||||
self.product_uom_kgm = self.env.ref('uom.product_uom_kgm')
|
||||
self.normal_delivery = self.env.ref('delivery.normal_delivery_carrier')
|
||||
|
||||
def test_01_delivery_stock_move(self):
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">2500.0</field>
|
||||
<field name="standard_price">1000.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="image" type="base64" file="event_sale/static/img/event_product-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">2500.0</field>
|
||||
<field name="standard_price">1000.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="image" type="base64" file="event_sale/static/img/event_product-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">2500.0</field>
|
||||
<field name="standard_price">1000.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="image" type="base64" file="event_sale/static/img/event_product-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">2500.0</field>
|
||||
<field name="standard_price">1000.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="image" type="base64" file="event_sale/static/img/event_product-image.jpg"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<field name="list_price">10.0</field>
|
||||
<field name="event_ok" eval="True"/>
|
||||
<field name="standard_price">30.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="name">Event Registration</field>
|
||||
<field name="categ_id" ref="product.product_category_all"/>
|
||||
<field name="type">service</field>
|
||||
|
||||
@@ -36,7 +36,7 @@ class EventSaleTest(common.TransactionCase):
|
||||
self.env['sale.order.line'].create({
|
||||
'product_id': product.id,
|
||||
'price_unit': 190.50,
|
||||
'product_uom': self.env.ref('product.product_uom_unit').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_unit').id,
|
||||
'product_uom_qty': 8.0,
|
||||
'order_id': self.sale_order.id,
|
||||
'name': 'sales order line',
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
<field name="type">service</field>
|
||||
<field name="name">Car Travel Expenses</field>
|
||||
<field name="default_code">CarTRA</field>
|
||||
<field name="uom_id" ref="product.product_uom_km"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_km"/>
|
||||
<field name="categ_id" ref="product.cat_expense"/>
|
||||
<field name="uom_id" ref="uom.product_uom_km"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_km"/>
|
||||
<field name="categ_id" ref="hr_expense.cat_expense"/>
|
||||
<field name="can_be_expensed" eval="True" />
|
||||
<field name="image" type="base64" file="hr_expense/static/img/car_travel-image.jpg"/>
|
||||
</record>
|
||||
@@ -44,7 +44,15 @@
|
||||
<field name="image" type="base64" file="hr_expense/static/img/air_ticket-image.jpg"/>
|
||||
</record>
|
||||
|
||||
<record id="product.expense_hotel" model="product.product">
|
||||
<record id="hotel_rent" model="product.product">
|
||||
<field name="list_price">400.0</field>
|
||||
<field name="standard_price">400.0</field>
|
||||
<field name="type">service</field>
|
||||
<field name="name">Hotel Accommodation</field>
|
||||
<field name="default_code">HA0</field>
|
||||
<field name="uom_id" ref="uom.product_uom_day"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_day"/>
|
||||
<field name="categ_id" ref="hr_expense.cat_expense"/>
|
||||
<field name="can_be_expensed" eval="True" />
|
||||
<field name="image" type="base64" file="hr_expense/static/img/hotel_rent-image.jpg"/>
|
||||
</record>
|
||||
@@ -54,7 +62,7 @@
|
||||
<field name="analytic_account_id" ref="analytic.analytic_our_super_product"/>
|
||||
<field name="product_id" ref="air_ticket"/>
|
||||
<field eval="700.0" name="unit_amount"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field eval="1.0" name="quantity"/>
|
||||
</record>
|
||||
|
||||
@@ -63,7 +71,7 @@
|
||||
<field name="analytic_account_id" ref="analytic.analytic_nebula"/>
|
||||
<field name="product_id" ref="product.expense_hotel"/>
|
||||
<field eval="400.0" name="unit_amount"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_day"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_day"/>
|
||||
<field eval="5.0" name="quantity"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ access_hr_expense_sheet_user,hr.expense.sheet.user,model_hr_expense_sheet,hr_exp
|
||||
access_hr_expense_sheet_employee,hr.expense.sheet.employee,model_hr_expense_sheet,base.group_user,1,1,1,1
|
||||
access_product_product_hr_expense_user,product.product.hr.expense.user,product.model_product_product,hr_expense.group_hr_expense_user,1,1,1,1
|
||||
access_product_template_hr_expense_user,product.template.hr.expense.user,product.model_product_template,hr_expense.group_hr_expense_user,1,1,1,1
|
||||
access_product_uom_hr_expense_user,product.uom.hr.expense.user,product.model_product_uom,hr_expense.group_hr_expense_user,1,1,1,1
|
||||
access_product_uom_hr_expense_user,product.uom.hr.expense.user,uom.model_product_uom,hr_expense.group_hr_expense_user,1,1,1,1
|
||||
access_account_journal_user,account.journal.user,account.model_account_journal,hr_expense.group_hr_expense_user,1,1,1,1
|
||||
access_account_journal_employee,account.journal.employee,account.model_account_journal,base.group_user,1,0,0,0
|
||||
access_account_invoice_user,account.invoice.user,account.model_account_invoice,hr_expense.group_hr_expense_user,1,1,1,1
|
||||
|
||||
|
@@ -56,7 +56,7 @@
|
||||
<label for="quantity"/>
|
||||
<div>
|
||||
<field name="quantity" class="oe_inline"/>
|
||||
<field name="product_uom_id" widget="selection" class="oe_inline" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" widget="selection" class="oe_inline" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="tax_ids" domain="[('type_tax_use', '=', 'purchase')]" widget="many2many_tags" groups="account.group_account_user"/>
|
||||
</group><group>
|
||||
@@ -288,7 +288,7 @@
|
||||
<field name="type"/>
|
||||
<field name="list_price"/>
|
||||
<field name="standard_price"/>
|
||||
<field name="uom_id" groups="product.group_uom" options="{'no_create': True}"/>
|
||||
<field name="uom_id" groups="uom.group_uom" options="{'no_create': True}"/>
|
||||
<field name="uom_po_id" invisible="1"/>
|
||||
<label for="default_code"/>
|
||||
<div>
|
||||
|
||||
@@ -4,6 +4,6 @@ access_account_analytic_line_portal,access_timesheets_portal,analytic.model_acco
|
||||
access_account_analytic_user,analytic.account.analytic.timesheet.user,analytic.model_account_analytic_account,hr_timesheet.group_hr_timesheet_user,1,1,0,0
|
||||
access_product_product_user,product.product.timesheet.user,product.model_product_product,hr_timesheet.group_hr_timesheet_user,1,1,1,0
|
||||
access_product_template_timesheet_user,product.template.timesheet.user,product.model_product_template,hr_timesheet.group_hr_timesheet_user,1,1,1,0
|
||||
access_product_uom_hr_timesheet,product.uom.timesheet.user,product.model_product_uom,hr_timesheet.group_hr_timesheet_user,1,0,0,0
|
||||
access_product_uom_hr_timesheet,product.uom.timesheet.user,uom.model_product_uom,hr_timesheet.group_hr_timesheet_user,1,0,0,0
|
||||
access_project_project,project.project.timesheet.user,model_project_project,hr_timesheet.group_hr_timesheet_user,1,0,0,0
|
||||
access_project_task,project.task.timesheet.user,model_project_task,hr_timesheet.group_hr_timesheet_user,1,1,0,0
|
||||
|
||||
|
@@ -52,7 +52,7 @@
|
||||
<td class="hidden"><span t-field="l.origin"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.quantity"/>
|
||||
<span t-field="l.uom_id" groups="product.group_uom"/>
|
||||
<span t-field="l.uom_id" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<t t-if="l.product_id.l10n_in_hsn_code"><h6><strong class="ml16">HSN/SAC Code:</strong> <span t-field="l.product_id.l10n_in_hsn_code"/></h6></t></td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.quantity"/>
|
||||
<span t-field="l.uom_id" groups="product.group_uom"/>
|
||||
<span t-field="l.uom_id" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
<record id="product_assembly" model="product.product">
|
||||
<field name="standard_price">0.1</field>
|
||||
<field name="uom_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="type">service</field>
|
||||
<field name="name">Assembly Service Cost</field>
|
||||
<field name="categ_id" ref="product.product_category_3"/>
|
||||
@@ -27,8 +27,8 @@
|
||||
<field name="standard_price">1100.0</field>
|
||||
<field name="list_price">1250.0</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">On demand hard-disk having capacity based on requirement.</field>
|
||||
<field name="default_code">HDD-DEM</field>
|
||||
</record>
|
||||
@@ -141,14 +141,14 @@
|
||||
|
||||
<record id="mrp_bom_3" model="mrp.bom">
|
||||
<field name="product_tmpl_id" ref="product_product_19_product_template"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_line_3" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_17"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_3"/>
|
||||
</record>
|
||||
@@ -159,7 +159,7 @@
|
||||
</record>
|
||||
<record id="mrp_bom_manufacture" model="mrp.bom">
|
||||
<field name="product_tmpl_id" ref="product.product_product_3_product_template"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">1</field>
|
||||
<field name="routing_id" ref="mrp_routing_0"/>
|
||||
</record>
|
||||
@@ -167,7 +167,7 @@
|
||||
<record id="mrp_bom_manufacture_line_1" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
@@ -175,7 +175,7 @@
|
||||
<record id="mrp_bom_manufacture_line_2" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_13"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
@@ -183,7 +183,7 @@
|
||||
<record id="mrp_bom_manufacture_line_3" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_16"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
@@ -191,7 +191,7 @@
|
||||
<record id="mrp_bom_manufacture_line_4" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_17"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
@@ -199,7 +199,7 @@
|
||||
<record id="mrp_bom_manufacture_line_5" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_20"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
@@ -207,7 +207,7 @@
|
||||
<record id="mrp_bom_manufacture_line_6" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_22"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
@@ -215,7 +215,7 @@
|
||||
<record id="mrp_bom_manufacture_line_7" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_24"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
@@ -226,8 +226,8 @@
|
||||
<field name="standard_price">600.0</field>
|
||||
<field name="list_price">147.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Self Build kit.</field>
|
||||
<field name="default_code">E-COM92</field>
|
||||
</record>
|
||||
@@ -238,7 +238,7 @@
|
||||
|
||||
<record id="mrp_bom_kit" model="mrp.bom">
|
||||
<field name="product_tmpl_id" ref="product_product_build_kit_product_template"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">2</field>
|
||||
<field name="type">phantom</field>
|
||||
</record>
|
||||
@@ -246,7 +246,7 @@
|
||||
<record id="mrp_bom_kit_line_1" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_kit"/>
|
||||
</record>
|
||||
@@ -254,21 +254,21 @@
|
||||
<record id="mrp_bom_kit_line_2" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product.product_product_9"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">5</field>
|
||||
<field name="bom_id" ref="mrp_bom_kit"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_1" model="mrp.production">
|
||||
<field name="product_id" ref="product.product_product_3"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="product_qty">3</field>
|
||||
<field name="bom_id" ref="mrp_bom_manufacture"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_production_2" model="mrp.production">
|
||||
<field name="product_id" ref="mrp.product_product_19"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="bom_id" ref="mrp.mrp_bom_3"/>
|
||||
</record>
|
||||
|
||||
@@ -278,8 +278,8 @@
|
||||
<field name="standard_price">2500</field>
|
||||
<field name="list_price">2250</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Solid wood table.</field>
|
||||
<field name="default_code">FURN001</field>
|
||||
</record>
|
||||
@@ -289,8 +289,8 @@
|
||||
<field name="standard_price">2000</field>
|
||||
<field name="list_price">2000</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Solid wood is a durable natural material.</field>
|
||||
<field name="default_code">FURN002</field>
|
||||
<field name="tracking">serial</field>
|
||||
@@ -301,8 +301,8 @@
|
||||
<field name="standard_price">50</field>
|
||||
<field name="list_price">50</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">18″ x 2½″ Square Leg</field>
|
||||
<field name="default_code">FURN003</field>
|
||||
<field name="tracking">lot</field>
|
||||
@@ -313,8 +313,8 @@
|
||||
<field name="standard_price">12.5</field>
|
||||
<field name="list_price">12.5</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Stainless steel screw full (dia - 5mm, Length - 10mm)</field>
|
||||
<field name="default_code">FURN004</field>
|
||||
</record>
|
||||
@@ -324,8 +324,8 @@
|
||||
<field name="standard_price">10</field>
|
||||
<field name="list_price">10</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Stainless steel screw</field>
|
||||
<field name="default_code">FURN005</field>
|
||||
</record>
|
||||
@@ -336,7 +336,7 @@
|
||||
|
||||
<record id="mrp_bom_desk" model="mrp.bom">
|
||||
<field name="product_tmpl_id" ref="product_product_computer_desk_product_template"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">3</field>
|
||||
<field name="routing_id" ref="mrp_routing_3"/>
|
||||
</record>
|
||||
@@ -344,7 +344,7 @@
|
||||
<record id="mrp_bom_desk_line_1" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_computer_desk_head"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">1</field>
|
||||
<field name="bom_id" ref="mrp_bom_desk"/>
|
||||
<field name="operation_id" ref="mrp.mrp_routing_workcenter_5"/>
|
||||
@@ -353,7 +353,7 @@
|
||||
<record id="mrp_bom_desk_line_2" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_computer_desk_leg"/>
|
||||
<field name="product_qty">4</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">2</field>
|
||||
<field name="bom_id" ref="mrp_bom_desk"/>
|
||||
<field name="operation_id" ref="mrp.mrp_routing_workcenter_5"/>
|
||||
@@ -362,7 +362,7 @@
|
||||
<record id="mrp_bom_desk_line_3" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_computer_desk_bolt"/>
|
||||
<field name="product_qty">4</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">3</field>
|
||||
<field name="bom_id" ref="mrp_bom_desk"/>
|
||||
<field name="operation_id" ref="mrp.mrp_routing_workcenter_5"/>
|
||||
@@ -371,7 +371,7 @@
|
||||
<record id="mrp_bom_desk_line_4" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_computer_desk_screw"/>
|
||||
<field name="product_qty">10</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">4</field>
|
||||
<field name="bom_id" ref="mrp_bom_desk"/>
|
||||
<field name="operation_id" ref="mrp.mrp_routing_workcenter_5"/>
|
||||
@@ -379,7 +379,7 @@
|
||||
|
||||
<record id="mrp_production_3" model="mrp.production">
|
||||
<field name="product_id" ref="product_product_computer_desk"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="bom_id" ref="mrp_bom_desk"/>
|
||||
</record>
|
||||
@@ -393,8 +393,8 @@
|
||||
<field name="standard_price">2000.0</field>
|
||||
<field name="list_price">2250.0</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">19v,5.5 x 2.5 mm Pin Type Adapter (Power Cord Included)</field>
|
||||
<field name="default_code">E-COM93</field>
|
||||
</record>
|
||||
@@ -406,8 +406,8 @@
|
||||
<field name="standard_price">800</field>
|
||||
<field name="list_price">850</field>
|
||||
<field name="type">product</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">New Original Laptop Keyboard Part No 9GT99</field>
|
||||
<field name="default_code">E-COM94</field>
|
||||
</record>
|
||||
@@ -441,7 +441,7 @@
|
||||
|
||||
<record id="stock_inventory_product_27_lot0" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_27"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_product_27"/>
|
||||
<field name="product_qty">50</field>
|
||||
<field name="prod_lot_id" ref="lot_product_27_0"/>
|
||||
@@ -450,7 +450,7 @@
|
||||
|
||||
<record id="stock_inventory_product_27_lot1" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_27"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_product_27"/>
|
||||
<field name="product_qty">40</field>
|
||||
<field name="prod_lot_id" ref="lot_product_27_1"/>
|
||||
@@ -464,7 +464,7 @@
|
||||
</record>
|
||||
<record id="stock_inventory_line_product_laptop_charger" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product_product_laptop_charger"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_product_laptop_charger"/>
|
||||
<field name="product_qty">50</field>
|
||||
<field name="prod_lot_id" ref="lot_product_laptop_charger"/>
|
||||
@@ -477,7 +477,7 @@
|
||||
</record>
|
||||
<record id="stock_inventory_line_product_laptop_keypad" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product_product_laptop_keypad"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_product_laptop_keypad"/>
|
||||
<field name="product_qty">50</field>
|
||||
<field name="prod_lot_id" ref="lot_product_laptop_keypad"/>
|
||||
@@ -486,41 +486,41 @@
|
||||
|
||||
<record id="mrp_bom_laptop_cust" model="mrp.bom">
|
||||
<field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">1</field>
|
||||
</record>
|
||||
<record id="mrp_bom_laptop_cust_line_1" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_laptop_charger"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">1</field>
|
||||
<field name="bom_id" ref="mrp_bom_laptop_cust"/>
|
||||
</record>
|
||||
<record id="mrp_bom_laptop_cust_line_2" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_laptop_keypad"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">2</field>
|
||||
<field name="bom_id" ref="mrp_bom_laptop_cust"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_laptop_cust_rout" model="mrp.bom">
|
||||
<field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">2</field>
|
||||
<field name="routing_id" ref="mrp_routing_1"/>
|
||||
</record>
|
||||
<record id="mrp_bom_laptop_cust_rout_line_1" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_laptop_charger"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">1</field>
|
||||
<field name="bom_id" ref="mrp_bom_laptop_cust_rout"/>
|
||||
</record>
|
||||
<record id="mrp_bom_laptop_cust_rout_line_2" model="mrp.bom.line">
|
||||
<field name="product_id" ref="product_product_laptop_keypad"/>
|
||||
<field name="product_qty">1</field>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="sequence">2</field>
|
||||
<field name="bom_id" ref="mrp_bom_laptop_cust_rout"/>
|
||||
</record>
|
||||
@@ -530,7 +530,7 @@
|
||||
</record>
|
||||
<record id="mrp_production_laptop_cust" model="mrp.production">
|
||||
<field name="product_id" ref="product.product_product_27"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="product_qty">5</field>
|
||||
<field name="location_src_id" ref="stock.stock_location_stock"/>
|
||||
<field name="location_dest_id" ref="stock.stock_location_stock"/>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<span t-att-res-id="bom_line['product_id'].id" res-model="product.product" view-type="form" t-esc="bom_line['product_id'].name"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-esc="bom_line['product_uom_qty']"/> <span t-esc="bom_line['product_uom'].name" groups="product.group_uom"/>
|
||||
<span t-esc="bom_line['product_uom_qty']"/> <span t-esc="bom_line['product_uom'].name" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-esc="bom_line['price_unit']" t-options='{"widget": "monetary", "display_currency": currency}'/>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="o.product_qty"/>
|
||||
<span groups="product.group_uom" t-field="o.product_uom_id.name"/>
|
||||
<span groups="uom.group_uom" t-field="o.product_uom_id.name"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="o.code"/>
|
||||
@@ -36,7 +36,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<span t-esc="l['pqty']"/>
|
||||
<span t-esc="l['uname']" groups="product.group_uom"/>
|
||||
<span t-esc="l['uname']" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-esc="l['code']"/>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="col-xs-3">
|
||||
<strong>Quantity:</strong><br/>
|
||||
<span t-field="o.product_qty"/>
|
||||
<span t-field="o.product_uom_id.name" groups="product.group_uom"/>
|
||||
<span t-field="o.product_uom_id.name" groups="uom.group_uom"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line.product_uom_qty"/>
|
||||
<span t-field="line.product_uom.name" groups="product.group_uom"/>
|
||||
<span t-field="line.product_uom.name" groups="uom.group_uom"/>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
|
||||
@@ -22,7 +22,7 @@ access_mrp_production_stock_worker,mrp.production stock_worker,model_mrp_product
|
||||
access_product_product_user,product.product user,product.model_product_product,mrp.group_mrp_user,1,0,0,0
|
||||
access_product_template_user,product.template user,product.model_product_template,mrp.group_mrp_user,1,0,0,0
|
||||
access_product_price_history_mrp_manager,product.price.history.mrp.manager,product.model_product_price_history,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_uom_user,product.uom user,product.model_product_uom,mrp.group_mrp_user,1,0,0,0
|
||||
access_product_uom_user,product.uom user,uom.model_product_uom,mrp.group_mrp_user,1,0,0,0
|
||||
access_product_supplierinfo_user,product.supplierinfo user,product.model_product_supplierinfo,mrp.group_mrp_user,1,1,1,1
|
||||
access_res_partner,res.partner,base.model_res_partner,mrp.group_mrp_user,1,0,0,0
|
||||
access_mrp_workorder_mrp_user,mrp.workorder.user,model_mrp_workorder,mrp.group_mrp_user,1,1,1,1
|
||||
@@ -31,7 +31,7 @@ access_resource_calendar_leaves_user,mrp.resource.calendar.leaves.user,resource.
|
||||
access_resource_calendar_leaves_manager,mrp.resource.calendar.leaves.manager,resource.model_resource_calendar_leaves,mrp.group_mrp_manager,1,0,0,0
|
||||
access_resource_calendar_attendance_mrp_user,mrp.resource.calendar.attendance.mrp.user,resource.model_resource_calendar_attendance,mrp.group_mrp_user,1,1,1,1
|
||||
access_resource_calendar_attendance_manager,mrp.resource.calendar.attendance.manager,resource.model_resource_calendar_attendance,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_puom_categ,product.uom.categ,product.model_product_uom_categ,mrp.group_mrp_user,1,0,0,0
|
||||
access_product_puom_categ,product.uom.categ,uom.model_product_uom_categ,mrp.group_mrp_user,1,0,0,0
|
||||
access_resource_resource,resource.resource,resource.model_resource_resource,mrp.group_mrp_user,1,0,0,0
|
||||
access_resource_resource_manager,resource.resource.manager,resource.model_resource_resource,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_supplierinfo_manager,product.supplierinfo user,product.model_product_supplierinfo,mrp.group_mrp_manager,1,0,0,0
|
||||
@@ -42,8 +42,8 @@ access_stock_warehouse_orderpoint_user,stock.warehouse.orderpoint,stock.model_st
|
||||
access_stock_picking_mrp_manager,stock.picking mrp_manager,stock.model_stock_picking,mrp.group_mrp_manager,1,0,0,0
|
||||
access_mrp_bom_stockuser,mrp.bom,model_mrp_bom,stock.group_stock_user,1,0,0,0
|
||||
access_mrp_bom_line_stockuser,mrp.bom.line,model_mrp_bom_line,stock.group_stock_user,1,0,0,0
|
||||
access_product_uom_categ_mrp_manager,product.uom.categ mrp_manager,product.model_product_uom_categ,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_uom_mrp_manager,product.uom mrp_manager,product.model_product_uom,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_uom_categ_mrp_manager,product.uom.categ mrp_manager,uom.model_product_uom_categ,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_uom_mrp_manager,product.uom mrp_manager,uom.model_product_uom,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_category_mrp_manager,product.category mrp_manager,product.model_product_category,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_template_mrp_manager,product.template mrp_manager,product.model_product_template,mrp.group_mrp_manager,1,1,1,1
|
||||
access_product_product_mrp_manager,product.product mrp_manager,product.model_product_product,mrp.group_mrp_manager,1,1,1,1
|
||||
|
||||
|
@@ -353,7 +353,7 @@ class TestMrpOrder(TestMrpCommon):
|
||||
""" Check the consumed quants of the produced quants when intermediate calls to `post_inventory` during a MO."""
|
||||
|
||||
# create a bom for `custom_laptop` with components that aren't tracked
|
||||
unit = self.ref("product.product_uom_unit")
|
||||
unit = self.ref("uom.product_uom_unit")
|
||||
custom_laptop = self.env.ref("product.product_product_27")
|
||||
custom_laptop.tracking = 'none'
|
||||
product_charger = self.env['product.product'].create({
|
||||
|
||||
@@ -234,7 +234,7 @@ class TestWorkOrderProcess(common.TransactionCase):
|
||||
|
||||
def test_01_without_workorder(self):
|
||||
""" Testing consume quants and produced quants without workorder """
|
||||
unit = self.ref("product.product_uom_unit")
|
||||
unit = self.ref("uom.product_uom_unit")
|
||||
custom_laptop = self.env.ref("product.product_product_27")
|
||||
custom_laptop.tracking = 'lot'
|
||||
|
||||
@@ -389,10 +389,10 @@ class TestWorkOrderProcess(common.TransactionCase):
|
||||
""" Testing bill of material with different unit of measure."""
|
||||
route_manufacture = self.warehouse.manufacture_pull_id.route_id.id
|
||||
route_mto = self.warehouse.mto_pull_id.route_id.id
|
||||
unit = self.ref("product.product_uom_unit")
|
||||
dozen = self.ref("product.product_uom_dozen")
|
||||
kg = self.ref("product.product_uom_kgm")
|
||||
gm = self.ref("product.product_uom_gram")
|
||||
unit = self.ref("uom.product_uom_unit")
|
||||
dozen = self.ref("uom.product_uom_dozen")
|
||||
kg = self.ref("uom.product_uom_kgm")
|
||||
gm = self.ref("uom.product_uom_gram")
|
||||
# Create Product A, B, C
|
||||
product_A = self.env['product.product'].create({
|
||||
'name': 'Product A',
|
||||
@@ -511,7 +511,7 @@ class TestWorkOrderProcess(common.TransactionCase):
|
||||
""" Test that the correct serial number is suggested on consecutive work orders. """
|
||||
laptop = self.env.ref("product.product_product_25")
|
||||
graphics_card = self.env.ref("product.product_product_24")
|
||||
unit = self.env.ref("product.product_uom_unit")
|
||||
unit = self.env.ref("uom.product_uom_unit")
|
||||
three_step_routing = self.env.ref("mrp.mrp_routing_1")
|
||||
|
||||
laptop.tracking = 'serial'
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
</group>
|
||||
@@ -57,7 +57,7 @@
|
||||
<button name="action_see_attachments" type="object" icon="fa-files-o" attrs="{'invisible': [('has_attachments', '=', False)]}"/>
|
||||
<button name="action_see_attachments" type="object" icon="fa-file" attrs="{'invisible': [('has_attachments', '=', True)]}"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
<field name="attribute_value_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('product_ids.product_tmpl_id', '=', parent.product_tmpl_id)]" groups="product.group_product_variant"/>
|
||||
<field name="operation_id" groups="mrp.group_mrp_routings" domain="[('routing_id', '=', parent.routing_id)]" options="{'no_quick_create':True,'no_create_edit':True}"/>
|
||||
</tree>
|
||||
@@ -94,7 +94,7 @@
|
||||
<field name="code"/>
|
||||
<field name="product_id" groups="product.group_product_variant"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -180,7 +180,7 @@
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="BoM details">
|
||||
@@ -201,7 +201,7 @@
|
||||
<field name="bom_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
<field name="routing_id"/>
|
||||
<field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
|
||||
</tree>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<field name="date_planned_start"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" sum="Total Qty" string="Quantity"/>
|
||||
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
<field name="availability"/>
|
||||
<field name="routing_id" groups="mrp.group_mrp_routings"/>
|
||||
<field name="origin" groups="base.group_no_one"/>
|
||||
@@ -85,7 +85,7 @@
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty" attrs="{'readonly': [('has_moves', '=', True)]}"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom" attrs="{'readonly': [('has_moves', '=', True)]}"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom" attrs="{'readonly': [('has_moves', '=', True)]}"/>
|
||||
<button type="action"
|
||||
name="%(mrp.action_change_production_qty)d"
|
||||
string="Update" class="oe_link" attrs="{'invisible': ['|', ('state', 'in', ('done','cancel')), ('id', '=', False)]}"/>
|
||||
@@ -117,7 +117,7 @@
|
||||
<field name="product_id" required="1"/>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="unit_factor" invisible="1"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
<field name="has_tracking" invisible="1"/>
|
||||
<field name="needs_lots" readonly="1" groups="stock.group_production_lot"/>
|
||||
<field name="is_done" invisible="1"/>
|
||||
@@ -136,7 +136,7 @@
|
||||
<tree default_order="done_move" editable="bottom" create="0" delete="0" decoration-muted="state in ('done', 'cancel')">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="lot_id" groups="stock.group_production_lot" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" attrs="{'invisible': [('lots_visible', '=', False)]}"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<field name="qty_done"/>
|
||||
<field name="lots_visible" invisible="1"/>
|
||||
<field name="done_move" invisible="1"/>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
@@ -154,7 +154,7 @@
|
||||
<field name="bom_id"/>
|
||||
<field name="lot_id" groups="stock.group_production_lot"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<field name="state"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
</tree>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty" attrs="{'readonly': [('serial', '=', True)]}"/>
|
||||
<field name="product_uom_id" readonly="1" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" readonly="1" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="product_tracking" invisible="1"/>
|
||||
<field name="lot_id" attrs="{'invisible': [('product_tracking', '=', 'none')], 'required': [('product_tracking', '!=', 'none')]}" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
<field name="lot_id" context="{'default_product_id': product_id}" domain="[('product_id', '=', product_id)]"/>
|
||||
<field name="qty_to_consume" readonly="1"/>
|
||||
<field name="qty_done"/>
|
||||
<field name="product_uom_id" readonly="1" force_save="1" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" readonly="1" force_save="1" groups="uom.group_uom"/>
|
||||
<field name="move_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -12,7 +12,7 @@ class TestMrpByProduct(common.TransactionCase):
|
||||
self.warehouse = self.env.ref('stock.warehouse0')
|
||||
route_manufacture = self.warehouse.manufacture_pull_id.route_id.id
|
||||
route_mto = self.warehouse.mto_pull_id.route_id.id
|
||||
self.uom_unit_id = self.ref('product.product_uom_unit')
|
||||
self.uom_unit_id = self.ref('uom.product_uom_unit')
|
||||
def create_product(name, route_ids=[]):
|
||||
return self.env['product.product'].create({
|
||||
'name': name,
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
<tree string="Byproducts" editable="top">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
</tree>
|
||||
<form string="Byproducts">
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
<field name="standard_price">13.0</field>
|
||||
<field name="list_price">18.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">MISC</field>
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/product_product_49-image.jpg"/>
|
||||
</record>
|
||||
@@ -54,7 +54,7 @@
|
||||
<field name="sequence">20</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_uom_categ_unit" model="product.uom.categ">
|
||||
<record id="uom.product_uom_categ_unit" model="product.uom.categ">
|
||||
<field name="is_pos_groupable">True</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
<field name="barcode">2100002000003</field>
|
||||
<field name="taxes_id">False</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/boni_orange-image.jpg"/>
|
||||
</record>
|
||||
<record id="papillon_orange" model="product.product">
|
||||
@@ -53,8 +53,8 @@
|
||||
<field name="name">Orange Butterfly</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/papillon_orange-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -65,8 +65,8 @@
|
||||
<field name="barcode">2301000000006</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/citron-image.jpg"/>
|
||||
</record>
|
||||
<record id="limon" model="product.product">
|
||||
@@ -75,8 +75,8 @@
|
||||
<field name="name">Stringers</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/limon-image.jpg"/>
|
||||
</record>
|
||||
<record id="pamplemousse_rouge_pamplemousse" model="product.product">
|
||||
@@ -85,8 +85,8 @@
|
||||
<field name="name">Red grapefruit</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/pamplemousse_rouge_pamplemousse-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -96,8 +96,8 @@
|
||||
<field name="name">Granny Smith apples</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/pomme_granny_smith-image.jpg"/>
|
||||
</record>
|
||||
<record id="pomme_jonagold" model="product.product">
|
||||
@@ -106,8 +106,8 @@
|
||||
<field name="name">Jonagold apples</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/pomme_jonagold-image.jpg"/>
|
||||
</record>
|
||||
<record id="pomme_golden_perlim" model="product.product">
|
||||
@@ -116,8 +116,8 @@
|
||||
<field name="name">Golden Apples Perlim</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/pomme_golden_perlim-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -127,8 +127,8 @@
|
||||
<field name="name">Conference pears</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/poire_conference-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -139,8 +139,8 @@
|
||||
<field name="to_weight">True</field>
|
||||
<field name="barcode">2300001000008</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/peche-image.jpg"/>
|
||||
<field name="taxes_id" eval='[(5,)]'/> <!-- no taxes -->
|
||||
</record>
|
||||
@@ -151,8 +151,8 @@
|
||||
<field name="name">Black Grapes</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/raisins-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -162,8 +162,8 @@
|
||||
<field name="name">Potatoes</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/pomme_de_terre-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -173,8 +173,8 @@
|
||||
<field name="name">Extra Flandria chicory</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/chicon_flandria_extra-image.jpg"/>
|
||||
</record>
|
||||
<record id="carotte" model="product.product">
|
||||
@@ -183,8 +183,8 @@
|
||||
<field name="name">Carrots</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/carotte-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -194,8 +194,8 @@
|
||||
<field name="name">In Cluster Tomatoes</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/tomate_en_grappe-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -206,8 +206,8 @@
|
||||
<field name="to_weight">True</field>
|
||||
<field name="barcode">2100001000004</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/Onions-image.jpg"/>
|
||||
</record>
|
||||
|
||||
@@ -217,8 +217,8 @@
|
||||
<field name="name">Red Pepper</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/poivron_rouges-image.jpg"/>
|
||||
</record>
|
||||
<record id="poivron_verts" model="product.product">
|
||||
@@ -227,8 +227,8 @@
|
||||
<field name="name">Green Peppers</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/poivron_verts-image.jpg"/>
|
||||
</record>
|
||||
<record id="poivron_jaunes" model="product.product">
|
||||
@@ -237,8 +237,8 @@
|
||||
<field name="name">Yellow Peppers</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/poivron_jaunes-image.jpg"/>
|
||||
</record>
|
||||
<record id="poireaux_poireaux" model="product.product">
|
||||
@@ -247,8 +247,8 @@
|
||||
<field name="name">Leeks</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/poireaux_poireaux-image.jpg"/>
|
||||
</record>
|
||||
<record id="courgette" model="product.product">
|
||||
@@ -257,8 +257,8 @@
|
||||
<field name="name">Zucchini</field>
|
||||
<field name="to_weight">True</field>
|
||||
<field name="pos_categ_id" ref="fruits_vegetables"/>
|
||||
<field name="uom_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm" />
|
||||
<field name="uom_id" ref="uom.product_uom_kgm" />
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm" />
|
||||
<field name="image" type="base64" file="point_of_sale/static/img/courgette-image.jpg"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ access_product_product_supplierinfo_user,product.supplierinfo user,product.model
|
||||
access_product_product_packaging_user,product.packaging user,product.model_product_packaging,group_pos_user,1,0,0,0
|
||||
access_stock_warehouse_manager,stock.warehouse manager,stock.model_stock_warehouse,group_pos_manager,1,0,0,0
|
||||
access_stock_location_manager,stock.location manager,stock.model_stock_location,group_pos_manager,1,0,0,0
|
||||
access_product_uom_manager,product.uom manager,product.model_product_uom,group_pos_manager,1,1,1,1
|
||||
access_product_uom_manager,product.uom manager,uom.model_product_uom,group_pos_manager,1,1,1,1
|
||||
access_product_category_manager,product.category manager,product.model_product_category,group_pos_manager,1,1,1,1
|
||||
access_product_pricelist_manager,product.pricelist manager,product.model_product_pricelist,group_pos_manager,1,1,1,1
|
||||
access_product_pricelist_user,product.pricelist user,product.model_product_pricelist,group_pos_user,1,0,0,0
|
||||
|
||||
|
@@ -85,7 +85,7 @@
|
||||
<record id="product_uom_categ_form_view" model="ir.ui.view">
|
||||
<field name="name">product.uom.categ.form.inherit</field>
|
||||
<field name="model">product.uom.categ</field>
|
||||
<field name="inherit_id" ref="product.product_uom_categ_form_view"/>
|
||||
<field name="inherit_id" ref="uom.product_uom_categ_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='name']" position="after">
|
||||
<field name="is_pos_groupable" groups="base.group_no_one"/>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
'name': 'Products & Pricelists',
|
||||
'version': '1.2',
|
||||
'category': 'Sales',
|
||||
'depends': ['base', 'decimal_precision', 'mail'],
|
||||
'depends': ['base', 'decimal_precision', 'mail', 'uom'],
|
||||
'description': """
|
||||
This is the base module for managing products and pricelists in Odoo.
|
||||
========================================================================
|
||||
@@ -33,7 +33,6 @@ Print product labels with barcode.
|
||||
'wizard/product_price_list_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/product_attribute_views.xml',
|
||||
'views/product_uom_views.xml',
|
||||
'views/product_views.xml',
|
||||
'views/product_template_views.xml',
|
||||
'views/product_pricelist_views.xml',
|
||||
|
||||
@@ -13,25 +13,6 @@
|
||||
<field name="name">Expenses</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: product.uom.categ
|
||||
-->
|
||||
<record id="product_uom_categ_unit" model="product.uom.categ">
|
||||
<field name="name">Unit</field>
|
||||
</record>
|
||||
<record id="product_uom_categ_kgm" model="product.uom.categ">
|
||||
<field name="name">Weight</field>
|
||||
</record>
|
||||
<record id="uom_categ_wtime" model="product.uom.categ">
|
||||
<field name="name">Working Time</field>
|
||||
</record>
|
||||
<record id="uom_categ_length" model="product.uom.categ">
|
||||
<field name="name">Length / Distance</field>
|
||||
</record>
|
||||
<record id="product_uom_categ_vol" model="product.uom.categ">
|
||||
<field name="name">Volume</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Precisions
|
||||
-->
|
||||
@@ -53,125 +34,6 @@
|
||||
<field name="digits" eval="3"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: product.uom
|
||||
-->
|
||||
<record id="product_uom_unit" model="product.uom">
|
||||
<field name="category_id" ref="product_uom_categ_unit"/>
|
||||
<field name="name">Unit(s)</field>
|
||||
<field name="factor" eval="1.0"/>
|
||||
<field name="rounding" eval="0.001"/>
|
||||
</record>
|
||||
<record id="product_uom_dozen" model="product.uom">
|
||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||
<field name="name">Dozen(s)</field>
|
||||
<field name="factor_inv" eval="12"/>
|
||||
<field name="uom_type">bigger</field>
|
||||
</record>
|
||||
<record id="product_uom_kgm" model="product.uom">
|
||||
<field name="category_id" ref="product_uom_categ_kgm"/>
|
||||
<field name="name">kg</field>
|
||||
<field name="factor" eval="1"/>
|
||||
<field name="rounding" eval="0.001"/>
|
||||
</record>
|
||||
<record id="product_uom_gram" model="product.uom">
|
||||
<field name="category_id" ref="product_uom_categ_kgm"/>
|
||||
<field name="name">g</field>
|
||||
<field name="factor" eval="1000"/>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_hour" model="product.uom">
|
||||
<field name="name">Hour(s)</field>
|
||||
<field eval="uom_categ_wtime" name="category_id"/>
|
||||
<field name="factor" eval="8.0"/>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_day" model="product.uom">
|
||||
<field name="name">Day(s)</field>
|
||||
<field eval="uom_categ_wtime" name="category_id"/>
|
||||
<field name="factor" eval="1.0"/>
|
||||
</record>
|
||||
<record id="product_uom_ton" model="product.uom">
|
||||
<field name="category_id" ref="product_uom_categ_kgm"/>
|
||||
<!-- 'tonne' is the most common spelling in english-speaking countries,
|
||||
the alternative is 'metric ton' in the US, abbreviated as 'mt' -->
|
||||
<field name="name">t</field>
|
||||
<field name="factor_inv" eval="1000"/>
|
||||
<field name="uom_type">bigger</field>
|
||||
</record>
|
||||
<record id="product_uom_meter" model="product.uom">
|
||||
<field name="category_id" ref="uom_categ_length"/>
|
||||
<field name="name">m</field>
|
||||
<field name="factor" eval="1.0"/>
|
||||
</record>
|
||||
<record id="product_uom_km" model="product.uom">
|
||||
<field name="category_id" ref="uom_categ_length"/>
|
||||
<field name="name">km</field>
|
||||
<field name="factor_inv" eval="1000"/>
|
||||
<field name="uom_type">bigger</field>
|
||||
</record>
|
||||
<record id="product_uom_cm" model="product.uom">
|
||||
<field name="category_id" ref="uom_categ_length"/>
|
||||
<field name="name">cm</field>
|
||||
<field name="factor" eval="100"/>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_litre" model="product.uom">
|
||||
<field name="name">Liter(s)</field>
|
||||
<field name="category_id" ref="product_uom_categ_vol"/>
|
||||
<field name="factor">1.0</field>
|
||||
</record>
|
||||
|
||||
<!--Americanization of units of measure-->
|
||||
<record id="product_uom_lb" model="product.uom">
|
||||
<field name="name">lb(s)</field>
|
||||
<field name="category_id" ref="product_uom_categ_kgm"/>
|
||||
<field name="factor">2.20462</field>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_oz" model="product.uom">
|
||||
<field name="name">oz(s)</field>
|
||||
<field name="category_id" ref="product_uom_categ_kgm"/>
|
||||
<field name="factor">35.274</field>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_inch" model="product.uom">
|
||||
<field name="name">inch(es)</field>
|
||||
<field name="category_id" ref="uom_categ_length"/>
|
||||
<field name="factor">39.3701</field>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_foot" model="product.uom">
|
||||
<field name="name">foot(ft)</field>
|
||||
<field name="category_id" ref="uom_categ_length"/>
|
||||
<field name="factor">3.28084</field>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_mile" model="product.uom">
|
||||
<field name="name">mile(s)</field>
|
||||
<field name="category_id" ref="uom_categ_length"/>
|
||||
<field name="factor_inv" eval="1609.34"/>
|
||||
<field name="uom_type">bigger</field>
|
||||
</record>
|
||||
<record id="product_uom_floz" model="product.uom">
|
||||
<field name="name">fl oz</field>
|
||||
<field name="category_id" ref="product_uom_categ_vol"/>
|
||||
<field name="factor">33.814</field>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_qt" model="product.uom">
|
||||
<field name="name">qt</field>
|
||||
<field name="category_id" ref="product_uom_categ_vol"/>
|
||||
<field name="factor">1.05669</field>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="product_uom_gal" model="product.uom">
|
||||
<field name="name">gal(s)</field>
|
||||
<field name="category_id" ref="product_uom_categ_vol"/>
|
||||
<field name="factor_inv" eval="3.78541"/>
|
||||
<field name="uom_type">bigger</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
... to here, it should be in product_demo but we cant just move it
|
||||
there yet otherwise people who have installed the server (even with the without-demo
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
<field name="standard_price">400.0</field>
|
||||
<field name="type">service</field>
|
||||
<field name="default_code">EXP</field>
|
||||
<field name="uom_id" ref="product_uom_day"/>
|
||||
<field name="uom_po_id" ref="product_uom_day"/>
|
||||
<field name="uom_id" ref="uom.product_uom_day"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_day"/>
|
||||
<field name="categ_id" ref="cat_expense"/>
|
||||
</record>
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
<field name="standard_price">40</field>
|
||||
<field name="list_price">90</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="description">Example of product to invoice on order.</field>
|
||||
<field name="default_code">SERV_ORDER</field>
|
||||
</record>
|
||||
@@ -59,8 +59,8 @@
|
||||
<field name="standard_price">200.0</field>
|
||||
<field name="list_price">180.0</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">SERV_DEL</field>
|
||||
</record>
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
<field name="standard_price">160</field>
|
||||
<field name="list_price">180</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Example of products to invoice based on cost.</field>
|
||||
<field name="default_code">SERV_COST</field>
|
||||
</record>
|
||||
@@ -82,8 +82,8 @@
|
||||
<field name="standard_price">55.0</field>
|
||||
<field name="list_price">70.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">PROD_DEL</field>
|
||||
</record>
|
||||
|
||||
@@ -93,8 +93,8 @@
|
||||
<field name="standard_price">35.0</field>
|
||||
<field name="list_price">40.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">PROD_DEL02</field>
|
||||
</record>
|
||||
|
||||
@@ -104,8 +104,8 @@
|
||||
<field name="standard_price">235.0</field>
|
||||
<field name="list_price">280.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">PROD_ORDER</field>
|
||||
</record>
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
<field name="standard_price">20.5</field>
|
||||
<field name="list_price">30.75</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="description">Example of products to invoice based on delivery.</field>
|
||||
</record>
|
||||
|
||||
@@ -126,8 +126,8 @@
|
||||
<field name="standard_price">25.5</field>
|
||||
<field name="list_price">38.25</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="description">Example of product to invoice based on delivery.</field>
|
||||
</record>
|
||||
|
||||
@@ -137,8 +137,8 @@
|
||||
<field name="list_price">450.0</field>
|
||||
<field name="standard_price">300.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description_sale">17" LCD Monitor
Processor AMD 8-Core</field>
|
||||
<field name="default_code">PCSC234</field>
|
||||
</record>
|
||||
@@ -183,8 +183,8 @@
|
||||
<field name="standard_price">500.0</field>
|
||||
<field name="list_price">750.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description_sale">7.9‑inch (diagonal) LED-backlit, 128Gb
Dual-core A5 with quad-core graphics
FaceTime HD Camera, 1.2 MP Photos</field>
|
||||
<field name="default_code">E-COM01</field>
|
||||
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_3')])]"/>
|
||||
@@ -241,8 +241,8 @@
|
||||
<field name="standard_price">140.0</field>
|
||||
<field name="list_price">247.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description_sale">Bose's smallest portable Bluetooth speaker</field>
|
||||
<field name="default_code">E-COM05</field>
|
||||
</record>
|
||||
@@ -254,8 +254,8 @@
|
||||
<field name="standard_price">600.0</field>
|
||||
<field name="list_price">147.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Custom computer shipped in kit.</field>
|
||||
<field name="default_code">E-COM06</field>
|
||||
</record>
|
||||
@@ -273,8 +273,8 @@
|
||||
<field name="standard_price">800.0</field>
|
||||
<field name="list_price">320.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">E-COM07</field>
|
||||
<field name='weight'>0.330</field>
|
||||
</record>
|
||||
@@ -292,8 +292,8 @@
|
||||
<field name="standard_price">70.0</field>
|
||||
<field name="list_price">79.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">E-COM08</field>
|
||||
</record>
|
||||
|
||||
@@ -303,8 +303,8 @@
|
||||
<field name="standard_price">1299.0</field>
|
||||
<field name="list_price">1799.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">E-COM09</field>
|
||||
<field name='weight'>9.54</field>
|
||||
</record>
|
||||
@@ -315,8 +315,8 @@
|
||||
<field name="standard_price">10.0</field>
|
||||
<field name="list_price">47.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">E-COM10</field>
|
||||
</record>
|
||||
|
||||
@@ -326,8 +326,8 @@
|
||||
<field name="standard_price">12.50</field>
|
||||
<field name="list_price">14</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">E-COM11</field>
|
||||
</record>
|
||||
|
||||
@@ -337,8 +337,8 @@
|
||||
<field name="standard_price">14</field>
|
||||
<field name="list_price">16.50</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">E-COM12</field>
|
||||
<field name="attribute_value_ids" eval="[(6,0,[ref('product.product_attribute_value_1')])]"/>
|
||||
</record>
|
||||
@@ -379,8 +379,8 @@
|
||||
<field name="standard_price">18</field>
|
||||
<field name="list_price">12.50</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">M-Wir</field>
|
||||
</record>
|
||||
|
||||
@@ -390,8 +390,8 @@
|
||||
<field name="standard_price">78.0</field>
|
||||
<field name="list_price">85.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">RAM-SR5</field>
|
||||
</record>
|
||||
|
||||
@@ -401,8 +401,8 @@
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="list_price">25.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">C-Case</field>
|
||||
</record>
|
||||
|
||||
@@ -412,8 +412,8 @@
|
||||
<field name="standard_price">860.0</field>
|
||||
<field name="list_price">975.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">HDD-SH1</field>
|
||||
</record>
|
||||
|
||||
@@ -423,8 +423,8 @@
|
||||
<field name="standard_price">1700.0</field>
|
||||
<field name="list_price">1950.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">MBi9</field>
|
||||
</record>
|
||||
<record id="product_product_22" model="product.product">
|
||||
@@ -433,8 +433,8 @@
|
||||
<field name="standard_price">2010.0</field>
|
||||
<field name="list_price">2100.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">CPUi5</field>
|
||||
</record>
|
||||
|
||||
@@ -444,8 +444,8 @@
|
||||
<field name="standard_price">876.0</field>
|
||||
<field name="list_price">885.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">CARD</field>
|
||||
</record>
|
||||
|
||||
@@ -455,8 +455,8 @@
|
||||
<field name="standard_price">2870.0</field>
|
||||
<field name="list_price">2950.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">17" Monitor, 4GB RAM
Standard-1294P Processor</field>
|
||||
<field name="default_code">LAP-E5</field>
|
||||
</record>
|
||||
@@ -467,8 +467,8 @@
|
||||
<field name="standard_price">3300.0</field>
|
||||
<field name="list_price">3645.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description">Custom Laptop based on customer's requirement.</field>
|
||||
<field name="default_code">LAP-CUS</field>
|
||||
</record>
|
||||
@@ -479,8 +479,8 @@
|
||||
<field name="standard_price">25000.0</field>
|
||||
<field name="list_price">23500.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description_sale">Dvorak keyboard
left-handed mouse</field>
|
||||
<field name="default_code">CONS_DEL03</field>
|
||||
</record>
|
||||
@@ -491,8 +491,8 @@
|
||||
<field name="standard_price">45000.0</field>
|
||||
<field name="list_price">40000.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description_sale">raid 1, 512ECC ram</field>
|
||||
<field name="default_code">CONS_DEL02</field>
|
||||
</record>
|
||||
@@ -503,8 +503,8 @@
|
||||
<field name="standard_price">65000.0</field>
|
||||
<field name="list_price">60000.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="description_sale">raid 10, 2048ECC ram</field>
|
||||
<field name="default_code">CONS_DEL01</field>
|
||||
</record>
|
||||
|
||||
@@ -13,6 +13,5 @@ from . import product
|
||||
|
||||
from . import product_attribute
|
||||
from . import product_pricelist
|
||||
from . import product_uom
|
||||
from . import res_company
|
||||
from . import res_partner
|
||||
|
||||
@@ -246,9 +246,9 @@ class ProductTemplate(models.Model):
|
||||
get_param = self.env['ir.config_parameter'].sudo().get_param
|
||||
product_weight_in_lbs_param = get_param('product.weight_in_lbs')
|
||||
if product_weight_in_lbs_param == '1':
|
||||
return self.env.ref('product.product_uom_lb')
|
||||
return self.env.ref('uom.product_uom_lb')
|
||||
else:
|
||||
return self.env.ref('product.product_uom_kgm')
|
||||
return self.env.ref('uom.product_uom_kgm')
|
||||
|
||||
def _compute_weight_uom_id(self):
|
||||
weight_uom_id = self._get_weight_uom_id_from_ir_config_parameter()
|
||||
|
||||
@@ -12,7 +12,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
help="Share your product to all companies defined in your instance.\n"
|
||||
" * Checked : Product are visible for every company, even if a company is defined on the partner.\n"
|
||||
" * Unchecked : Each company can see only its product (product where company is defined). Product not related to a company are visible for all companies.")
|
||||
group_uom = fields.Boolean("Units of Measure", implied_group='product.group_uom')
|
||||
group_uom = fields.Boolean("Units of Measure", implied_group='uom.group_uom')
|
||||
group_product_variant = fields.Boolean("Attributes and Variants", implied_group='product.group_product_variant')
|
||||
group_stock_packaging = fields.Boolean('Product Packagings',
|
||||
implied_group='product.group_stock_packaging')
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_product_uom_categ_user,product.uom.categ.user,model_product_uom_categ,base.group_user,1,0,0,0
|
||||
access_product_uom_user,product.uom.user,model_product_uom,base.group_user,1,0,0,0
|
||||
access_product_category_user,product.category.user,model_product_category,base.group_user,1,0,0,0
|
||||
access_product_template_user,product.template.user,model_product_template,base.group_user,1,0,0,0
|
||||
access_product_packaging_user,product.packaging.user,model_product_packaging,base.group_user,1,0,0,0
|
||||
|
||||
|
@@ -17,11 +17,6 @@
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record id="group_uom" model="res.groups">
|
||||
<field name="name">Manage Multiple Units of Measure</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record id="group_stock_packaging" model="res.groups">
|
||||
<field name="name">Manage Product Packaging</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import test_variants, test_uom, test_pricelist, test_product_pricelist
|
||||
from . import test_variants, test_pricelist, test_product_pricelist
|
||||
|
||||
@@ -17,8 +17,8 @@ class TestProductCommon(common.SavepointCase):
|
||||
|
||||
# Product environment related data
|
||||
Uom = cls.env['product.uom']
|
||||
cls.uom_unit = cls.env.ref('product.product_uom_unit')
|
||||
cls.uom_dozen = cls.env.ref('product.product_uom_dozen')
|
||||
cls.uom_unit = cls.env.ref('uom.product_uom_unit')
|
||||
cls.uom_dozen = cls.env.ref('uom.product_uom_dozen')
|
||||
cls.uom_dunit = Uom.create({
|
||||
'name': 'DeciUnit',
|
||||
'category_id': cls.uom_unit.category_id.id,
|
||||
@@ -26,7 +26,7 @@ class TestProductCommon(common.SavepointCase):
|
||||
'factor': 10.0,
|
||||
'uom_type': 'smaller',
|
||||
'rounding': 0.001})
|
||||
cls.uom_weight = cls.env.ref('product.product_uom_kgm')
|
||||
cls.uom_weight = cls.env.ref('uom.product_uom_kgm')
|
||||
Product = cls.env['product.product']
|
||||
cls.product_0 = Product.create({
|
||||
'name': 'Work',
|
||||
|
||||
@@ -11,10 +11,10 @@ class TestPricelist(TransactionCase):
|
||||
|
||||
self.datacard = self.env.ref('product.product_delivery_02')
|
||||
self.usb_adapter = self.env.ref('product.product_delivery_01')
|
||||
self.uom_ton = self.env.ref('product.product_uom_ton')
|
||||
self.uom_unit_id = self.ref('product.product_uom_unit')
|
||||
self.uom_dozen_id = self.ref('product.product_uom_dozen')
|
||||
self.uom_kgm_id = self.ref('product.product_uom_kgm')
|
||||
self.uom_ton = self.env.ref('uom.product_uom_ton')
|
||||
self.uom_unit_id = self.ref('uom.product_uom_unit')
|
||||
self.uom_dozen_id = self.ref('uom.product_uom_dozen')
|
||||
self.uom_kgm_id = self.ref('uom.product_uom_kgm')
|
||||
|
||||
self.public_pricelist = self.env.ref('product.list0')
|
||||
self.sale_pricelist_id = self.env['product.pricelist'].create({
|
||||
|
||||
@@ -19,7 +19,7 @@ class TestProductPricelist(TransactionCase):
|
||||
self.laptop_E5023 = self.env.ref('product.product_delivery_01')
|
||||
self.laptop_S3450 = self.env.ref("product.product_product_25")
|
||||
self.category_5_id = self.ref('product.product_category_5')
|
||||
self.uom_unit_id = self.ref('product.product_uom_unit')
|
||||
self.uom_unit_id = self.ref('uom.product_uom_unit')
|
||||
self.list0 = self.ref('product.list0')
|
||||
|
||||
self.ipad_retina_display.write({'uom_id': self.uom_unit_id, 'categ_id': self.category_5_id})
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<div class="oe_grey" groups="product.group_uom">
|
||||
<div class="oe_grey" groups="uom.group_uom">
|
||||
<p>The computed price is expressed in the default Unit of Measure of the product.</p>
|
||||
</div>
|
||||
<group col="6" attrs="{'invisible':[('compute_price', '!=', 'formula')]}">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<field name="standard_price"/>
|
||||
<field name="categ_id"/>
|
||||
<field name="type"/>
|
||||
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
</div>
|
||||
<field name="company_id" groups="base.group_multi_company"
|
||||
options="{'no_create': True}"/>
|
||||
<field name="uom_id" groups="product.group_uom" options="{'no_create': True}"/>
|
||||
<field name="uom_po_id" groups="product.group_uom" options="{'no_create': True}"/>
|
||||
<field name="uom_id" groups="uom.group_uom" options="{'no_create': True}"/>
|
||||
<field name="uom_po_id" groups="uom.group_uom" options="{'no_create': True}"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="product_variant_id" invisible="1"/>
|
||||
</group>
|
||||
@@ -293,7 +293,7 @@
|
||||
<field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
|
||||
<field name="lst_price"/>
|
||||
<field name="price" invisible="not context.get('pricelist',False)"/>
|
||||
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
<field name="barcode"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<field name="active" invisible="1"/>
|
||||
@@ -528,7 +528,7 @@
|
||||
<label for="min_qty"/>
|
||||
<div>
|
||||
<field name="min_qty" class="oe_inline"/>
|
||||
<field name="product_uom" class="oe_inline" groups="product.group_uom"/>
|
||||
<field name="product_uom" class="oe_inline" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<label for="price"/>
|
||||
<div>
|
||||
|
||||
@@ -604,8 +604,8 @@
|
||||
<field name="standard_price">500</field>
|
||||
<field name="list_price">900</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="email_template_id" ref="product_online_training_email_template"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<record id="product_product_jambon" model="product.product">
|
||||
<field name="list_price">7.0</field>
|
||||
<field name="standard_price">5.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="name">French cheese Camembert</field>
|
||||
<field name="life_time">15</field>
|
||||
<field name="use_time">10</field>
|
||||
@@ -27,8 +27,8 @@
|
||||
<record id="product_product_from" model="product.product">
|
||||
<field name="list_price">8.0</field>
|
||||
<field name="standard_price">6.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="name">Ham</field>
|
||||
<field name="life_time">30</field>
|
||||
<field name="use_time">25</field>
|
||||
@@ -48,8 +48,8 @@
|
||||
<record id="product_product_pain" model="product.product">
|
||||
<field name="list_price">8.0</field>
|
||||
<field name="standard_price">6.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="name">Bread</field>
|
||||
<field name="life_time">30</field>
|
||||
<field name="use_time">25</field>
|
||||
@@ -69,8 +69,8 @@
|
||||
<record id="product_product_lait" model="product.product">
|
||||
<field name="list_price">8.0</field>
|
||||
<field name="standard_price">6.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="name">Cow milk</field>
|
||||
<field name="life_time">30</field>
|
||||
<field name="use_time">25</field>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- This will set the unit of measure used in projects and tasks.-->
|
||||
<record id="base.main_company" model="res.company">
|
||||
<field name="project_time_mode_id" ref="product.product_uom_hour"></field>
|
||||
<field name="project_time_mode_id" ref="uom.product_uom_hour"></field>
|
||||
</record>
|
||||
|
||||
<!-- sale_timesheet and project define the same field without depending on each, which causes the field to be deleted when the module that created it
|
||||
|
||||
@@ -656,7 +656,7 @@ class Task(models.Model):
|
||||
# this should be safe (no context passed to avoid side-effects)
|
||||
obj_tm = self.env.user.company_id.project_time_mode_id
|
||||
# using get_object to get translation value
|
||||
uom_hour = self.env.ref('product.product_uom_hour', False)
|
||||
uom_hour = self.env.ref('uom.product_uom_hour', False)
|
||||
if not obj_tm or not uom_hour or obj_tm.id == uom_hour.id:
|
||||
return res
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class ResCompany(models.Model):
|
||||
_inherit = 'res.company'
|
||||
|
||||
project_time_mode_id = fields.Many2one('product.uom', string='Project Time Unit',
|
||||
default=lambda s: s.env.ref('product.product_uom_hour', raise_if_not_found=False),
|
||||
default=lambda s: s.env.ref('uom.product_uom_hour', raise_if_not_found=False),
|
||||
help="This will set the unit of measure used in projects and tasks.\n"
|
||||
"If you use the timesheet linked to projects, don't "
|
||||
"forget to setup the right unit of measure in your employees.")
|
||||
|
||||
@@ -32,21 +32,21 @@
|
||||
'name': 'RAM SR3',
|
||||
'price_unit': 79.80,
|
||||
'product_qty': 15.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_product_25'),
|
||||
'name': 'Laptop E5023',
|
||||
'price_unit': 2868.70,
|
||||
'product_qty': 5.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_product_27'),
|
||||
'name': 'Laptop Customized',
|
||||
'price_unit': 3297.20,
|
||||
'product_qty': 4.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')})
|
||||
]"/>
|
||||
</record>
|
||||
@@ -60,14 +60,14 @@
|
||||
'name': 'Multimedia Speakers',
|
||||
'price_unit': 132.50,
|
||||
'product_qty': 20.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_delivery_01'),
|
||||
'name': 'Pen drive, SP-2',
|
||||
'price_unit': 89.0,
|
||||
'product_qty': 5.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
]"/>
|
||||
</record>
|
||||
@@ -81,7 +81,7 @@
|
||||
'name': 'Support Services',
|
||||
'price_unit': 25.50,
|
||||
'product_qty': 10.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
]"/>
|
||||
</record>
|
||||
@@ -95,21 +95,21 @@
|
||||
'name': 'RAM SR2 (kit)',
|
||||
'price_unit': 85.50,
|
||||
'product_qty': 6.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_product_20'),
|
||||
'name': 'Motherboard I9P57',
|
||||
'price_unit': 1690.0,
|
||||
'product_qty': 5.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_product_6'),
|
||||
'name': 'iPad Mini',
|
||||
'price_unit': 800.0,
|
||||
'product_qty': 7.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')})
|
||||
]"/>
|
||||
</record>
|
||||
@@ -123,14 +123,14 @@
|
||||
'name': 'Processor Core i5 2.70 Ghz',
|
||||
'price_unit': 2010.0,
|
||||
'product_qty': 3.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_product_24'),
|
||||
'name': 'Graphics Card',
|
||||
'price_unit': 876.0,
|
||||
'product_qty': 3.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
]"/>
|
||||
</record>
|
||||
@@ -144,21 +144,21 @@
|
||||
'name': 'Ink Cartridge',
|
||||
'price_unit': 58.0,
|
||||
'product_qty': 9.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_delivery_01'),
|
||||
'name': 'Toner Cartridge',
|
||||
'price_unit': 65.0,
|
||||
'product_qty': 3.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.consu_delivery_01'),
|
||||
'name': 'GrapWorks Software',
|
||||
'price_unit': 154.5,
|
||||
'product_qty': 4.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
]"/>
|
||||
</record>
|
||||
@@ -172,14 +172,14 @@
|
||||
'name': 'Mouse, Wireless',
|
||||
'price_unit': 13.5,
|
||||
'product_qty': 5.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'product_id': ref('product.product_delivery_02'),
|
||||
'name': 'Webcam',
|
||||
'price_unit': 38.0,
|
||||
'product_qty': 15.0,
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
]"/>
|
||||
</record>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line.product_qty"/>
|
||||
<span t-field="line.product_uom.name" groups="product.group_uom"/>
|
||||
<span t-field="line.product_uom.name" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line.price_unit"/>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="order_line.product_qty"/>
|
||||
<span t-field="order_line.product_uom" groups="product.group_uom"/>
|
||||
<span t-field="order_line.product_uom" groups="uom.group_uom"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -37,8 +37,8 @@ access_account_move,account.move,account.model_account_move,group_purchase_user,
|
||||
access_account_move_line,account.move.line,account.model_account_move_line,group_purchase_user,1,0,0,0
|
||||
access_account_analytic_line,account.analytic.line,account.model_account_analytic_line,group_purchase_user,1,0,0,0
|
||||
access_res_partner_purchase_manager,res.partner.purchase.manager,base.model_res_partner,group_purchase_manager,1,1,1,0
|
||||
access_product_uom_categ_purchase_manager,product.uom.categ purchase_manager,product.model_product_uom_categ,purchase.group_purchase_manager,1,1,1,1
|
||||
access_product_uom_purchase_manager,product.uom purchase_manager,product.model_product_uom,purchase.group_purchase_manager,1,1,1,1
|
||||
access_product_uom_categ_purchase_manager,product.uom.categ purchase_manager,uom.model_product_uom_categ,purchase.group_purchase_manager,1,1,1,1
|
||||
access_product_uom_purchase_manager,product.uom purchase_manager,uom.model_product_uom,purchase.group_purchase_manager,1,1,1,1
|
||||
access_product_category_purchase_manager,product.category purchase_manager,product.model_product_category,purchase.group_purchase_manager,1,1,1,1
|
||||
access_product_template_purchase_manager,product.template purchase_manager,product.model_product_template,purchase.group_purchase_manager,1,1,1,1
|
||||
access_product_packaging_purchase_manager,product.packaging purchase_manager,product.model_product_packaging,purchase.group_purchase_manager,1,1,1,1
|
||||
|
||||
|
@@ -22,8 +22,8 @@ class TestAveragePrice(TestPurchase):
|
||||
'categ_id': self.env.ref('product.product_category_1').id,
|
||||
'list_price': 100.0,
|
||||
'standard_price': 60.0,
|
||||
'uom_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'cost_method': 'average',
|
||||
'valuation': 'real_time',
|
||||
'property_stock_account_input': self.ref('purchase.o_expense'),
|
||||
@@ -39,7 +39,7 @@ class TestAveragePrice(TestPurchase):
|
||||
'name': 'Average Ice Cream',
|
||||
'product_id': product_icecream.id,
|
||||
'product_qty': 10.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 60.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d'),
|
||||
})]
|
||||
@@ -66,7 +66,7 @@ class TestAveragePrice(TestPurchase):
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_icecream.id,
|
||||
'product_qty': 30.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 80.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d'),
|
||||
})]
|
||||
@@ -90,7 +90,7 @@ class TestAveragePrice(TestPurchase):
|
||||
'name': 'outgoing_shipment_avg_move',
|
||||
'product_id': product_icecream.id,
|
||||
'product_uom_qty': 20.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'location_id': self.env.ref('stock.stock_location_stock').id,
|
||||
'location_dest_id': self.env.ref('stock.stock_location_customers').id})]
|
||||
})
|
||||
@@ -110,7 +110,7 @@ class TestAveragePrice(TestPurchase):
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_icecream.id,
|
||||
'product_qty': 500.0,
|
||||
'product_uom': self.ref('product.product_uom_gram'),
|
||||
'product_uom': self.ref('uom.product_uom_gram'),
|
||||
'price_unit': 0.2,
|
||||
'date_planned': time.strftime('%Y-%m-%d'),
|
||||
})]
|
||||
|
||||
@@ -24,8 +24,8 @@ class TestFifoPrice(TestPurchase):
|
||||
'categ_id': self.env.ref('product.product_category_1').id,
|
||||
'list_price': 100.0,
|
||||
'standard_price': 70.0,
|
||||
'uom_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'cost_method': 'fifo',
|
||||
'valuation': 'real_time',
|
||||
'property_stock_account_input': self.ref('purchase.o_expense'),
|
||||
@@ -41,7 +41,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': 'FIFO Ice Cream',
|
||||
'product_id': product_icecream.id,
|
||||
'product_qty': 10.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 50.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d')})],
|
||||
})
|
||||
@@ -68,7 +68,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': 'FIFO Ice Cream',
|
||||
'product_id': product_icecream.id,
|
||||
'product_qty': 30.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 80.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d')})],
|
||||
})
|
||||
@@ -94,7 +94,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_icecream.id,
|
||||
'product_uom_qty': 20.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'location_id': self.env.ref('stock.stock_location_stock').id,
|
||||
'location_dest_id': self.env.ref('stock.stock_location_customers').id,
|
||||
'picking_type_id': self.env.ref('stock.picking_type_out').id})]
|
||||
@@ -118,7 +118,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_icecream.id,
|
||||
'product_uom_qty': 500.0,
|
||||
'product_uom': self.env.ref('product.product_uom_gram').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_gram').id,
|
||||
'location_id': self.env.ref('stock.stock_location_stock').id,
|
||||
'location_dest_id': self.env.ref('stock.stock_location_customers').id,
|
||||
'picking_type_id': self.env.ref('stock.picking_type_out').id})]
|
||||
@@ -149,14 +149,14 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': 'FIFO Ice Cream',
|
||||
'product_id': product_icecream.id,
|
||||
'product_qty': 30,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 0.150,
|
||||
'date_planned': time.strftime('%Y-%m-%d')}),
|
||||
(0, 0, {
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_icecream.id,
|
||||
'product_qty': 10.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 150.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d')})]
|
||||
})
|
||||
@@ -176,7 +176,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_icecream.id,
|
||||
'product_uom_qty': 49.5,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'location_id': self.env.ref('stock.stock_location_stock').id,
|
||||
'location_dest_id': self.env.ref('stock.stock_location_customers').id,
|
||||
'picking_type_id': self.env.ref('stock.picking_type_out').id})]
|
||||
@@ -197,7 +197,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_icecream.id,
|
||||
'product_uom_qty': 10,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'location_id': self.env.ref('stock.stock_location_stock').id,
|
||||
'location_dest_id': self.env.ref('stock.stock_location_customers').id,
|
||||
'picking_type_id': self.env.ref('stock.picking_type_out').id})]
|
||||
@@ -218,8 +218,8 @@ class TestFifoPrice(TestPurchase):
|
||||
'categ_id': self.env.ref('product.product_category_1').id,
|
||||
'list_price': 100.0,
|
||||
'standard_price': 70.0,
|
||||
'uom_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'cost_method': 'fifo',
|
||||
'valuation': 'real_time',
|
||||
'property_stock_account_input': self.ref('purchase.o_expense'),
|
||||
@@ -237,7 +237,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': product_fifo_negative.name,
|
||||
'product_id': product_fifo_negative.id,
|
||||
'product_uom_qty': 100,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'location_id': self.env.ref('stock.stock_location_stock').id,
|
||||
'location_dest_id': self.env.ref('stock.stock_location_customers').id,
|
||||
'picking_type_id': self.env.ref('stock.picking_type_out').id})]
|
||||
@@ -263,7 +263,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': product_fifo_negative.name,
|
||||
'product_id': product_fifo_negative.id,
|
||||
'product_uom_qty': 400,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'location_id': self.env.ref('stock.stock_location_stock').id,
|
||||
'location_dest_id': self.env.ref('stock.stock_location_customers').id,
|
||||
'picking_type_id': self.env.ref('stock.picking_type_out').id})]
|
||||
@@ -284,7 +284,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': 'FIFO Ice Cream',
|
||||
'product_id': product_fifo_negative.id,
|
||||
'product_qty': 50.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 50.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d')})],
|
||||
})
|
||||
@@ -303,7 +303,7 @@ class TestFifoPrice(TestPurchase):
|
||||
'name': product_icecream.name,
|
||||
'product_id': product_fifo_negative.id,
|
||||
'product_qty': 600.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 80.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d')})],
|
||||
})
|
||||
|
||||
@@ -20,8 +20,8 @@ class TestFifoReturns(TestPurchase):
|
||||
'type': 'product',
|
||||
'categ_id': self.env.ref('product.product_category_1').id,
|
||||
'standard_price': 0.0,
|
||||
'uom_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('product.product_uom_kgm').id,
|
||||
'uom_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'uom_po_id': self.env.ref('uom.product_uom_kgm').id,
|
||||
'cost_method': 'fifo',
|
||||
'valuation': 'real_time',
|
||||
'property_stock_account_input': self.ref('purchase.o_expense'),
|
||||
@@ -36,7 +36,7 @@ class TestFifoReturns(TestPurchase):
|
||||
'name': 'FIFO Ice Cream',
|
||||
'product_id': product_fiforet_icecream.id,
|
||||
'product_qty': 10.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 50.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d'),
|
||||
})],
|
||||
@@ -49,7 +49,7 @@ class TestFifoReturns(TestPurchase):
|
||||
'name': 'FIFO Ice Cream',
|
||||
'product_id': product_fiforet_icecream.id,
|
||||
'product_qty': 30.0,
|
||||
'product_uom': self.env.ref('product.product_uom_kgm').id,
|
||||
'product_uom': self.env.ref('uom.product_uom_kgm').id,
|
||||
'price_unit': 80.0,
|
||||
'date_planned': time.strftime('%Y-%m-%d'),
|
||||
})],
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
parent="purchase.menu_product_in_config_purchase" sequence="1" />
|
||||
|
||||
<menuitem
|
||||
action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
|
||||
action="uom.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
|
||||
parent="purchase.menu_product_in_config_purchase" sequence="10" />
|
||||
|
||||
<menuitem
|
||||
action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
|
||||
action="uom.product_uom_form_action" id="menu_purchase_uom_form_action"
|
||||
parent="purchase.menu_product_in_config_purchase" sequence="5"/>
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
<field name="product_qty"/>
|
||||
<field name="qty_received" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))], 'readonly': [('product_type', 'in', ('consu', 'product'))]}"/>
|
||||
<field name="qty_invoiced" attrs="{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))]}"/>
|
||||
<field name="product_uom" groups="product.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}" force_save="1"/>
|
||||
<field name="product_uom" groups="uom.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}" force_save="1"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase', 'search_view_ref': 'account.account_tax_view_search'}" options="{'no_create': True}"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
@@ -226,7 +226,7 @@
|
||||
<div>
|
||||
<field name="product_qty" class="oe_inline"/>
|
||||
<span class="oe_inline"> </span>
|
||||
<field name="product_uom" groups="product.group_uom" class="oe_inline"/>
|
||||
<field name="product_uom" groups="uom.group_uom" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="price_unit"/>
|
||||
</group>
|
||||
@@ -450,7 +450,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
<field name="date_planned" widget="date"/>
|
||||
</tree>
|
||||
@@ -478,7 +478,7 @@
|
||||
<label for="product_qty"/>
|
||||
<div>
|
||||
<field name="product_qty" readonly="1" class="oe_inline"/>
|
||||
<field name="product_uom" readonly="1" groups="product.group_uom" class="oe_inline"/>
|
||||
<field name="product_uom" readonly="1" groups="uom.group_uom" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="price_unit"/>
|
||||
</group>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<record id="requisition_line1" model="purchase.requisition.line">
|
||||
<field name="requisition_id" ref="requisition1"/>
|
||||
<field name="product_id" ref="product.product_product_13"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="product_qty">5</field>
|
||||
</record>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<field name="name">[RAM-SR5] RAM DDR SR5</field>
|
||||
<field name="date_planned" eval="time.strftime('%Y/%m/10')"/>
|
||||
<field name="product_id" ref="product.product_product_13"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">60</field>
|
||||
<field name="product_qty">5</field>
|
||||
</record>
|
||||
@@ -51,7 +51,7 @@
|
||||
<field name="name">[RAM-SR5] RAM DDR SR5</field>
|
||||
<field name="date_planned" eval="time.strftime('%Y/%m/15')"/>
|
||||
<field name="product_id" ref="product.product_product_13"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">50</field>
|
||||
<field name="product_qty">3</field>
|
||||
</record>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<tr>
|
||||
<th><strong>Description</strong></th>
|
||||
<th class="text-right"><strong>Qty</strong></th>
|
||||
<th class="text-center" groups="product.group_uom">
|
||||
<th class="text-center" groups="uom.group_uom">
|
||||
<strong>Product UoM</strong>
|
||||
</th>
|
||||
<th class="text-right"><strong>Scheduled Date</strong></th>
|
||||
@@ -52,7 +52,7 @@
|
||||
<span t-field="line_ids.product_qty"/>
|
||||
</td>
|
||||
<t>
|
||||
<td class="text-center" groups="product.group_uom">
|
||||
<td class="text-center" groups="uom.group_uom">
|
||||
<span t-field="line_ids.product_uom_id.category_id.name"/>
|
||||
</td>
|
||||
</t>
|
||||
|
||||
@@ -13,7 +13,7 @@ class TestPurchaseRequisition(common.TransactionCase):
|
||||
super(TestPurchaseRequisition, self).setUp()
|
||||
|
||||
self.product_09_id = self.ref('product.product_product_9')
|
||||
self.product_09_uom_id = self.ref('product.product_uom_unit')
|
||||
self.product_09_uom_id = self.ref('uom.product_uom_unit')
|
||||
self.product_13_id = self.ref('product.product_product_13')
|
||||
self.res_partner_1_id = self.ref('base.res_partner_1')
|
||||
self.res_company_id = self.ref('base.main_company')
|
||||
@@ -50,7 +50,7 @@ class TestPurchaseRequisition(common.TransactionCase):
|
||||
warehouse = self.env['stock.warehouse'].browse(self.ref('stock.warehouse0'))
|
||||
product = self.env['product.product'].browse(self.product_13_id)
|
||||
product.write({'route_ids': [(4, self.ref('purchase.route_warehouse0_buy'))]})
|
||||
self.env['procurement.group'].run(product, 14, self.env['product.uom'].browse(self.ref('product.product_uom_unit')), warehouse.lot_stock_id, '/', '/',
|
||||
self.env['procurement.group'].run(product, 14, self.env['product.uom'].browse(self.ref('uom.product_uom_unit')), warehouse.lot_stock_id, '/', '/',
|
||||
{
|
||||
'warehouse_id': warehouse,
|
||||
'date_planned': date_planned,
|
||||
@@ -61,7 +61,7 @@ class TestPurchaseRequisition(common.TransactionCase):
|
||||
requisition = line[0].requisition_id
|
||||
self.assertEqual(requisition.date_end, date_planned, "End date does not correspond.")
|
||||
self.assertEqual(len(requisition.line_ids), 1, "Requisition Lines should be one.")
|
||||
self.assertEqual(line.product_uom_id.id, self.ref('product.product_uom_unit'), "UOM is not correspond.")
|
||||
self.assertEqual(line.product_uom_id.id, self.ref('uom.product_uom_unit'), "UOM is not correspond.")
|
||||
|
||||
# Give access rights of Purchase Requisition User to open requisition
|
||||
# Set tender state to choose tendering line.
|
||||
@@ -83,7 +83,7 @@ class TestPurchaseRequisition(common.TransactionCase):
|
||||
# Create a pruchase requisition with type blanket order and two product
|
||||
line1 = (0, 0, {'product_id': self.product_09_id, 'product_qty': quantity, 'product_uom_id': self.product_09_uom_id, 'price_unit': price_product09})
|
||||
|
||||
self.product_13_uom_id = self.ref('product.product_uom_unit')
|
||||
self.product_13_uom_id = self.ref('uom.product_uom_unit')
|
||||
line2 = (0, 0, {'product_id': self.product_13_id, 'product_qty': quantity, 'product_uom_id': self.product_13_uom_id, 'price_unit': price_product13})
|
||||
|
||||
requisition_type = self.env['purchase.requisition.type'].create({
|
||||
@@ -130,7 +130,7 @@ class TestPurchaseRequisition(common.TransactionCase):
|
||||
"""
|
||||
|
||||
# Product creation
|
||||
unit = self.ref("product.product_uom_unit")
|
||||
unit = self.ref("uom.product_uom_unit")
|
||||
warehouse1 = self.env.ref('stock.warehouse0')
|
||||
route_buy = self.ref('purchase.route_warehouse0_buy')
|
||||
route_mto = warehouse1.mto_pull_id.route_id.id
|
||||
@@ -204,7 +204,7 @@ class TestPurchaseRequisition(common.TransactionCase):
|
||||
"""
|
||||
|
||||
# Product creation
|
||||
unit = self.ref("product.product_uom_unit")
|
||||
unit = self.ref("uom.product_uom_unit")
|
||||
warehouse1 = self.env.ref('stock.warehouse0')
|
||||
route_buy = self.ref('purchase.route_warehouse0_buy')
|
||||
route_mto = warehouse1.mto_pull_id.route_id.id
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="qty_ordered"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom"/>
|
||||
<field name="schedule_date" groups="base.group_no_one"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="price_unit"/>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/>
|
||||
<field name="invoice_method">none</field>
|
||||
<field name="product_id" ref="product.product_product_3"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="partner_invoice_id" ref="base.res_partner_address_1"/>
|
||||
<field name="location_id" ref="stock.stock_location_stock"/>
|
||||
<field name="operations" model="repair.line" eval="[(5, 0, 0), (0, 0, {
|
||||
@@ -13,7 +13,7 @@
|
||||
'location_id': obj().env.ref('stock.stock_location_stock').id,
|
||||
'name': '[M-Las] Mouse, Laser',
|
||||
'product_id': obj().env.ref('product.product_product_11').id,
|
||||
'product_uom': obj().env.ref('product.product_uom_unit').id,
|
||||
'product_uom': obj().env.ref('uom.product_uom_unit').id,
|
||||
'product_uom_qty': '1.0',
|
||||
'price_unit': 50.0,
|
||||
'state': 'draft',
|
||||
@@ -23,7 +23,7 @@
|
||||
'name': 'Laptop formatting fees',
|
||||
'product_id': obj().env.ref('product.product_product_11c').id,
|
||||
'product_uom_qty': 1.0,
|
||||
'product_uom': obj().env.ref('product.product_uom_unit').id,
|
||||
'product_uom': obj().env.ref('uom.product_uom_unit').id,
|
||||
'price_unit': 50.0,
|
||||
})]"/>
|
||||
<field name="partner_id" ref="base.res_partner_12"/>
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<record id="repair_r0" model="repair.order">
|
||||
<field name="product_id" ref="product.product_product_5"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="address_id" ref="base.res_partner_address_1"/>
|
||||
<field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/>
|
||||
<field name="invoice_method">after_repair</field>
|
||||
@@ -43,7 +43,7 @@
|
||||
'name': '[M-Wir] Mouse, Wireless',
|
||||
'price_unit': 50.0,
|
||||
'product_id': obj().env.ref('product.product_product_12').id,
|
||||
'product_uom': obj().env.ref('product.product_uom_unit').id,
|
||||
'product_uom': obj().env.ref('uom.product_uom_unit').id,
|
||||
'product_uom_qty': 1.0,
|
||||
'state': 'draft',
|
||||
'type': 'add',
|
||||
@@ -52,7 +52,7 @@
|
||||
'name': 'Monitor screen repair',
|
||||
'product_id': obj().env.ref('product.product_product_5c').id,
|
||||
'product_uom_qty': 1.0,
|
||||
'product_uom': obj().env.ref('product.product_uom_unit').id,
|
||||
'product_uom': obj().env.ref('uom.product_uom_unit').id,
|
||||
'price_unit': 50.0,
|
||||
})]"/>
|
||||
<field name="partner_id" ref="base.res_partner_12"/>
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
<record id="repair_r2" model="repair.order">
|
||||
<field name="product_id" ref="product.product_product_6"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="address_id" ref="base.res_partner_address_1"/>
|
||||
<field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/>
|
||||
<field name="invoice_method">b4repair</field>
|
||||
@@ -72,7 +72,7 @@
|
||||
'name': '[RAM-SR5] RAM DDR SR5',
|
||||
'price_unit': 50.0,
|
||||
'product_id': obj().env.ref('product.product_product_13').id,
|
||||
'product_uom': obj().env.ref('product.product_uom_unit').id,
|
||||
'product_uom': obj().env.ref('uom.product_uom_unit').id,
|
||||
'product_uom_qty': 1.0,
|
||||
'state': 'draft',
|
||||
'type': 'add',
|
||||
@@ -81,7 +81,7 @@
|
||||
'name': 'SIM card holder repair',
|
||||
'product_id': obj().env.ref('product.product_product_6c').id,
|
||||
'product_uom_qty': 1.0,
|
||||
'product_uom': obj().env.ref('product.product_uom_unit').id,
|
||||
'product_uom': obj().env.ref('uom.product_uom_unit').id,
|
||||
'price_unit': 50.0,
|
||||
})]"/>
|
||||
<field name="partner_id" ref="base.res_partner_12"/>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line.product_uom_qty"/>
|
||||
<span groups="product.group_uom" t-field="line.product_uom.name"/>
|
||||
<span groups="uom.group_uom" t-field="line.product_uom.name"/>
|
||||
</td>
|
||||
<t t-if="(line.repair_id.invoice_method != 'none')">
|
||||
<td class="text-right">
|
||||
@@ -102,7 +102,7 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="fees.product_uom_qty"/>
|
||||
<span groups="product.group_uom" t-field="fees.product_uom.name"/>
|
||||
<span groups="uom.group_uom" t-field="fees.product_uom.name"/>
|
||||
</td>
|
||||
<t t-if="(fees.repair_id.invoice_method != 'none')">
|
||||
<td class="text-right">
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<label for="product_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot" attrs="{'required': [('tracking', '!=', 'none')], 'readonly': [('state', '=', 'done')]}"/>
|
||||
<field name="partner_id" attrs="{'required':[('invoice_method','!=','none')]}"/>
|
||||
@@ -83,7 +83,7 @@
|
||||
<label for="product_uom_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="price_unit"/>
|
||||
@@ -113,7 +113,7 @@
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_uom_qty" string="Quantity"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="uom.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale')]"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
@@ -141,7 +141,7 @@
|
||||
<label for="product_uom_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="product_uom_qty" string="Quantity"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="price_unit"/>
|
||||
<field widget="many2many_tags" name="tax_id" domain="[('type_tax_use','=','sale')]"/>
|
||||
@@ -152,7 +152,7 @@
|
||||
<field name="product_id" domain="[('type','=','service')]"/>
|
||||
<field name='name'/>
|
||||
<field name="product_uom_qty" string="Quantity"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="uom.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="tax_id" domain="[('type_tax_use', '=', 'sale')]" widget="many2many_tags"/>
|
||||
<field name="price_subtotal" widget="monetary"/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<th class="text-right">Intrastat</th>
|
||||
<th class="text-right">Weight</th>
|
||||
<th class="text-right">Quantity</th>
|
||||
<th groups="product.group_uom">Unit of measure</th>
|
||||
<th groups="uom.group_uom">Unit of measure</th>
|
||||
<th class="text-right">Unit Price</th>
|
||||
<th class="text-right" t-if="display_discount" groups="sale.group_discount_per_so_line">Discount (%)</th>
|
||||
<th class="text-right">Amount</th>
|
||||
@@ -74,7 +74,7 @@
|
||||
<td class="text-right"><span t-esc="l.product_id.intrastat_id.name"/></td>
|
||||
<td class="text-right"><span t-esc="l.product_id.weight"/></td>
|
||||
<td class="text-right"><span t-field="l.quantity"/></td>
|
||||
<td groups="product.group_uom"><span t-field="l.uom_id"/></td>
|
||||
<td groups="uom.group_uom"><span t-field="l.uom_id"/></td>
|
||||
<td class="text-right"><span t-field="l.price_unit"/></td>
|
||||
<td t-if="display_discount" groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
|
||||
<td class="text-right" groups="sale.group_show_price_subtotal">
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2950.00</field>
|
||||
</record>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<field name="name">Pen drive, 16GB</field>
|
||||
<field name="product_id" ref="product.product_delivery_02"/>
|
||||
<field name="product_uom_qty">5</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">145.00</field>
|
||||
</record>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<field name="name">Headset USB</field>
|
||||
<field name="product_id" ref="product.product_delivery_01"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">65.00</field>
|
||||
</record>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<field name="name">Service on demand</field>
|
||||
<field name="product_id" ref="product.product_product_1"/>
|
||||
<field name="product_uom_qty">24</field>
|
||||
<field name="product_uom" ref="product.product_uom_hour"/>
|
||||
<field name="product_uom" ref="uom.product_uom_hour"/>
|
||||
<field name="price_unit">75.00</field>
|
||||
</record>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<field name="name">On Site Assistance</field>
|
||||
<field name="product_id" ref="product.product_product_2"/>
|
||||
<field name="product_uom_qty">30</field>
|
||||
<field name="product_uom" ref="product.product_uom_hour"/>
|
||||
<field name="product_uom" ref="uom.product_uom_hour"/>
|
||||
<field name="price_unit">38.25</field>
|
||||
</record>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<field name="name">On Site Monitoring</field>
|
||||
<field name="product_id" ref="product.product_product_1"/>
|
||||
<field name="product_uom_qty">10</field>
|
||||
<field name="product_uom" ref="product.product_uom_hour"/>
|
||||
<field name="product_uom" ref="uom.product_uom_hour"/>
|
||||
<field name="price_unit">30.75</field>
|
||||
</record>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<field name="name">Toner Cartridge</field>
|
||||
<field name="product_id" ref="product.product_delivery_01"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">70.00</field>
|
||||
</record>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<field name="name">Service on demand</field>
|
||||
<field name="product_id" ref="product.product_product_1"/>
|
||||
<field name="product_uom_qty">16</field>
|
||||
<field name="product_uom" ref="product.product_uom_hour"/>
|
||||
<field name="product_uom" ref="uom.product_uom_hour"/>
|
||||
<field name="price_unit">75.00</field>
|
||||
</record>
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
<field name="name">Webcam</field>
|
||||
<field name="product_id" ref="product.product_delivery_02"/>
|
||||
<field name="product_uom_qty">10</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">45.00</field>
|
||||
</record>
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<field name="name">Multimedia Speakers</field>
|
||||
<field name="product_id" ref="product.consu_delivery_02"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">150.00</field>
|
||||
</record>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
<field name="name">Switch, 24 ports</field>
|
||||
<field name="product_id" ref="product.product_delivery_01"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">70.00</field>
|
||||
</record>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
<field name="name">External Hard disk</field>
|
||||
<field name="product_id" ref="product.product_delivery_02"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">405.00</field>
|
||||
</record>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<field name="name">PC Assamble + 2GB RAM</field>
|
||||
<field name="product_id" ref="product.product_product_4"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">750.00</field>
|
||||
</record>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">5</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2950.00</field>
|
||||
</record>
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
<field name="name">GrapWorks Software</field>
|
||||
<field name="product_id" ref="product.consu_delivery_01"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">173.00</field>
|
||||
</record>
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
<field name="name">Datacard</field>
|
||||
<field name="product_id" ref="product.product_delivery_02"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">40.00</field>
|
||||
</record>
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<field name="name">USB Adapter</field>
|
||||
<field name="product_id" ref="product.product_delivery_01"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">18.00</field>
|
||||
</record>
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
<field name="name">Laptop Customized</field>
|
||||
<field name="product_id" ref="product.product_product_27"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">3645.00</field>
|
||||
</record>
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
<field name="name">Laptop Customized</field>
|
||||
<field name="product_id" ref="product.product_product_27"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">3245.00</field>
|
||||
</record>
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2550.00</field>
|
||||
</record>
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2450.00</field>
|
||||
</record>
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">3150.00</field>
|
||||
</record>
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -395,7 +395,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2950.00</field>
|
||||
</record>
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">1</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">4</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2750.00</field>
|
||||
</record>
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">4</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -451,7 +451,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">4</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2950.00</field>
|
||||
</record>
|
||||
|
||||
@@ -460,7 +460,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -479,7 +479,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2750.00</field>
|
||||
</record>
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">3550.00</field>
|
||||
</record>
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -535,7 +535,7 @@
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2950.00</field>
|
||||
</record>
|
||||
|
||||
@@ -544,7 +544,7 @@
|
||||
<field name="name">Mouse, Wireless</field>
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">12.50</field>
|
||||
</record>
|
||||
|
||||
@@ -604,8 +604,8 @@ Thanks!</field>
|
||||
<field name="list_price">150.0</field>
|
||||
<field name="invoice_policy">order</field>
|
||||
<field name="standard_price">100.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="company_id" eval="[]"/>
|
||||
<field name="image" type="base64" file="sale/static/img/advance_product_0-image.jpg"/>
|
||||
<field name="taxes_id" eval="[]"/>
|
||||
@@ -634,7 +634,7 @@ Thanks!</field>
|
||||
<field name="name">Laptop E5023</field>
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_qty">3</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">2950.00</field>
|
||||
</record>
|
||||
|
||||
@@ -643,7 +643,7 @@ Thanks!</field>
|
||||
<field name="name">Pen drive, 16GB</field>
|
||||
<field name="product_id" ref="product.product_delivery_02"/>
|
||||
<field name="product_uom_qty">5</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">145.00</field>
|
||||
</record>
|
||||
|
||||
@@ -652,7 +652,7 @@ Thanks!</field>
|
||||
<field name="name">Headset USB</field>
|
||||
<field name="product_id" ref="product.product_delivery_01"/>
|
||||
<field name="product_uom_qty">2</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="price_unit">65.00</field>
|
||||
</record>
|
||||
|
||||
@@ -672,7 +672,7 @@ Thanks!</field>
|
||||
<field name="name">Service on demand</field>
|
||||
<field name="product_id" ref="product.product_product_1"/>
|
||||
<field name="product_uom_qty">24</field>
|
||||
<field name="product_uom" ref="product.product_uom_hour"/>
|
||||
<field name="product_uom" ref="uom.product_uom_hour"/>
|
||||
<field name="price_unit">75.00</field>
|
||||
</record>
|
||||
|
||||
@@ -681,7 +681,7 @@ Thanks!</field>
|
||||
<field name="name">On Site Assistance</field>
|
||||
<field name="product_id" ref="product.product_product_2"/>
|
||||
<field name="product_uom_qty">30</field>
|
||||
<field name="product_uom" ref="product.product_uom_hour"/>
|
||||
<field name="product_uom" ref="uom.product_uom_hour"/>
|
||||
<field name="price_unit">38.25</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<td><span t-field="l.name"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.quantity"/>
|
||||
<span t-field="l.uom_id" groups="product.group_uom"/>
|
||||
<span t-field="l.uom_id" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<td><span t-field="l.name"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.product_uom_qty"/>
|
||||
<span t-field="l.product_uom" groups="product.group_uom"/>
|
||||
<span t-field="l.product_uom" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
|
||||
@@ -22,11 +22,11 @@ access_res_partner_sale_manager,res.partner.sale.manager,base.model_res_partner,
|
||||
access_product_template_sale_user,product.template sale use,product.model_product_template,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_product_product_sale_user,product.product sale use,product.model_product_product,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_account_tax_user,account.tax.user,account.model_account_tax,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_product_uom_user,product.uom.user,product.model_product_uom,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_product_uom_user,product.uom.user,uom.model_product_uom,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_product_pricelist_sale_user,product.pricelist.sale.user,product.model_product_pricelist,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_account_account_salesman,account_account salesman,account.model_account_account,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_product_uom_categ_sale_manager,product.uom.categ salemanager,product.model_product_uom_categ,sales_team.group_sale_manager,1,1,1,1
|
||||
access_product_uom_sale_manager,product.uom salemanager,product.model_product_uom,sales_team.group_sale_manager,1,1,1,1
|
||||
access_product_uom_categ_sale_manager,product.uom.categ salemanager,uom.model_product_uom_categ,sales_team.group_sale_manager,1,1,1,1
|
||||
access_product_uom_sale_manager,product.uom salemanager,uom.model_product_uom,sales_team.group_sale_manager,1,1,1,1
|
||||
access_product_category_sale_manager,product.category salemanager,product.model_product_category,sales_team.group_sale_manager,1,1,1,1
|
||||
access_product_supplierinfo_user,product.supplierinfo.user,product.model_product_supplierinfo,sales_team.group_sale_salesman,1,0,0,0
|
||||
access_product_supplierinfo_sale_manager,product.supplierinfo salemanager,product.model_product_supplierinfo,sales_team.group_sale_manager,1,1,1,1
|
||||
|
||||
|
@@ -72,8 +72,8 @@ class TestCommonSaleNoChart(TestAccountNoChartCommon):
|
||||
'property_account_income_categ_id': cls.account_income_product.id
|
||||
})
|
||||
# Products
|
||||
uom_unit = cls.env.ref('product.product_uom_unit')
|
||||
uom_hour = cls.env.ref('product.product_uom_hour')
|
||||
uom_unit = cls.env.ref('uom.product_uom_unit')
|
||||
uom_hour = cls.env.ref('uom.product_uom_hour')
|
||||
cls.product_order = cls.env['product.product'].create({
|
||||
'name': "Zed+ Antivirus",
|
||||
'standard_price': 235.0,
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('group_uom','=',False)]}">
|
||||
<div class="mt16">
|
||||
<button name="%(product.product_uom_form_action)d" icon="fa-arrow-right" type="action" string="Units of Measure" class="btn-link"/>
|
||||
<button name="%(uom.product_uom_form_action)d" icon="fa-arrow-right" type="action" string="Units of Measure" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -68,9 +68,9 @@
|
||||
<menuitem id="menu_attribute_action" action="product.attribute_action" parent="prod_config_main" sequence="1" groups="base.group_no_one" active="False"/>
|
||||
<menuitem action="product.variants_action" id="menu_variants_action" parent="sale.prod_config_main" sequence="2" groups="base.group_no_one" active="False"/>
|
||||
<menuitem id="menu_products" action="product.product_normal_action_sell" parent="product_menu_catalog" groups="base.group_no_one" sequence="2" active="False"/>
|
||||
<menuitem id="next_id_16" name="Units of Measure" parent="sale.prod_config_main" sequence="6" groups="product.group_uom" active="False"/>
|
||||
<menuitem action="product.product_uom_form_action" id="menu_product_uom_form_action" parent="sale.prod_config_main" sequence="7" groups="product.group_uom" active="False"/>
|
||||
<menuitem action="product.product_uom_categ_form_action" id="menu_product_uom_categ_form_action" parent="sale.prod_config_main" sequence="8" groups="product.group_uom" active="False"/>
|
||||
<menuitem id="next_id_16" name="Units of Measure" parent="sale.prod_config_main" sequence="6" groups="uom.group_uom" active="False"/>
|
||||
<menuitem action="uom.product_uom_form_action" id="menu_product_uom_form_action" parent="sale.prod_config_main" sequence="7" groups="uom.group_uom" active="False"/>
|
||||
<menuitem action="uom.product_uom_categ_form_action" id="menu_product_uom_categ_form_action" parent="sale.prod_config_main" sequence="8" groups="uom.group_uom" active="False"/>
|
||||
<menuitem id="menu_product_pricelist_main" name="Pricelists" parent="product_menu_catalog" action="product.product_pricelist_action2" groups="product.group_sale_pricelist" sequence="3" active="False"/>
|
||||
|
||||
<record id="view_sale_order_calendar" model="ir.ui.view">
|
||||
@@ -255,7 +255,7 @@
|
||||
<field
|
||||
context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'uom_qty_change':True, 'company_id': parent.company_id}"
|
||||
name="product_uom_qty" class="oe_inline"/>
|
||||
<field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
|
||||
<field name="product_uom" groups="uom.group_uom" class="oe_inline oe_no_button"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"/>
|
||||
</div>
|
||||
<label for="qty_delivered" string="Delivered Quantity" attrs="{'invisible': [('parent.state', 'not in', ['sale', 'done'])]}"/>
|
||||
@@ -318,7 +318,7 @@
|
||||
<field name="product_uom"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"
|
||||
context="{'company_id': parent.company_id}"
|
||||
groups="product.group_uom" options='{"no_open": True}'/>
|
||||
groups="uom.group_uom" options='{"no_open": True}'/>
|
||||
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
|
||||
<field name="price_unit"
|
||||
attrs="{'readonly': [('qty_invoiced', '>', 0)]}"/>
|
||||
@@ -335,7 +335,7 @@
|
||||
<kanban class="o_kanban_mobile">
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" groups="product.group_uom"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
<field name="price_subtotal"/>
|
||||
<field name="price_unit"/>
|
||||
<templates>
|
||||
@@ -601,7 +601,7 @@
|
||||
<field name="qty_delivered"/>
|
||||
<field name="qty_invoiced"/>
|
||||
<field name="qty_to_invoice"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="uom.group_uom"/>
|
||||
<field name="price_subtotal" sum="Total" widget="monetary"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -70,7 +70,7 @@ class TestSaleExpense(TestSale):
|
||||
'name': 'Car Travel',
|
||||
'product_id': prod_exp_2.id,
|
||||
'analytic_account_id': so.analytic_account_id.id,
|
||||
'product_uom_id': self.env.ref('product.product_uom_km').id,
|
||||
'product_uom_id': self.env.ref('uom.product_uom_km').id,
|
||||
'unit_amount': 0.15,
|
||||
'quantity': 100,
|
||||
'employee_id': employee.id,
|
||||
|
||||
@@ -11,7 +11,7 @@ class TestSaleMargin(common.TransactionCase):
|
||||
super(TestSaleMargin, self).setUp()
|
||||
self.SaleOrder = self.env['sale.order']
|
||||
|
||||
self.product_uom_id = self.ref('product.product_uom_unit')
|
||||
self.product_uom_id = self.ref('uom.product_uom_unit')
|
||||
self.product_id = self.ref('product.product_product_24')
|
||||
self.partner_id = self.ref('base.res_partner_4')
|
||||
self.partner_invoice_address_id = self.ref('base.res_partner_address_7')
|
||||
|
||||
@@ -19,8 +19,8 @@ class TestSaleMrpFlow(common.TransactionCase):
|
||||
self.InventoryLine = self.env['stock.inventory.line']
|
||||
self.ProductProduce = self.env['mrp.product.produce']
|
||||
|
||||
self.categ_unit = self.env.ref('product.product_uom_categ_unit')
|
||||
self.categ_kgm = self.env.ref('product.product_uom_categ_kgm')
|
||||
self.categ_unit = self.env.ref('uom.product_uom_categ_unit')
|
||||
self.categ_kgm = self.env.ref('uom.product_uom_categ_kgm')
|
||||
self.stock_location = self.env.ref('stock.stock_location_stock')
|
||||
self.warehouse = self.env.ref('stock.warehouse0')
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class TestSaleMrpProcurement(TransactionCase):
|
||||
pc.name = 'Mobile Products Sellable'
|
||||
product_category_allproductssellable0 = pc.save()
|
||||
|
||||
uom_unit = self.env.ref('product.product_uom_unit')
|
||||
uom_unit = self.env.ref('uom.product_uom_unit')
|
||||
|
||||
self.assertIn("seller_ids", self.env['product.template'].fields_get())
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class SaleTimesheetController(http.Controller):
|
||||
'timesheet_lines': timesheet_lines,
|
||||
'domain': domain,
|
||||
}
|
||||
hour_rounding = request.env.ref('product.product_uom_hour').rounding
|
||||
hour_rounding = request.env.ref('uom.product_uom_hour').rounding
|
||||
billable_types = ['non_billable', 'non_billable_project', 'billable_time', 'billable_fixed']
|
||||
|
||||
# -- Stat Buttons
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="order_id" ref="sale.sale_order_3"/>
|
||||
<field name="name">Advance</field>
|
||||
<field name="product_id" ref="sale.advance_product_0"/>
|
||||
<field name="product_uom" ref="product.product_uom_day"/>
|
||||
<field name="product_uom" ref="uom.product_uom_day"/>
|
||||
<field name="price_unit">150.0</field>
|
||||
<field name="product_uom_qty">5.0</field>
|
||||
</record>
|
||||
@@ -72,8 +72,8 @@
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">250.00</field>
|
||||
<field name="standard_price">190.00</field>
|
||||
<field name="uom_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="service_policy">ordered_timesheet</field>
|
||||
<field name="service_tracking">task_global_project</field>
|
||||
<field name="project_id" ref="project_support"/>
|
||||
@@ -85,8 +85,8 @@
|
||||
<field name="list_price">200.00</field>
|
||||
<field name="standard_price">150.00</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="service_policy">delivered_timesheet</field>
|
||||
<field name="service_tracking">task_new_project</field>
|
||||
</record>
|
||||
@@ -97,8 +97,8 @@
|
||||
<field name="list_price">100.00</field>
|
||||
<field name="standard_price">85.00</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_hour"/>
|
||||
<field name="uom_id" ref="uom.product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_hour"/>
|
||||
<field name="service_policy">delivered_timesheet</field>
|
||||
<field name="service_tracking">task_new_project</field>
|
||||
</record>
|
||||
@@ -109,8 +109,8 @@
|
||||
<field name="list_price">500</field>
|
||||
<field name="standard_price">420.00</field>
|
||||
<field name="type">service</field>
|
||||
<field name="uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_unit"/>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="service_policy">delivered_manual</field>
|
||||
<field name="service_tracking">no</field>
|
||||
</record>
|
||||
@@ -398,7 +398,7 @@
|
||||
<field name="date" eval="(DateTime.now() + relativedelta(days=0)).strftime('%Y-%m-%d')"/>
|
||||
<field name="amount">-300.00</field>
|
||||
<field name="product_id" ref="product.product_product_3"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="unit_amount">10.00</field>
|
||||
</record>
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
<field name="date" eval="(DateTime.now() + relativedelta(days=0)).strftime('%Y-%m-%d')"/>
|
||||
<field name="amount">-100.00</field>
|
||||
<field name="product_id" ref="product.expense_product"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="unit_amount">1.00</field>
|
||||
</record>
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
<field name="date" eval="(DateTime.now() + relativedelta(days=0)).strftime('%Y-%m-%d')"/>
|
||||
<field name="amount">-400.00</field>
|
||||
<field name="product_id" ref="product.product_product_3"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="unit_amount">15.00</field>
|
||||
</record>
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
<field name="date" eval="(DateTime.now() + relativedelta(days=0)).strftime('%Y-%m-%d')"/>
|
||||
<field name="amount">-75.00</field>
|
||||
<field name="product_id" ref="product.expense_hotel"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_day"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_day"/>
|
||||
<field name="unit_amount">1.00</field>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
@@ -35,7 +35,7 @@ class TestCommonSaleTimesheetNoChart(TestCommonSaleNoChart):
|
||||
})
|
||||
|
||||
# Create service products
|
||||
uom_hour = cls.env.ref('product.product_uom_hour')
|
||||
uom_hour = cls.env.ref('uom.product_uom_hour')
|
||||
|
||||
# -- ordered quantities (ordered, timesheet)
|
||||
cls.product_order_timesheet1 = cls.env['product.product'].create({
|
||||
|
||||
@@ -69,8 +69,8 @@ class TestSaleService(TestCommonSaleTimesheetNoChart):
|
||||
'list_price': 90,
|
||||
'type': 'service',
|
||||
'invoice_policy': 'delivery',
|
||||
'uom_id': self.env.ref('product.product_uom_hour').id,
|
||||
'uom_po_id': self.env.ref('product.product_uom_hour').id,
|
||||
'uom_id': self.env.ref('uom.product_uom_hour').id,
|
||||
'uom_po_id': self.env.ref('uom.product_uom_hour').id,
|
||||
'default_code': 'SERV-DELI',
|
||||
'service_type': 'timesheet',
|
||||
'service_tracking': 'task_global_project',
|
||||
@@ -91,7 +91,7 @@ class TestSaleService(TestCommonSaleTimesheetNoChart):
|
||||
def test_timesheet_uom(self):
|
||||
""" Test timesheet invoicing and uom conversion """
|
||||
# create SO and confirm it
|
||||
uom_days = self.env.ref('product.product_uom_day')
|
||||
uom_days = self.env.ref('uom.product_uom_day')
|
||||
sale_order_line = self.env['sale.order.line'].create({
|
||||
'order_id': self.sale_order.id,
|
||||
'name': self.product_delivery_timesheet3.name,
|
||||
|
||||
@@ -32,8 +32,8 @@ class TestSaleTimesheet(TestSale):
|
||||
'list_price': 90,
|
||||
'type': 'service',
|
||||
'invoice_policy': 'delivery',
|
||||
'uom_id': self.env.ref('product.product_uom_hour').id,
|
||||
'uom_po_id': self.env.ref('product.product_uom_hour').id,
|
||||
'uom_id': self.env.ref('uom.product_uom_hour').id,
|
||||
'uom_po_id': self.env.ref('uom.product_uom_hour').id,
|
||||
'default_code': 'SERV-DELI',
|
||||
'service_type': 'timesheet',
|
||||
'service_tracking': 'task_global_project',
|
||||
@@ -46,8 +46,8 @@ class TestSaleTimesheet(TestSale):
|
||||
'list_price': 51,
|
||||
'type': 'service',
|
||||
'invoice_policy': 'order',
|
||||
'uom_id': self.env.ref('product.product_uom_hour').id,
|
||||
'uom_po_id': self.env.ref('product.product_uom_hour').id,
|
||||
'uom_id': self.env.ref('uom.product_uom_hour').id,
|
||||
'uom_po_id': self.env.ref('uom.product_uom_hour').id,
|
||||
'default_code': 'SERV-ORDER',
|
||||
'service_type': 'timesheet',
|
||||
'service_tracking': 'task_global_project',
|
||||
|
||||
@@ -48,84 +48,84 @@
|
||||
|
||||
<record id="stock_inventory_line_1" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_24"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">16.0</field>
|
||||
<field name="location_id" ref="stock_location_14"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_14" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_25"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">16.0</field>
|
||||
<field name="location_id" ref="stock_location_14"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_15" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_5b"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">8.0</field>
|
||||
<field name="location_id" ref="stock_location_14"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_2" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_7"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">18.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_3" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_6"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">500.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_4" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_9"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">22.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_5" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_10"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">8.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_6" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_11"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">26.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_9" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_17"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">39.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_11" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_12"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">10.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_12" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_13"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">2.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
</record>
|
||||
<record id="stock_inventory_line_13" model="stock.inventory.line">
|
||||
<field name="product_id" ref="product.product_product_27"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="inventory_id" ref="stock_inventory_0"/>
|
||||
<field name="product_qty">80.0</field>
|
||||
<field name="location_id" ref="stock_location_components"/>
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
<field name="lst_price">100.0</field>
|
||||
<field name="standard_price">70.0</field>
|
||||
<field name="weight">1.0</field>
|
||||
<field name="uom_id" ref="product.product_uom_kgm"/>
|
||||
<field name="uom_po_id" ref="product.product_uom_kgm"/>
|
||||
<field name="uom_id" ref="uom.product_uom_kgm"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_kgm"/>
|
||||
<field name="property_stock_inventory" ref="stock.location_inventory"/>
|
||||
<field name="description">
|
||||
Ice cream can be mass-produced and thus is widely available in developed parts
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<record id="stock_inventory_line_icecream_lot0" model="stock.inventory.line">
|
||||
<field name="product_id" ref="stock.product_icecream"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_kgm"/>
|
||||
<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"/>
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
<record id="stock_inventory_line_icecream_lot1" model="stock.inventory.line">
|
||||
<field name="product_id" ref="stock.product_icecream"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_kgm"/>
|
||||
<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"/>
|
||||
@@ -102,7 +102,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_27').name,
|
||||
'product_id': ref('product.product_product_27'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 15.0,
|
||||
'picking_type_id': ref('stock.picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_stock'),
|
||||
@@ -120,7 +120,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_6').name,
|
||||
'product_id': ref('product.product_product_6'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 180.0,
|
||||
'picking_type_id': ref('stock.picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_stock'),
|
||||
@@ -128,7 +128,7 @@
|
||||
'move_line_ids': [(0, 0, {
|
||||
'product_id': ref('product.product_product_6'),
|
||||
'qty_done': 100,
|
||||
'product_uom_id': ref('product.product_uom_unit'),
|
||||
'product_uom_id': ref('uom.product_uom_unit'),
|
||||
'location_id': ref('stock.stock_location_stock'),
|
||||
'location_dest_id': ref('stock.stock_location_customers'),
|
||||
})],
|
||||
@@ -145,7 +145,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_delivery_02').name,
|
||||
'product_id': ref('product.product_delivery_02'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 45.0,
|
||||
'picking_type_id': ref('stock.picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_stock'),
|
||||
@@ -162,7 +162,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_5').name,
|
||||
'product_id': ref('product.product_product_5'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 75.0,
|
||||
'picking_type_id': ref('stock.picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_stock'),
|
||||
@@ -178,7 +178,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('stock.product_icecream').name,
|
||||
'product_id': ref('stock.product_icecream'),
|
||||
'product_uom': ref('product.product_uom_kgm'),
|
||||
'product_uom': ref('uom.product_uom_kgm'),
|
||||
'product_uom_qty': 50.0,
|
||||
'picking_type_id': ref('stock.picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -194,7 +194,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_delivery_01').name,
|
||||
'product_id': ref('product.product_delivery_01'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 35.0,
|
||||
'picking_type_id': ref('stock.picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -210,7 +210,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_22').name,
|
||||
'product_id': ref('product.product_product_22'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 125.0,
|
||||
'picking_type_id': ref('stock.picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -226,7 +226,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_10').name,
|
||||
'product_id': ref('product.product_product_10'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 120.0,
|
||||
'picking_type_id': ref('stock.picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -242,7 +242,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_delivery_02').name,
|
||||
'product_id': ref('product.product_delivery_02'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 50.0,
|
||||
'picking_type_id': ref('stock.picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -260,7 +260,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_9').name,
|
||||
'product_id': ref('product.product_product_9'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 25.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -276,7 +276,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_delivery_01').name,
|
||||
'product_id': ref('product.product_delivery_01'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 180.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -284,7 +284,7 @@
|
||||
'move_line_ids': [(0, 0, {
|
||||
'product_id': ref('product.product_delivery_01'),
|
||||
'qty_done': 100,
|
||||
'product_uom_id': ref('product.product_uom_unit'),
|
||||
'product_uom_id': ref('uom.product_uom_unit'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
'location_dest_id': ref('stock.stock_location_shop0'),
|
||||
})],
|
||||
@@ -299,7 +299,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_delivery_01').name,
|
||||
'product_id': ref('product.product_delivery_01'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 45.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -317,7 +317,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_22').name,
|
||||
'product_id': ref('product.product_product_22'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 75.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_in'),
|
||||
'location_id': ref('stock.stock_location_suppliers'),
|
||||
@@ -336,7 +336,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_27').name,
|
||||
'product_id': ref('product.product_product_27'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 15.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_shop0'),
|
||||
@@ -354,7 +354,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_6').name,
|
||||
'product_id': ref('product.product_product_6'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 180.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_shop0'),
|
||||
@@ -362,7 +362,7 @@
|
||||
'move_line_ids': [(0, 0, {
|
||||
'product_id': ref('product.product_product_6'),
|
||||
'qty_done': 100,
|
||||
'product_uom_id': ref('product.product_uom_unit'),
|
||||
'product_uom_id': ref('uom.product_uom_unit'),
|
||||
'location_id': ref('stock.stock_location_shop0'),
|
||||
'location_dest_id': ref('stock.stock_location_customers'),
|
||||
})],
|
||||
@@ -379,7 +379,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_delivery_02').name,
|
||||
'product_id': ref('product.product_delivery_02'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 45.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_shop0'),
|
||||
@@ -396,7 +396,7 @@
|
||||
<field name="move_lines" model="stock.move" eval="[(0, 0, {
|
||||
'name': obj().env.ref('product.product_product_5').name,
|
||||
'product_id': ref('product.product_product_5'),
|
||||
'product_uom': ref('product.product_uom_unit'),
|
||||
'product_uom': ref('uom.product_uom_unit'),
|
||||
'product_uom_qty': 75.0,
|
||||
'picking_type_id': ref('stock.chi_picking_type_out'),
|
||||
'location_id': ref('stock.stock_location_shop0'),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<record id="stock_warehouse_orderpoint_shop1_cpu1" model="stock.warehouse.orderpoint">
|
||||
<field name="product_max_qty">20.0</field>
|
||||
<field name="product_min_qty">10.0</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="company_id" ref="stock.res_company_1"/>
|
||||
<field name="warehouse_id" ref="stock.stock_warehouse_shop0"/>
|
||||
<field name="location_id" ref="stock.stock_location_shop0"/>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<record id="stock_warehouse_orderpoint_1" model="stock.warehouse.orderpoint">
|
||||
<field name="product_max_qty">10.0</field>
|
||||
<field name="product_min_qty">5.0</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
|
||||
<field name="product_id" ref="product.product_delivery_02"/>
|
||||
<field name="location_id" model="stock.location"
|
||||
@@ -15,7 +15,7 @@
|
||||
<record id="stock_warehouse_orderpoint_2" model="stock.warehouse.orderpoint">
|
||||
<field name="product_max_qty">12.0</field>
|
||||
<field name="product_min_qty">5.0</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
|
||||
<field name="product_id" ref="product.product_product_20"/>
|
||||
<field name="location_id" model="stock.location"
|
||||
@@ -24,7 +24,7 @@
|
||||
<record id="stock_warehouse_orderpoint_5" model="stock.warehouse.orderpoint">
|
||||
<field name="product_max_qty">5.0</field>
|
||||
<field name="product_min_qty">3.0</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field model="stock.warehouse" name="warehouse_id" search="[]"/>
|
||||
<field name="product_id" ref="product.product_delivery_01"/>
|
||||
<field name="location_id" model="stock.location"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</record>
|
||||
<record id="test_quant_quant" model="stock.quant">
|
||||
<field name="product_id" ref="stock.test_quant_product"/>
|
||||
<field name="product_uom_id" ref="product.product_uom_unit"/>
|
||||
<field name="product_uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="location_id" ref="stock_location_stock"/>
|
||||
<field name="quantity">10.0</field>
|
||||
</record>
|
||||
|
||||
@@ -303,7 +303,7 @@ class InventoryLine(models.Model):
|
||||
product_uom_id = fields.Many2one(
|
||||
'product.uom', 'Product Unit of Measure',
|
||||
required=True,
|
||||
default=lambda self: self.env.ref('product.product_uom_unit', raise_if_not_found=True))
|
||||
default=lambda self: self.env.ref('uom.product_uom_unit', raise_if_not_found=True))
|
||||
product_qty = fields.Float(
|
||||
'Checked Quantity',
|
||||
digits=dp.get_precision('Product Unit of Measure'), default=0)
|
||||
|
||||
@@ -302,7 +302,7 @@ class StockMove(models.Model):
|
||||
total_available = move.product_id.uom_id._compute_quantity(total_available, move.product_uom, round=False)
|
||||
total_available = float_round(total_available, precision_digits=precision)
|
||||
info = str(total_available)
|
||||
if self.user_has_groups('product.group_uom'):
|
||||
if self.user_has_groups('uom.group_uom'):
|
||||
info += ' ' + move.product_uom.name
|
||||
if move.reserved_availability:
|
||||
if move.reserved_availability != total_available:
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.quantity"/>
|
||||
<span groups="product.group_uom" t-field="l.product_id.uom_id.name"/>
|
||||
<span groups="uom.group_uom" t-field="l.product_id.uom_id.name"/>
|
||||
</td>
|
||||
<td>
|
||||
<t t-if="l.lot_id"><span t-field="l.lot_id.name"/></t>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<td><span t-field="line.product_id"/></td>
|
||||
<td groups="stock.group_production_lot"><span t-field="line.prod_lot_id"/></td>
|
||||
<td groups="stock.group_tracking_lot"><span t-field="line.package_id"/></td>
|
||||
<td class="text-right"><span t-field="line.product_qty"/> <span t-field="line.product_uom_id" groups="product.group_uom"/></td>
|
||||
<td class="text-right"><span t-field="line.product_qty"/> <span t-field="line.product_uom_id" groups="uom.group_uom"/></td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<td>
|
||||
<span t-if="move.product_qty" t-esc="move.product_qty"/>
|
||||
<span t-if="not move.product_qty" t-esc="move.product_uom._compute_quantity(move.quantity_done, move.product_id.uom_id, rounding_method='HALF-UP')"/>
|
||||
<span t-field="move.product_id.uom_id" groups="product.group_uom"/>
|
||||
<span t-field="move.product_id.uom_id" groups="uom.group_uom"/>
|
||||
</td>
|
||||
<td>
|
||||
<t t-if="has_barcode">
|
||||
|
||||
@@ -26,8 +26,8 @@ access_stock_inventory_line_manager,stock.inventory.line manager,model_stock_inv
|
||||
access_stock_location_stock_manager,stock.location stock manager,model_stock_location,stock.group_stock_manager,1,0,0,0
|
||||
access_product_product_stock_user,product_product_stock_user,product.model_product_product,stock.group_stock_user,1,0,0,0
|
||||
access_product_template_stock_user,product.template stock user,product.model_product_template,stock.group_stock_user,1,0,0,0
|
||||
access_product_uom_categ_stock_manager,product.uom.categ stock_manager,product.model_product_uom_categ,stock.group_stock_manager,1,1,1,1
|
||||
access_product_uom_stock_manager,product.uom stock_manager,product.model_product_uom,stock.group_stock_manager,1,1,1,1
|
||||
access_product_uom_categ_stock_manager,product.uom.categ stock_manager,uom.model_product_uom_categ,stock.group_stock_manager,1,1,1,1
|
||||
access_product_uom_stock_manager,product.uom stock_manager,uom.model_product_uom,stock.group_stock_manager,1,1,1,1
|
||||
access_product_category_stock_manager,product.category stock_manager,product.model_product_category,stock.group_stock_manager,1,1,1,1
|
||||
access_product_template_stock_manager,product.template stock_manager,product.model_product_template,stock.group_stock_manager,1,1,1,1
|
||||
access_product_product_stock_manager,product.product stock_manager,product.model_product_product,stock.group_stock_manager,1,1,1,1
|
||||
|
||||
|
@@ -30,8 +30,8 @@ class TestStockCommon(common.TransactionCase):
|
||||
self.pack_location = self.ModelDataObj.xmlid_to_res_id('stock.location_pack_zone')
|
||||
self.output_location = self.ModelDataObj.xmlid_to_res_id('stock.stock_location_output')
|
||||
self.customer_location = self.ModelDataObj.xmlid_to_res_id('stock.stock_location_customers')
|
||||
self.categ_unit = self.ModelDataObj.xmlid_to_res_id('product.product_uom_categ_unit')
|
||||
self.categ_kgm = self.ModelDataObj.xmlid_to_res_id('product.product_uom_categ_kgm')
|
||||
self.categ_unit = self.ModelDataObj.xmlid_to_res_id('uom.product_uom_categ_unit')
|
||||
self.categ_kgm = self.ModelDataObj.xmlid_to_res_id('uom.product_uom_categ_kgm')
|
||||
|
||||
# Product Created A, B, C, D
|
||||
self.productA = self.ProductObj.create({'name': 'Product A', 'type': 'product'})
|
||||
|
||||
@@ -11,7 +11,7 @@ class TestInventory(TransactionCase):
|
||||
self.pack_location = self.env.ref('stock.location_pack_zone')
|
||||
self.pack_location.active = True
|
||||
self.customer_location = self.env.ref('stock.stock_location_customers')
|
||||
self.uom_unit = self.env.ref('product.product_uom_unit')
|
||||
self.uom_unit = self.env.ref('uom.product_uom_unit')
|
||||
self.product1 = self.env['product.product'].create({
|
||||
'name': 'Product A',
|
||||
'type': 'product',
|
||||
|
||||
@@ -16,8 +16,8 @@ class StockMove(TransactionCase):
|
||||
('company_id', '=', self.env.user.company_id.id),
|
||||
('usage', '=', 'transit'),
|
||||
], limit=1)
|
||||
self.uom_unit = self.env.ref('product.product_uom_unit')
|
||||
self.uom_dozen = self.env.ref('product.product_uom_dozen')
|
||||
self.uom_unit = self.env.ref('uom.product_uom_unit')
|
||||
self.uom_dozen = self.env.ref('uom.product_uom_dozen')
|
||||
self.product1 = self.env['product.product'].create({
|
||||
'name': 'Product A',
|
||||
'type': 'product',
|
||||
|
||||
@@ -1782,7 +1782,7 @@ class TestRoutes(TransactionCase):
|
||||
'type': 'product',
|
||||
'categ_id': self.env.ref('product.product_category_all').id,
|
||||
})
|
||||
uom_unit = self.env.ref('product.product_uom_unit')
|
||||
uom_unit = self.env.ref('uom.product_uom_unit')
|
||||
wh = self.env['stock.warehouse'].search([('company_id', '=', self.env.user.id)], limit=1)
|
||||
|
||||
# create and get back the pick ship route
|
||||
@@ -1852,7 +1852,7 @@ class TestRoutes(TransactionCase):
|
||||
'type': 'product',
|
||||
'categ_id': self.env.ref('product.product_category_all').id,
|
||||
})
|
||||
uom_unit = self.env.ref('product.product_uom_unit')
|
||||
uom_unit = self.env.ref('uom.product_uom_unit')
|
||||
stock_location = self.env.ref('stock.stock_location_stock')
|
||||
wh = self.env['stock.warehouse'].search([('company_id', '=', self.env.user.id)], limit=1)
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ class TestPacking(TransactionCase):
|
||||
'name': self.ref('base.res_partner_2'),
|
||||
'min_qty': 2.0,
|
||||
})],
|
||||
'uom_id': self.ref('product.product_uom_unit'),
|
||||
'uom_po_id': self.ref('product.product_uom_unit'),
|
||||
'uom_id': self.ref('uom.product_uom_unit'),
|
||||
'uom_po_id': self.ref('uom.product_uom_unit'),
|
||||
})
|
||||
|
||||
# Create an incoming picking for this product of 300 PCE from suppliers to stock
|
||||
@@ -64,7 +64,7 @@ class TestPacking(TransactionCase):
|
||||
pick1.move_line_ids[0].write({'result_package_id': package1.id, 'qty_done': 120})
|
||||
new_pack1 = self.env['stock.move.line'].create({
|
||||
'product_id': product1.id,
|
||||
'product_uom_id': self.ref('product.product_uom_unit'),
|
||||
'product_uom_id': self.ref('uom.product_uom_unit'),
|
||||
'picking_id': pick1.id,
|
||||
'lot_id': lot_a.id,
|
||||
'qty_done': 120.0,
|
||||
@@ -74,7 +74,7 @@ class TestPacking(TransactionCase):
|
||||
})
|
||||
new_pack2 = self.env['stock.move.line'].create({
|
||||
'product_id': product1.id,
|
||||
'product_uom_id': self.ref('product.product_uom_unit'),
|
||||
'product_uom_id': self.ref('uom.product_uom_unit'),
|
||||
'picking_id': pick1.id,
|
||||
'result_package_id': package3.id,
|
||||
'qty_done': 60.0,
|
||||
|
||||
@@ -19,8 +19,8 @@ class TestPackingNeg(TransactionCase):
|
||||
'delay': 1,
|
||||
'name': self.ref('base.res_partner_2'),
|
||||
'min_qty': 2.0,})],
|
||||
'uom_id': self.ref('product.product_uom_unit'),
|
||||
'uom_po_id': self.ref('product.product_uom_unit'),
|
||||
'uom_id': self.ref('uom.product_uom_unit'),
|
||||
'uom_po_id': self.ref('uom.product_uom_unit'),
|
||||
})
|
||||
|
||||
# Create an incoming picking for this product of 300 PCE from suppliers to stock
|
||||
@@ -58,7 +58,7 @@ class TestPackingNeg(TransactionCase):
|
||||
pick_neg.move_line_ids[0].write({'result_package_id': package1.id, 'qty_done': 120})
|
||||
new_pack1 = self.env['stock.move.line'].create({
|
||||
'product_id': product_neg.id,
|
||||
'product_uom_id': self.ref('product.product_uom_unit'),
|
||||
'product_uom_id': self.ref('uom.product_uom_unit'),
|
||||
'picking_id': pick_neg.id,
|
||||
'lot_id': lot_a.id,
|
||||
'qty_done': 120,
|
||||
@@ -68,7 +68,7 @@ class TestPackingNeg(TransactionCase):
|
||||
})
|
||||
new_pack2 = self.env['stock.move.line'].create({
|
||||
'product_id': product_neg.id,
|
||||
'product_uom_id': self.ref('product.product_uom_unit'),
|
||||
'product_uom_id': self.ref('uom.product_uom_unit'),
|
||||
'picking_id': pick_neg.id,
|
||||
'result_package_id': package3.id,
|
||||
'qty_done': 60,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user