After setting the image on a product variant, the controller for `/web/image`
incorrectly returns the code 304 - Not Modified. This bug occurs because
1. the response ETag is a hash of the **last modified date** of the record;
2. the record is actually **not** updated in that case, because
- the image field is a non-stored computed field, and
- its inverse method only modifies the variant's template.
Fix the issue by making the response ETag a hash of the **content**, which is
read by the controller anyway.
OPW 769302
Fine tuning of c477f0764e
When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.
This did not work when you based your discount on the standard_price
(= cost price) with public price discount.
Now it does.
opw:775275
This is a hotfix/hack for a conflict between website_quote and
website_sale, on the field website_description.
The conflict happens when both modules are installed.
Fixes#20118
Steps to reproduce the bug:
- In Sales settings, set "Tax display" as "Show line subtotals without taxes"
- Create an article A with a customer tax set as price-inclusive.
- associate on an other article B the pricelist P with a discount_policy
set as "without_discount"
- Ensure that the pricelist P is used in the shop.
-Go to the shop
Bug: The article A is considered as discounted but the price is full.
The prices with included taxes were considered as discounted because
lst_price - webstie_price were always greater than 0. When the
"Show line subtotals without taxes" is checked for Tax display,
the field website_price never includes the taxes. That's why the
included taxes are substracted from the website_price.
opw:776526
opw-774286
*Before this commit:
On checkout, you can enable a step to force user to have the General Terms of
Sale checked to continue the checkout. Checking/Unchecking will correctly
disabled/enabled the button.
The checkbox is already checked at page load (on the template).
BUT, if the template has been modified to set the checkbox as unchecked at load
(eg the user removed 'checked="checked"' from the template), the button will
still be enabled even if the checkbox is unchecked.
*Now:
No matter if it is checked or not on the template, the button will
correctly be enabled/disabled regarding the checkbox state at load.
At 9d2f48dc and abea8d35 the `not opp.date_closed` condtion was added when
counting the number of overdue opportunites.
The result filter was still considering the closed opportunities.
opw-774421
1. on CRM module -> Select Pipeline -> Create a column (e.g. 'Test')
2. Edit this Stage
3. Toggle on the field 'Change Probability Automatically'
4. Set a stage probability (e.g. 50%)
5. Create an opportunity on this stage, using the quick create widget of the kanban view
=> The probability of the newly created opportunity is not 50%, as it should be expected
It takes the default_probability, using a default_stage_id, which is the 'New' column having initially a probability of 10%. The stage_id is correctly assigned to the newly created opportunity thanks to environment variable 'default_stage_id', but not the probability.
We solved this bug by updating the probability of the opportunity, after creating the object. We cannot do it at the same time, because BaseObject.create parse the missing fields in an order where probability comes before stage_id.
This fix is limited to the quick creation of opportunity by means of its name only. In particular, it doesn't overwrite the input of the user in the form view.
opw-772310
In case MRP is used with kits (phantom BOMs), the method
`action_explode` is called through the override of `action_confirm`.
However, `action_explode` modifies the recordset by deleting the move
with the original product since it is not relevant anymore.
We take this use case into account by reusing the return value of
`action_confirm`.
opw-772644
Specifically, the command `(6, 0, ids)` should only unlink/detach the lines
that satisfy to the field's domain.
Test from #18440
opw-756983
Closes#18438Closes#18440
Origin of the fix: the snippet background image did not change the background image.
This was due to commit a14f89c which wraps the snippet's content into a table for outlook display compliance
This issue is fixed here, with the modificaion of the background snippet option.
OPW 772442
In some case, user set a currency on the journal which is the same as the company currency. In that case, the field taken was amount_currency which should not be the case.
OPW 775123
Report mixed analytic line and timesheet, but
only timesheet should be included.
Since a timesheet is an analytic line with
a project, this fix do the job.
opw-772517
When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.
This did not work when you based your discount on the standard_price
(= cost price) with public price discount.
Now it does.
opw: 775275
When a return picking is created from a POS order, the methods check
that the value rounded to the unit of measure is not null.
The problem is that a rounding is passed to the function 'float_is_zero'
in the parameter precision_digits instead of precision rounding.
This bug has been introduced in rev: https://github.com/odoo/odoo/commit/61304087e7f48c677837dabdc8f1f8aeb18fb52e
opw-771282
crm.lead#case_mark_won and case_mark_lost have been removed in 1414b3e56e
merged in saas-12 but later commit 0b87f76628
reference those function and was merged in saas-11
This fix also improved logging in the controllers in order to log
unexpected exception.
When an element is placed multiple times in a page, it is saved only
once. Unfortunately, when a view was divided in multiple editable
parts (XML branding), only one of those parts were saved.
When editing the content of a <label/> which has XML branding (first
DOM element which is editable in its hierarchy), a <p/> element was
added inside. This behavior is there to automatically add <p/> elements
in empty editable <div/> / <section/> elements on edition. This should
however not apply on <label/> elements.
Use case to reproduce:
- Create a product with a BOM that use at least
twice the same component tracked by SN
- Build this product with SN 'A' and SN 'B'
- Unbuild it
-> Constraint error on duplicate SN
It happens because the unbuild order will create only
one stock.move.lots for SN A with a quantity of 2.
This commit create a stock.move.lots by quant used,
for example if the MO used 2 quants with a qty of 1
and one with lot 'A' and the other with lot 'B'. It will
create 2 stock.move.lots with lots 'A' and 'B'.
Still a know issue: If the user try to unbuild twice
the same MO it will reuse the same unbuilded componenets
than the first unbuild order.
When purchase order are created from a scheduler they always
have the same hours even if they were created at different
time. Also the procurement order that generate the purchase
order line have the same problem.
It happens because the transformation from datetime to string
use a date format and thus truncate the DEFAULT_SERVER_TIME_FORMAT
This commit use a datetime format instead the dateformat.
opw-775833
When duplictating a Journal Entry that has been created from
a new payment (accounting/purchases/payments/create), the new copy
of the Journal Entry also duplicated the already existent relationship (link)
to the payment, causing possible future conflicts in functionalities
like reports, payments, reconciliations, among others.
opw:775151
If the mass mailing was to mail contacts, this could cause an error if
the recipient unsubscribed. If the mass mailing was to mailing list,
unsubscribe would not work.
This change update unsubscribe to take into account changes in 765e752
and e15372c07 that allowed mailing list / mailing list contacts to be
used separately.
opw-770473
closes#20145
Currently when importing files, the parent left and right are recomputed on each record creation/update, which could lead to a lot a request.
This commit will defer the parent field recomputation to the end on the `load` function by recomputing the values from the MPTT and inserting directly the new values on the records.
Tested on a customer instance, this will reduce the execution time when importing a thousand stock.location from 15 minutes to several seconds.
When you cancel or split a move, it will check the propagation setting
to see if it needs to cancel or split the next move too. If this next
move is a raw material in a manufacturing order however, it does not
make sense to do this as a lot of logic is also on these moves related
to bill of material lines, workorders, ...
opw-770062
The search bar of the pipeline report page had duplicate filters. For each, there was one with "selection" widget and one without the widget.
opw-771298
8ac39287 introdcude a way to export the source terms not located inside an
addons module (e.g. error messages in openerp/service/models.py)
0529a7f9 fixed a bug in the get_module_from_path with addons path with similar
names.
The above commit introduced a regression making files located outside of an
addons path to be wrongly considered as a module
e.g. openerp/service/models.py used not to match any module and was considered
correctly as belonging to base module
After, 0529a7f9, '~/openerp/service' being different than '~/openerp/service/'
the module was considered as 'models.py' (which is incorrect).
Compare correctly both parent path to have a correct match
Fixes # 19907
Use case to reproduce:
-> Import a file with a float using a coma related to the model
(for example the product.supplierinfo/price)
It happens because the method that parse the date and float field
only compare them to the main imported model.
This commit complete the method by using a recursion on relational
model in order to also parse the relational subfields.