=== ISSUE ===
With Milk, our primary buttons received a fresh lifting in term
of design,with different designs according the state the button is in.
Before that, our buttons were green with a white text on it,
and the behavior was identical on `hover`. This allowed us to force
a `color: white` when it was needed, since the background always matched
WCAG contrast standards.
Since the 16.3, these buttons are on a dark background,
and that background becomes light when in `active` state. That means we
cannot use white on these buttons.
=== AFTER ===
We set the color of the link inside the button to `inherit` in order to
fix the active state behaviour.
Note that this should be improved when reworking the widget since having
a link inside a button is not really expected. Instead we should use a
link that allows different actions.
task-3354844
part of task-3326263
closesodoo/odoo#135996
X-original-commit: 572288ccf2244df23c031dd88c47d2807fd06c47
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
the filename field shouldn't be 'false' but an empty string when
the binary file is deleted.
closesodoo/odoo#135894
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
1) fix automatic creation of documents when attachments are added
to product templates/variants chatters
2) fix duplication of documents
3) fix deletion of documents
Delete child record before deleting parent record.
Before this commit, when trying to delete a product document,
we deleted the parent record first, before trying to delete
the child, which had been deleted (cascade) already.
Part-of: odoo/odoo#135894
In DocumentViewer, we need to generate google slide urls.
In this commit, we're going to create the getGoogleSlideUrl utility that
generates a google slide url.
closesodoo/odoo#135851
Related: odoo/enterprise#47573
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The purpose of this commit is to simplify PdfViewerField by removing its
unused props. No use of the "pdf_viewer" widget uses "filename" or "preview_image".
Part-of: odoo/odoo#135851
In this viewtiverse, the heroes remove the context dependencies for
`get_views`, from the views and python fields (such as domain). To reduce
inconsistencies and the number of rpc.
Current issues:
* There may be inconsistencies in views at the JavaScript level. Some
overrides modify the behavior of get_views or domains on fields via
context keys, therefore by changing the action, the rendering may be
different. However, these views are cached. However, the cache key
(Javascript) does not reflect the entire context, and requires additional
post-processing from the server.
* Multiple rpc for the same rendering. get_views being dependent on the
context, as soon as it changes, a new rpc is performed. In most cases,
when JavaScript needs the same view, there is no change depending on the
context, the rpc is useless.
* Inconsistency when rendering subviews, some views could be different
depending on the context, this context can be modified in the view itself
via the context attributes. However, the JavaScript client does not redo
an rpc for each change of these sub-contexts. Therefore the result may be
inconsistent.
Solution:
Limit as much as possible the number of context keys provided when calling
get_views, and use the context provided as a cache key. The authorized
keys are 'lang' and '*_view_ref'. For the cache key, options are added in
the get_views method.
Instead of using the context, it is inserted into python expressions.
This will be evaluated by JavaScript and thus avoids inconsistencies.
task-3414108
task-3414068
closesodoo/odoo#135145
Related: odoo/enterprise#47584
Signed-off-by: Raphael Collet <rco@odoo.com>
This PR resolves a bug in the self linked to the demo data.
Steps to reproduce:
Create a new Restaurant session
Open mobile menu for Restaurant
Make an order in the mobile menu for a table
Reload the page where the open restaurant session is.
[BUG] The ball telling if an order is sent to the kitchen or notbecame black.
[EXPECTATION] The ball telling if an order is sent to the kitchen or not is red.
closesodoo/odoo#134777
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
In this commit, next to UX changes, we make some changes in order to
increase time off dashboard usability.
In particular, - New Allocation Request - was moved to Time Off Card.
Now user can also ask for specific time off type allocation from
the time-off-card-popover.
Moreover, we fix the following issue:
Previously allocation name was not computed on create. We also fix the
computation of the name, in case time of type is not filled in yet.
With the later change, test_allocation_request test was failing as
first the name field was assigned, then holiday_status_id;
Which caused for the name field to be recomputed and assigned to False.
As the field is required, leave_form.save() was raising an error.
task - 3389144
closesodoo/odoo#132187
Related: odoo/enterprise#47651
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, each module had its own logic regarding payment
flows in the portal. With this commit, we enforce that if the user is
logged in, they see their tokens, while logged out users see the tokens
of the customer (the contextual partner).
task-2836870
closesodoo/odoo#124631
Related: odoo/enterprise#42999
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Some businesses requires customers to pay a down payment in order
to confirm the order. In the case of odoo today this implies to:
- sending a payment link
- waiting & checking if the payment has been done
- confirming the order
- creating the down payment invoice
A lot of time consuming manual operations with a high risk of errors.
This commit introduces the functionality for sales orders to be
confirmed on down payments and automatizes the flow to minimize the
errors due to human manipulation.
Task - 3087716
Part-of: odoo/odoo#124297
Co-authored-by: Victor Feyens <vfe@odoo.com>
In this commit, we add images on demo categories to make the demo more
realistic but also change a bit the design of the category selector.
closesodoo/odoo#134621
Signed-off-by: David Monnom (moda) <moda@odoo.com>
When loading a registry from the route with auth="none" and where module
'website' is set as 'to install', request.env will be None, and install will
crash as follows:
Error:-
AttributeError: 'NoneType' object has no attribute 'context'
reference of previous commit-
https://github.com/odoo/odoo/commit/0ebf849b8e0de33d3b6e7e06c66189591dc7a72c
sentry-42474563
closesodoo/odoo#136096
X-original-commit: ca43e03e6f510520e874b2a8bba092ac9a7f2453
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
PR #105873 added computed indexes on the `mobile` and `phone` commits
for the benefit of `phone_mobile_search`, however it created both
indexes to work on the `phone` field as source, rather than whichever
field they were named after and partial for. As a result, the index
has no effect when searching on `mobile`.
closesodoo/odoo#135878
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
With the removal of the repair.line model, we must now use the stock.move model instead.
The smart button on stock.lot should only show repair orders where the related product is used as a component however it shows all repair orders containing the product.
Now, it will correctly only select repair orders where the product is a component based on the repair_line_type of the stock.move.
Also renamed repair_order_ids and repair_order_count for easier differentiation with new fields.
Part-of: odoo/odoo#129933
added a contextual action to call action_plan_with_components_availability()
if each component line of a production order has a forecast_expected_date,
the date_start of the production order will be the latest forecasted date
task 3395161
Part-of: odoo/odoo#129933
Added a todo count field on the button where the lot is the product being repaired.
Changed the texts to better fit the buttons.
Part-of: odoo/odoo#129933
When the blacklist table is filled with multiple thousands of records
searching the `is_blacklisted` field leads to a domain like
`[('id', 'in', [thousands_of_ids])]`. This can create a multiple megabytes
sql query.
Using inselect allows to avoid that issue.
Task-3328210
closesodoo/odoo#136089
X-original-commit: e00dce5edc1e4e0452a9add775ef46a1c993a17a
Related: odoo/enterprise#47677
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
- Select a course from the website, and click 'Add Content'.
From the 'Add Content' window, click 'Video'.
- The description with the title 'On Vimeo' is not up to date with
Vimeo privacy management.
After this commit:
The description is now up to date.
task-3458724
closesodoo/odoo#136083
X-original-commit: 4a1d2a2726ce83edbf28dd478c60a3e6f67d4470
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This report allows an HR manager to quickly see the status of employee's certifications
red: expired, yellow: expiring in 3 months or less. There are also 2 filters for those
situations.
task 3384857
closesodoo/odoo#126438
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
All account.tax weren't delete when we reload the chart template.
It was caused by the fact that we forgot to add the active_test=False
in the context to delete all the taxes (and not only the actives).
This thing caused an issue where an sql constrains was trigger.
This fix comes from another PR (https://github.com/odoo/odoo/pull/132360)
that doesn't solve properly the issue.
closesodoo/odoo#136081
X-original-commit: a92f347318415492357413c577e666785c2cb8a4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
The way the `ignore` property is implemented means that nested draggable
elements under a single element matching the `ignore` selector will all be
disabled.
In Knowledge, the sidebar allowing to move articles around has nested draggable
elements that the user should be able to move around, under other draggable
elements that should stay in place (depending on access rights).
Therefore, this commit introduces another way to disable dragging with the
`preventDrag` property which is a function that receives the dragging candidate
and returns a boolean to indicate whether the element can effectively be dragged
or not in its current situation.
task-3456741
closesodoo/odoo#135981
X-original-commit: eb302dbf48500b2eee61a0efb865868866fb454b
Related: odoo/enterprise#47640
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Damien Abeloos (abd) <abd@odoo.com>
purchase_stock, point_of_sale
What are the steps to reproduce your issue?
When Odoo.sh runs unit tests on a development branch,
it tests the code in the MRP module for rounding errors.
What is the current behavior that you observe?
I had a customization that introduced a rounding error in the standard MRP module.
When the unit tests ran on the development branch, I got a traceback.
What would be your expected behavior in this case?
The rounding error should be reported as a failed test with a message. No traceback.
opw-3454998
closesodoo/odoo#136052
X-original-commit: c4b5148be0819eeef8ce7e12cdc7f1d45174fe65
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Gaetan Vanden Bergh (gavb) <gavb@odoo.com>
The livechat button was disabled in website preview because
its implementation could not properly handle being in an iframe
inside the backend [1].
With the public livechat code being refactored to use discuss code,
this is no longer a problem, so the livechat button can be present
again. This also makes previewing the website more correct: the
livechat button is actual present on the website, so hiding it was
a lie.
By re-enabling the livechat button, this also allow to remove the
test coverage by a tour, which was sometimes failing on runbot due
to tour being small and doing `im_livechat/init` rpc after the end
of the tour.
[1]: https://github.com/odoo/odoo/commit/e86c1ce94a148745d58ac38e408e1bc947978670
runbot-24631
closesodoo/odoo#135913
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Issue:
Search on website has a big performance issue because the database has
too many product_template.
Analyze :
The website search mechanism has hardcoded sql query. And the generic
query don't have any filtering. Which lead to make a expensive search
(similarity) on the whole product_template even if the products are
not published and then displayed to the user.
Fix :
Filter the is_published field in the generic website method when the
model has a 'is_published' field and the request is not done by a user
(thus for customers or portal users).
Note:
The internal user is still able to search on unpublished product.Thus
have no performance improvement.
Benchmark:
| SQL Query | # Input data | Before PR | After PR |
|:---------:|:------------:|:---------:|:--------:|
|General best_similarity |700000 products (161 published) | 12.65 s | 0.12 s |
|FROM ir_translation|2,796,000 ir_translation | 6.338 s (586k hit) | 0.091 s (185 hit) |
Related task:
task-3473786
Related ticket:
opw-3418457
closesodoo/odoo#136080
X-original-commit: fcb968836a2d0e49516fe3ecb23dde61f4597749
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The aim of this commit is mainly to add optional standard node directly
on UBL 2.0.
This will allow national customization of ubl to be easier to implement.
List of modification:
- Add the following nodes:
- AddressFormatCode
- BuildingNumber
- PlotIdentification
- CitySubdivisionName
- Name under TaxScheme
- DocumentTypeCode
- reduce zatca customization
- add attrs to several place to ease customization of attributes
- add a hook from which customization can override all decimal places to
enforce a maximum
- add a hook to ease the modification of the `legal_monetary_total_vals`
sub dict
- add method to allow customization to provide attributes for
DocumentTypeCode node.
Notes:
Regarding PlotIdentification and CitySubdivisionName, I decided to not
populate some of those field for now because I didn't think of a
reliable way to get their value while zatca benefits from fields created
in l10n_sa_edi.
Task-id: 3326977
Part-of: odoo/odoo#136072
The stupid aim of this commit is to remove one line.
The smarter goal of this commit is to add a "/" for the root node and
improve the code readability.
Context:
I made an initial modification to this function and created an `AccountTools`
class. Then Laurent was bothered and changed some stuff thus the initial
commit isn't required anymore.
As he isn't bothered anymore and has too much peace of mind at the moment, I
have the responsability to entertain him to keep his brain at its full
capacity for the sake of Odoo's future.
Before the commit:
The code is complicated and LAS is in peace.
After the commit:
The code is sexier and Laurent keeps his brain sharped and entertained.
Task-id: 3326977
Part-of: odoo/odoo#136072
The aim of this commit is to make method `_check_required_fields`:
- works with dict
- make the docstring more explicit
Context:
Docstring states that it works with dict and record
Before the commit:
The method was crashing when used with dict if the key wasn't in the dict
After the commit:
The method works with dict without crashing
Task-id: 3326977
Part-of: odoo/odoo#136072
Previous fixodoo/odoo#121602 did not correctly handle the case when not
all of the qty to manufacture is manufactured (the qtys to change to
were miscalculated in this case).
Additionally, it missed fixing a few more use cases when setting the
qtys to match the wizard's lines/qtys:
- if the UoM of a MO's component line is changed => the correct qty was
not correctly converted into the move.product_uom's qty (now it is)
- if a component's move is deleted before the MO is confirmed => the
move (i.e. the missing component) was not correctly added back into
the MO (now it is)
- if there are 2 MO component moves with the same product => both were
set to the same "correct qty" value (now we only set the first move to
that qty, others are set to 0 since we have no way of knowing how to
distribute the qtys otherwise)
Also, since an UserError needed to be added in case of a missing comp
move for a tracked product, existing error logic has been updated to
list all applicable products and the message has been improved to be
more helpful.
Note that the fix for saas-16.4 and earlier is slightly different from
this fix due to the change in how stock move original demand qtys no
longer change like they used to (see: odoo/odoo#130342) and because a
backorder bug was also exposed by this change.
closesodoo/odoo#135796
Task: 3456604
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
This reverts commit 5fd345e.
The duplicate option was removed but it should be available.
closesodoo/odoo#136014
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
To test which browser is currently running, jquery performs some checks
when it starts, by doing invalid queryselectors. Depending on which
selectors crashes, it can determinate if it is running in an old browser
and need to activate some part of the code to support them.
This would not be a big deal, except that it makes the life of some
developers much more difficult: we can no longer easily reload a page
with a "Pause on exception" setting to debug odoo. Doing so works, but
the workflow is polluted by 3 errors initially.
It is so common that I propose to simply remove the checks. This should
be acceptable, since Odoo does not work on old browser versions anyway
We are talking about firefox 5, opera 11 or "Gecko", for a commit that
is at least 11 years old
closesodoo/odoo#136013
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Steps to reproduce:
- Go to `/blog`.
- Enable "Show Sidebar" in the "Customize" menu.
- Edit the page.
- Click on an icon of the "Follow Us" section of the sidebar.
- Click on the "Link" icon of the editor toolbar.
=> An error popup appears.
In further versions, the link parameters can be edited - but they are
lost upon save.
The social media links sections of the blog and blog post pages is
generated and is not supposed to be editable.
This commits makes these social media links sections non editable.
If a user needs to configure such a content specifically, it can be done
inside the "About Us" section of the sidebar above.
E.g.:
- Deactivate the "Follow Us" section from the "Customize" menu.
- You can use copy/paste to duplicate the existing style of the
"About Us" section if you want.
- Click on the "File / Image" icon of the editor toolbar (or type
"/image" to use the Power Box as of 15.0).
- Select a pictogram.
- Click on the "Shape: Circle" icon of the editor toolbar.
- Select the "Font Color" from the editor toolbar.
- Click on the "Link" icon of the editor toolbar to specify an URL.
opw-3450880
closesodoo/odoo#135980
X-original-commit: 27d8633c73106b7278eda7d07c9fce370d29784a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Since the website page preview is within an iframe, the selector used to
neutralize some events during edition of blog pages were not targetting
the elements anymore.
This commit makes the elements looked up within the iframe.
opw-3450880
Part-of: odoo/odoo#135980
Before this commit:
Negative discounts could be applied to products, which is not allowed
in Indian EDI.
After this commit:
Applied conditions to check for negative discounts and raise an error in case of
such discounts.
task_id: 3293247
closesodoo/odoo#135790
X-original-commit: fb1352bc1937d54183173c57094b5b176525d8d6
Signed-off-by: Josse Colpaert <jco@odoo.com>
Add a selection field `l10n_mx_tax_type` on account.tax. This field is
used in the CFDI attachment. This allows to avoid relying on the name of
the repartition line tags to export and import a CFDI.
task-3388347
closesodoo/odoo#135215
Related: odoo/enterprise#47321
Related: odoo/upgrade#5136
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Adding a company_id field in project.project.stage will allow companies
to have their own individual stages, which was not possible before since
all the stages were shared between all companies.
task-3330285
closesodoo/odoo#122597
Signed-off-by: Vincent Larcin (vila) <vila@odoo.com>
In the ticket screen the user has the option to double click on an
order in order to continue editing it. This functionality is implemented
using custom code for handling the double click. This is cumbersome and
error prone.
In this PR we replace the custom double click logic with the default
`t-on-dblclick` from `owl`.
closesodoo/odoo#135856
Task: 3512282
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit fixes this error:
- The IMP done at [3] added a lot of fields but all of those forgot the
`_t()`/`_lt()` translation.
Note that:
1. A fix to replace `_t` by `_lt` was done at [4] but it was badly done
as it was not targetting the correct version... and only fixed one of
many occurences.
2. In this forward port, using `_t()` seems to be working again, using
`_lt()` is not required anymore. This part of the PR has been removed
here. For tracking purpose, here was the other bug:
- The form registry fields added in [1] and [2] in Odoo 13 had a
`string` attribute translated with `_t()` while now it should be
translated with `_lt()`. It was surely working in Odoo 13 but not
anymore. It's not worth investigating to be sure.
- Not needed since a recent commit which removed `_lt()` (it's a
deprecated alias to `_t()` which now handles the lazy translation
directly too.
[1]: https://github.com/odoo/odoo/pull/32565
[2]: https://github.com/odoo/enterprise/pull/4063
[3]: https://github.com/odoo/odoo/commit/617eba941785aa680edb826e14b0009637d60dee
[4]: https://github.com/odoo/odoo/commit/2be83cae7bcda369ed5bc7806aef845c6c76e687
opw-3471873
closesodoo/odoo#134238
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Issue:
After 213b6885312f3da3bf5bff995861758a1afcde76, some custom filters
on tags can throw a stacktrace.
Steps to reproduce:
- Install Project
- Project > Custom Filter > Tags contains 'Internal'
- Stacktrace
Cause:
When `limit=None`, which is explicitly set when creating custom
filters, the `name_search` crashes when comparing an `int` (the len
(ids)) with the limit which is `None`.
Fix:
Elaborate the condition to handle the case when `limit=None`.
Affected versions:
16.0 up to master
Reference:
opw-3510309
closesodoo/odoo#135982
X-original-commit: 5aefba4399f25e4e3cd3c205e0a6511173dffd11
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
The `_computeUnclaimedFreeProductQty` method was not properly computing
reward quantities for order type rules. This commit fixes the
computation to handle order type rules separately, allowing free
product rewards to be granted as expected.
The computation now also takes into account which rules were actually
used when calculating points. It will ignore any rules that were not
used in the points calculation when determining free product rewards.
This ensures the rewards match the rules that contributed to points
for the order.
opw-3492083
closesodoo/odoo#135972
X-original-commit: ff22b2cce65d324dc73295bc85a2469d42e3b82f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Following new regulations in Denmark, we need to prevent users from
modifying posted entries in sales and purchase journals.
By using a forced hash on the journals we do just that.
task-3497062
closesodoo/odoo#135202
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Before the change
- Tax Names were not intuitive or easily understandable for the users, it was hard to relate which tax was referenced with each name.
- The Name didn't include the spanish translation, regardless the name is encoded now, it should be encoded based on the spanish description.
After the change:
- Tax names(codes) both in English and Spanish are more intuitive and easier to understand for the users.
- Tax names have better matching with the description.
task-3475793
closesodoo/odoo#132837
Signed-off-by: Josse Colpaert <jco@odoo.com>
Choosing a quant to populate a new stock move line set the quantity done
and the reserve quantity to ensure it stay available to this particular
stock move and not empty by another picking
closesodoo/odoo#124409
Task: 3256447
Related: odoo/upgrade#5139
Signed-off-by: William Henrotin (whe) <whe@odoo.com>