Skip to content

Commit

Permalink
[14.0][MIG] product_analytic_purchase: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Reyes4711-S73 committed May 14, 2021
1 parent fe99818 commit 685a73a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
6 changes: 3 additions & 3 deletions product_analytic_purchase/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2017 Akretion (http://www.akretion.com/) - Alexis de Lattre
# 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).

{
"name": "Product Analytic Purchase",
"version": "10.0.1.0.0",
"version": "14.0.1.0.0",
"category": "Purchases",
"license": "AGPL-3",
"license": "LGPL-3",
"summary": "Glue module between purchase and product_analytic",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
Expand Down
2 changes: 1 addition & 1 deletion product_analytic_purchase/models/purchase_order_line.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2017 Akretion (http://www.akretion.com/) - Alexis de Lattre
# 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 import api, models

Expand Down
36 changes: 33 additions & 3 deletions product_analytic_purchase/tests/test_purchase.py
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(
{
Expand Down
1 change: 0 additions & 1 deletion setup/product_analytic_purchase/odoo/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion setup/product_analytic_purchase/odoo/addons/__init__.py

This file was deleted.

0 comments on commit 685a73a

Please sign in to comment.