The field `quantity_available` can be computed in two different ways:
- equal to `product_uom_qty`
- equal to `reserved_availability`
However, `product_uom_qty` is in the UoM of the move, while
`reserved_availability` is in the UoM of the product.
We convert into the UoM of the move, because `quantity_available` is
supposed to be in the same UoM than `product_uom_qty` ("To Consume").
opw-704775
Some things in the ecommerce have z-index 1, 4 (product images) or 5. So
this went over the live chat button "Have a question? Chat with us."
opw-707086
When validating a multiple choice with comments allowed,
the comment was popped from answer_candidates and then
the condition to prevent answers with blank value always
triggered an error.
opw:707072
Steps to reproduce:
Go to any pivot view (for example Sales > Report > Sales) and add
the current view to your personnal dashboard (in the search view: Favourites > Add to my Dashboard)
Go to the dashboard, traceback because $buttons was not defined.
opw:707296
When opening a purchase order shipments using
the given smart button, and attempting a refresh,
it leaded to a "record has been deleted" error,
because the current `active_id` is a purchase.order
id, while the `active_id` in the window action
`action_picking_tree` context expects a picking type
id.
The purpose of using `action_picking_tree` was to use
it as a template instead of having to create a full action
dict, not to actually use it.
By removing the id from the action dict, we prevent
to re-use the action window `action_picking_tree`
on refresh.
opw-706933
Before this patch, it was not possible to manually process a pack (i.e.
checking the "is_done" box), because the field was always reset
*before* saving. It was still possible to process it by hitting
"validate", but it was not possible to put a pack in a pack.
Manually process a pack means hitting the checkbox "is_done" on the pack
operation. This "is_done" field is a boolean computed field with a reverse
function, and this reverse function set the "qty_done" on the pack
operation to 1.0.
The compute field doesn't have any depends declared, so the value was
invalidated after any changes in the form view. The computed method was
used to check the checkbox is the "qty_done" is set to 1.0. It was
probably used to check the checkbox when opening later a picking for
which the pack was already processed.
The issue is that the "qty_done" was never updated, because the inverse
method is only called when saving, and the compute method already reset
the "is_done" field to False, as the "qty_done" was not updated.
To fix this issue, we do not use an inverse method but an onchange.
Indeed, this was the expected behavior: hitting the checkbox should
change the "qty_done".
We already have a test covering this use case, committed in v9 [1]. It
didn't discovered this regression because the test was using directly
the "qty_done" field on the pack operation, not the "is_done" field used
in the view. We change the test to use the "is_done" field and manually
trigger the onchanges.
This is due to a bad new API migration [2].
[1] rev e248420348
[2] rev d8548e0771
- Buy only a free product with digital download content
- It is not possible to access the download link
Since the product is free, there is no invoice created. Therefore, the
product is never considered as paid.
opw-705258
The account move line filter 'Unreconciled' only takes into account the
matching number. We should also make sure the 'reconciled' boolean is
false, since a line with a zero amount (e.g. invoice with only a free
item) is considered as reconciled and should not appear in the list.
opw-705982
One can add an item in a Many2Many without creating it, so the action
should be available. However, if the create action is not allowed, there
is no 'Create' button in the SelectCreateDialog.
The xml file with the cron that creates the recurrent
preventive requests was not loaded in the system, so we needed to add
it.
Before, the cron was foreseen to only create the maintenance request on
the day that the request was foreseen (in the morning). Now, it will
create a request if none exists on the next_action_date. That way the
requests can be planned for.
The other problem is that the '_compute_next_maintenance' method
for calculating the next_action_date does not take into account
the possibly manually already created requests. So, now, the next
maintenance is calculated with the closed requests and the open ones.
If the first new one is in the past, it takes that date in the past. If it is in
the future, it will see if the gap is big enough to put a maintenance
in between the last done maintenance (or now) and the first new one.
If none exists, it is today + period.
That's why we have to add the 'request_date' in the depends. And take
into account the preventive requests existing on an equipment.
Since commits 2a8a17024d and 9c68bc7482,
the session is not started by the webclient anymore but directly by the
session service instead, and the session info is found in the DOM
instead of by RPC.
Because of that, the session is started in the frontend and other
non-backend environments which caused a JS error while trying to
load qweb (as no qweb has to be loaded). This commit makes the
session start check if it is a non-backend environment and only
initialize session info (from DOM) in that case.
The product.template displays the list of pricelist items with the name of the pricelist
The product.product displays the same information except the pricelist name.
This commit harmonize both views to display the same information.
Fixes#15009Closes#15010
In debug mode the buttons "export unpaid orders" and "export paid orders" now
work. On first click, they prepare the file and display the download link. On
second click, the file is downloaded.
The error popup uses the same method to download the traceback.
Use a different icon to have a visual feedback why that 2 clicks are needed.
This 2 steps is required as it is not possible in most browsers to simulate a
click event on a link.
The download method is kept for backward compatibility but will be droped in
master.
In the next version, a proper popup will be integrated (cf #14365)
Closes#15322
When setting a report with a `report_name` without dots,
the associated views button raised an exception.
This has been introduced during the migration to the new API
at revision 47c67b640b
Before, a try/except made sure the exception to not raise
the exception in case the report name could not be split
in two parts.
In this revision, instead of doing the try/except,
we check if the result of the split has a minimum
length of 2.
opw-706343
Following commit 1a1efe3fce, the module has some troubles to work
correctly. For example, it's impossible to get the download link in the
frontend of an attachment when the product was bought and paid.
Not really a big deal, but just in case the client wants to download
what he bought, we add back the link in the eCommerce.
A more complete fix will land later in master branch.
opw-705725
On the CRM dashboard, the shortcut 'exp. closing' is the same than the
'overdue' shortcut. However, the number of opportunities in these
categories is computed differently (see method
`retrieve_sales_dashboard`).
We introduce a new filter "Overdue Opportunities" which reflects this
difference.
opw-704173
The `log` method of a server action uses the same cursor than the
transaction. Therefore, if an error is raised during the server action
execution, the log messages are lost since the transaction is rolled
back.
We introduce a new cursor in the `log` method, so the log messages are
kept even when an exception is raised.
opw-704036
With how the chat manager was currently started, the "Odoo Session
Expired" could cause an arcane js error which would overshadow it.
This is caused by doing an RPC request too soon which invalidate the
session too soon which disable web client `show_application`.
With this commit, we have the error message "Odoo Session Expired"
instead of:
"Uncaught TypeError: Cannot read property '$el' of undefined"
closes#15313
opw-706346
This record rule added in the below revision:
1950fc4216
has been removed for an unknown reason during the account refactoring
c04065abd8
Without this rule, a user can see invoices from other companies
through the invoices analysis.
opw-705718
The search on qty_available was refactored twice:
- b9853db8 to split the method
- a989680b to remove the eval operator
At b9853db8 the order of evaluation introduced a bug so that the domain
('qty_available', '=' 10.0)
was evaluated
if product[qty_available] = 10.0:
which crashed (`=` instead of `==`).
Before b9853db8, this code did not crash as the operator was converted via
if operator == '=':
operator = '=='
which is no longer executed after the split
a989680b replaced the eval by a dictionnary that replaced the eval error by a
KeyError when searching with `=` operator.
This commit changes several things:
- replace the `operator in ('==', '>=', '<=')` as this was evaluated before the
operator replacement code mentionned above
- remove the replacement code as no longer justified since a989680b
- replace the OPERATOR key `==` to always match given key
This is related to revision
52db42d3df
The total sent to the `compute` method is always
within the invoice company currency, not
in the invoice currency.
`total` comes from the first tuple result
of the method `compute_invoice_totals`,
which is always in the invoice company currency.
if the company currency is different than
the invoice currency,
the total is the sum of the `line['price']`
converted to the company currency, as stated
by
`line['price'] = currency.compute(line['price'], company_currency)`
and
`total += line['price']`
In the above revision, the possibility to pass
its own currency in the context is added. This is in case
the payment term used comes from another company
than the one of the invoice (see the commit message of the revision).
The mistake was to use the invoice currency, while it should
use the invoice company currency, as the `total` amount is
within the invoice company currency, not the invoice currency.
opw-705604
A byproduct is a produced when producing another product (the targetted
product).
A move can be linked to another move. eg: we could have a manufacturing
order of 3 units linked to a move of a delivery order of these 3 units.
If we produce 2 units, the manufacturing order is split in 2 units and
1 units, and the delivery order is split similarily because of the link
1. [T manufacturing move split] -> [T delivery move split]
(T is the targetted product, B is the byproduct)
But in 8c307d7b1 a move_dest_id of a byproduct was linked to the targetted
product delivery move, thus in some situation the move of the delivery
order of the byproduct would erroneously be split 2 times instead of one.
1. [B manufacturing move split] -> [T delivery move split]
2. [T manufacturing move split] -> [T delivery move split]
This could also be the source of other issue, and since the byproduct
and targetted product are different, the link should anyway not be done.
opw-697151
note: this change is already in 10.0 (it is inside mrp refactoring 2ddc35a53)
The field 'Type' should always be readonly since:
- it must not be changed for standard models
- its value must be 'Custom Object' for a custom model
opw-706130
The field 'Type' should always be readonly since:
- it must not be changed for standard models
- its value must be 'Custom Object' for a custom model
opw-706130