-
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[14.0][MIG] product_analytic_purchase: Migration to 14.0
- Loading branch information
1 parent
2d01f1b
commit 8d792bc
Showing
5 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,46 @@ | ||
# © 2015 Antiun Ingenieria - Javier Iniesta | ||
# © 2017 Tecnativa - Luis Martínez | ||
# © 2017 Akretion (Alexis de Lattre <[email protected]>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
# License lGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). | ||
|
||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestPurchaseOrderLine(TransactionCase): | ||
def setUp(self): | ||
super(TestPurchaseOrderLine, self).setUp() | ||
self.product1 = self.env.ref("product.product_product_3") | ||
self.product2 = self.env.ref("product.service_order_01") | ||
self.analytic = self.env["account.analytic.account"].create( | ||
{ | ||
"name": "Our Super Product Development", | ||
} | ||
) | ||
self.product1 = self.env["product.product"].create( | ||
{ | ||
"name": "Computer SC234", | ||
"categ_id": self.env.ref("product.product_category_all").id, | ||
"list_price": 450.0, | ||
"standard_price": 300.0, | ||
"type": "consu", | ||
"uom_id": self.env.ref("uom.product_uom_unit").id, | ||
"uom_po_id": self.env.ref("uom.product_uom_unit").id, | ||
"description_sale": "17 LCD Monitor Processor AMD", | ||
} | ||
) | ||
self.product2 = self.env["product.product"].create( | ||
{ | ||
"name": "Prepaid Consulting", | ||
"categ_id": self.env.ref("product.product_category_all").id, | ||
"list_price": 90, | ||
"standard_price": 40, | ||
"type": "service", | ||
"uom_id": self.env.ref("uom.product_uom_hour").id, | ||
"uom_po_id": self.env.ref("uom.product_uom_hour").id, | ||
"description": "Example of product to invoice on order.", | ||
"default_code": "SERV_ORDER", | ||
"expense_analytic_account_id": self.analytic.id, | ||
"income_analytic_account_id": self.analytic.id, | ||
} | ||
) | ||
self.assertTrue(self.product2.expense_analytic_account_id) | ||
self.po = self.env["purchase.order"].create( | ||
{ | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.