Friday, January 10, 2020
3 changes · master
Resolved issues and error corrections
This change prevents a sales timesheet test from failing unpredictably when other installed modules add currency exchange rates. It keeps the test focused on timesheet invoicing amounts, improving reliability for future updates without changing customer-facing behavior.
Original PR description
The method 'test_timesheet_delivery' tests the following use case: Test timesheet invoicing with 'invoice on delivery' timetracked products 1. Create SO and confirm it 2. log timesheet 3. create…
The method 'test_timesheet_delivery' tests the following use case:
Test timesheet invoicing with 'invoice on delivery' timetracked products
1. Create SO and confirm it
2. log timesheet
3. create invoice
4. log other timesheet
5. create a second invoice
6. add new SO line (delivered service)
7. And finally check the AMOUNTS
But it could happen, according to the installed modules, that the class
TestSaleTimesheet, which is directly linked to
-> TestCommonSaleTimesheetNoChart (sale_timesheet)
--> TestCommonSaleNoChart (sale)
---> AccountTestNoChartCommon (account)
----> SavepointCaseWithUserDemo (base)
-----> SavepointCase (base)
is influenced by other installed modules, that in our case, introduce
new res.currency.rate values.
In our test, on the sale.order.line 'so_line_ordered_global_project',
we use the product 'product_order_timesheet2', with a price_unit=90.
Then we call manually the onchange method:
``` python3
so_line_ordered_global_project.product_id_change()
```
As the order has a pricelist and a partner, we recompute the price
unit, in case a discount applies:
``` python3
if self.order_id.pricelist_id and self.order_id.partner_id:
vals['price_unit'] = self.env['account.tax']._fix_tax_included_price_company(self._get_display_price(product), product.taxes_id, self.tax_id, self.company_id)
self.update(vals)
```
And then , the call the _get_display_price returns an different amount
that what we expect, as
``` python3
product.with_context(pricelist=self.order_id.pricelist_id.id).price
```
will return the price converted using the related res.currency.rate
at the current date.
As we don't wish to test the conversion into another currency in this
test, we simply unlink all the currency rates, to avoid any external
influence.
TaskID: 2166237This change removes an older web interface adjustment because a better fix is now handled elsewhere. It helps keep the menu behavior consistent without keeping unnecessary code in the main web module.
Original PR description
This commit reverts a previous fix because we found a better one in enterprise. So we don't need this line anymore. opw-2071605 Task ID: 2152160 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The trial balance comparison header now shows periods in the correct order. This prevents confusion when reviewing financial comparisons and helps users interpret report columns accurately.
Original PR description
Periods were reverted in the trial balance table header when comparing