-
-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[15.0][FIX] account_invoice_pricelist: Adapted Tests for changes made in Sale module. #1457
[15.0][FIX] account_invoice_pricelist: Adapted Tests for changes made in Sale module. #1457
Conversation
ff6dcde
to
b700f23
Compare
There are another error in the tests but in sale_timesheet_invoice_description module, LOG https://github.com/OCA/account-invoicing/actions/runs/4948966918/jobs/8850424002?pr=1457#step:8:477 2023-05-11 14:27:14,545 254 ERROR odoo odoo.addons.sale_timesheet_invoice_description.tests.test_sale_timesheet_description: FAIL: TestSaleTimesheetDescription.test_three_timesheets_same_date_split I'm trying understand the problem, it's seems a rounding error, but I'm not sure if it can be ignored and we should just change the value for 1.29, any idea to solve will be appreciated. |
b700f23
to
936a3ce
Compare
936a3ce
to
714cdd3
Compare
Unnecessary get the Default Values to the creation of Product Template in the tests. The problem in sale_timesheet_invoice_description was solved in #1458 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good one @mbcosta !
really the _get_real_price_currency method that is checked by the hash was in the sale/models/sale.py file in v14 https://github.com/odoo/odoo/blob/14.0/addons/sale/models/sale.py#LL1831C1-L1874C74 and in the sale/models/sale_line.py file in v15 https://github.com/odoo/odoo/blob/15.0/addons/sale/models/sale_order_line.py#LL742C1-L785C74 But I checked there is no real difference just an unused variable price that is changed to _price in v15 to avoid a flake8 unused variable error, more specifically: in v14:
vs in v15:
as this is a very trivial test adjust, I take the liberty for fast tracking. |
/ocabot merge patch |
On my way to merge this fine PR! |
@rvalyi The merge process could not be finalized, because command
|
Congratulations, your PR was merged at f4b4644. Thanks a lot for contributing to OCA. ❤️ |
Adapted Tests for changes made in Sale module, this problem generate error in others PRs example #1452 the LOG https://github.com/OCA/account-invoicing/actions/runs/4942212532/jobs/8835537437?pr=1452#step:8:137
2023-05-10 23:27:32,617 255 ERROR odoo odoo.tests.loader: Can not
import account_invoice_pricelist
.Traceback (most recent call last):
File "/opt/odoo/odoo/tests/loader.py", line 33, in _get_tests_modules
mod = importlib.import_module('.tests', modpath)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/__w/account-invoicing/account-invoicing/account_invoice_pricelist/tests/init.py", line 3, in
from . import test_account_move_pricelist
File "/__w/account-invoicing/account-invoicing/account_invoice_pricelist/tests/test_account_move_pricelist.py", line 9, in
from odoo.addons.sale.models.sale import SaleOrderLine as upstream
By solving this first problem another appear
ERROR odoo odoo.sql_db: bad query: INSERT INTO "product_template" ("id", "active", "categ_id", "
create_date", "create_uid", "detailed_type", "list_price", "name", "priority", "purchase_ok", "s
ale_delay", "sale_ok", "sequence", "tracking", "uom_id", "uom_po_id", "write_date", "write_uid")
VALUES (nextval('product_template_id_seq'), true, 1, '2023-05-11 01:16:13.968840', 1, 'consu',
'100.00', 'Product Test', '0', true, 0.0, true, 1, 'none', 1, 1, '2023-05-11 01:16:13.968840', 1
) RETURNING id
ERROR: null value in column "purchase_line_warn" of relation "product_template" violates not-nul
l constraint
To solve I just get the Default Values of the object.
cc @rvalyi @renatonlima