Previously, when clicking on an illustration in the editor, the image
options would be unavailable with a message saying that it was due to
technical limitations, and that the user should reselect the image in
the media-dialog for quality options to become available. This was
caused by the fact that in order to support more than one customizable
color in illustrations, they are now saved inside the database with an
url containing which colors are customizable inside the url's query
parameters. Since the endpoint that finds which attachment corresponds
to which image src was looking for an exact URL match, but query params
are trimmed on the client side before talking to the endpoint, they were
no longer matching.
This commit fixes that by searching for attachments whose URL matches
the provided one with or without any extra query parameters.
closesodoo/odoo#67625
X-original-commit: b26319c3c9409e8724fadeec80e63ea94dc8d599
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps:
- Create a second company
- Go to Website > Products > Products
- Create a product for all companies
- Click the "Go to Website" smart button
- Click "Edit in Backend" in the top-right corner
- Change the product's company to the one you're not on
- Go to Visitors > Visitors
Bug:
Access Error:
The requested operation ("read" on "Product" (product.product)) was
rejected because of the following rules:
(Records: Two prod (id=42), User: Mitchell Admin (id=2))
Explanation:
It happens because of the rule `product_comp_rule` which prevents
reading a product from a different company.
This commit filters the visited products on the current companies.
opw:2467138
closesodoo/odoo#67614
X-original-commit: 984adb180ab1a255fac086fd61478141074e8d31
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
- Install purchase_product_matrix
- Go to Purchase and create a PO
- In PO Line, type a text (i.e. test) in product field and use quick create option
Description and UoM fields should be updated following product creation, but they are not.
"onchange_product_id" is not triggered.
"purchase_product_matrix" module overrides "purchase.order" form view by replacing product_id
field by product_template_id field.
"_onFieldChanged" function should execute "_onTemplateChange" when product_template_id is changed
and if id is set, which would trigger "field_changed" on product_id, but it cannot be done after
a quick create as id is false.
opw-2462538
closesodoo/odoo#67605
X-original-commit: 3c082b9a47be35579a454f13edc230ac3029922d
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
The gallery slider index was wrongly calculated when the gallery had no
active element, as the jquery method .index() will still return -1 when
no element is found.
task-2472041
closesodoo/odoo#67563
X-original-commit: 666fc3697bd7d70cfa0dd92f0a401b771196bb27
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
As the container div of the fullscreen indication stays on the page to
be displayed, it was obstructing the click events of the elements it was
displayed on. The user could not access what was on top of the screen.
The solution was to remove pointer events for that div so that it
doesn't interfere with other elements on the page.
Related to https://github.com/odoo/odoo/pull/65255closesodoo/odoo#67589
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
PURPOSE
Duplicate lead records are an issue for CRM users
To prevent sales representatives from contacting a prospect that:
- Already refused an offer from another sales
- Already accepted an offer from another sales
- Is already discussing with another sales
The purpose of this task is to inform the CRM user that there are
some possible duplicates for one lead and let the user decide how
to handle the case.
SPECIFICATION
- Add a computed field to count the number of potential duplicates.
- Add a stat button on the form view of a lead to display the number
of potential duplicates. When the user clicks on it, the leads
considered as duplicate will be displayed in a kanban view.
- Add a lost ribbon on the kanban view to quickly visualize the lead
state since the duplicates can be lost leads.
LINKS
Task ID : 2151017
closesodoo/odoo#61834
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the default stop was equal to default start, creating events with duration = 0.
closesodoo/odoo#67146
Taskid: 2475473
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In India, we need to configure taxes like this:
- 6% applied on base amount
- 6% applied on base amount
- 1% applied on 1.12 * base amount
If both 6% taxes are affected the base of subsequent taxes, it gives the following result:
- 6% applied on base amount
- 6% applied on 1.06 * base amount
- 1% applied on 1.06 * 1.06 * base amount
Thanks to the new 'is_base_affected' field set on the second tax, it gives the expected results.
closesodoo/odoo#66134
Task: 2343958
Related: odoo/upgrade#2254
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
The fleet vehicle_id must be visible on vendor refund
opw:2471784
closesodoo/odoo#67280
X-original-commit: 7144321c3fd13f83241ae7e4be71a9a4d576a871
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Users with the rights 'Manual Attendance' get (read-only) access to their
own attendances.
closesodoo/odoo#66934
Taskid: 2438863
Related: odoo/upgrade#2216
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The "Add" button was not propagating the context, therefore records
couldn't get their default values set from the context keys `default_XXX`.
closesodoo/odoo#66876
Taskid: 2464991
Related: odoo/enterprise#16664
Related: odoo/upgrade#2207
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce the bug:
When trying to import or create a expense product with supplier taxes,
the supplier taxes were removed.
PS: The field vendor taxes is available in the expense product view
opw:2444551
closesodoo/odoo#65403
X-original-commit: 02d0591b73f5acd8c94e65cda3af1158c3a2254a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The "Departure Reasons" where hardcoded and couldn't reflect all the
valid departure reasons (like "End Of Fixed-Term Contract").
This commit introduces a new model `hr.departure.reason`.
closesodoo/odoo#66905
Taskid: 2447056
Related: odoo/enterprise#16709
Related: odoo/upgrade#2211
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Display notification to give feedback to user.
And reload the view with the params "next".
closesodoo/odoo#67219
Taskid: 2344276
X-original-commit: bd33f283a1fa39815481ca28918c65ac7b48d641
Related: odoo/enterprise#16830
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
With Worldline, the cancel command fails when the card was already inserted.
closesodoo/odoo#67560
Taskid: 2415526
X-original-commit: c71f71fab63d2ccb1faeccbe54425f5b0fb488f0
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
When canceling a purchase order generated from a SO, a warning activity
is generated on the SO to warn the salesman that the PO was cancelled.
But the activity message was incomplete, because the cancelled PO lines
were given as 'purchase_lines' to the rendering context, but expected
as 'purchase_order_lines' in the qweb template.
This commit ensures that the correct key is used and that the activity
message is clear and complete.
Fixes#67508closesodoo/odoo#67572
X-original-commit: ba7336a9d696e8506943edca2f3871f78fac3e99
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Sometimes it crashed when the domain used for the mailing cron
returned more than one record
source commit: 1738f9c8f7closesodoo/odoo#67556
X-original-commit: cb97f7c64a1fa575799a7832cb52e433436581e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When formatting a message, a message could be with an empty or obsolete
record_name field. It's better to rely on the relation between the message and
the thread and fetch the current thread name.
task-2411715
closesodoo/odoo#63000closesodoo/odoo#67549
X-original-commit: 51e962803d2048efeb0f7e96a9fe561ac49ee05a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This will count the number of query when formating messages, in particular for
the thread name query that is changed in the following commit.
Part of task-2411715
X-original-commit: 45b51acc35188765270a0b8b1dcaf5508408edf6
When the snippet was dropped, the miniatures were disappearing and
replaced by an arrow.
It was due to two things:
- the wrongly calculated index when the snippet was
initialized, as the jquery method .index() will still return -1 when no
element is found, fixed in https://github.com/odoo/odoo/pull/67389
- none of the sample images in the template were active
task-2472041
closesodoo/odoo#67081
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web_editor
The goal of this commit is to tweak the code of <we-range> widget
to be able to select a css using class values.
This way, the image spacing selection can be easily replaced by
a slider of 4 levels [0 -> none, 1 -> small, 2 -> medium, 3 -> big].
Part of https://github.com/odoo/odoo/pull/66544
task-2326573
The goal of this commit is to make the Images Wall/Gallery snippet
editable to be able to open the media dialog on "double-click"
on images.
Part of https://github.com/odoo/odoo/pull/66544
task-2326573
*: website
The goal of this commit is to improve multi image selection
(Image Wall, Gallery...) using the same layout as in selected themes
for selected images.
Part of https://github.com/odoo/odoo/pull/66544
task-2326573
Behaviour before the PR is merged :
There is no indication that the user can exit fullscreen by
pressing on escape.
Desired behaviour after PR is merged :
An indication is shown to the user after he enters fullscreen,
which disappear after a few seconds. A new widget
FullscreenIndication is available.
Part of https://github.com/odoo/odoo/pull/65255
task-2438556
closesodoo/odoo#65255
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When adding a new product, 'Product Name' is displayed
instead of 'Name', and 'Create' instead of 'Continue' for every type of
new content added.
Part of https://github.com/odoo/odoo/pull/65255
task-2438556
Behaviour before the PR is merged :
Options tab from the snippets menu can be misleading for some
users.
Desired behaviour after PR is merged :
The options tab from the snippets menu is renamed to Theme, and
the tooltip is removed.
Part of https://github.com/odoo/odoo/pull/65255
task-2438556
Description of the task :
Make the website ui as consistent as possible by making some layout
quick wins.
Behaviour before the PR is merged :
The user has to double click to select the hex color on the color
picker after clicking on it a first time.
Desired behaviour after PR is merged :
The hex color value is selected when the user clicks on it.
Part of https://github.com/odoo/odoo/pull/65255
task-2438556
To reproduce:
1. take a translatable record with an external id
2. delete the record but keep the ir.model.data (sql)
3. export the translations of the module linked to the orphan
ir.model.data
-> Error while formating the message
This commit fixes three issues:
- %d instead of %s to construct the string
- wrong order to identify the missing records
- display the external ids instead of the ids (which may not be very
helpful to debug)
Courtesy of Yannick Brant
closesodoo/odoo#67530
X-original-commit: a2a45539ca4056eb3b3d5d6bafbfb63c10255843
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When a record is written on a computed field with an inverse method and
an x2many field wit a delete command, the computed field is not properly
handled by the inverse method, because of a whole cache invalidation
that happens during the unlink.
With this commit, we write in cache on the fields that have been
invalidated before invoking the inverse method.
opw #2439861closesodoo/odoo#67525
X-original-commit: d39855bad5153654d443d1b7ede3907f8bae3e66
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
The "launch" button of an email campaign mark the current campaign ready
to be processed. As sending all the mails is a pretty heavy operation,
it is done asynchronously in a cron. The cron was running every hour, it
means the cron was running even if there was no active campaign and it
has a best precision of 1 hour.
We now use the new mechanism of cron triggers (4b28f11) to schedule the
con execution at the time the campaign is configured to be sent. It
achieves a better precision and ensures the cron only runs when there are
stuff to process.
We still let the cron run once a day as a security until the cron
mechanisme proves reliable.
closesodoo/odoo#65124
Task: 2416741
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Remove 'refuse' leaves from the Calendar View.
Improve leave/leave.allocation popup form views.
Add Sequence handle to leave type list view.
Change the sorted key func. in _search override to
first order by sequence asc then sort ties by
remaining,taken desc.
closesodoo/odoo#62162
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit:
place of supply always set from customer address.
After this commit:
place of supply is set by delivery address
closesodoo/odoo#67393
Opw: 2456095
X-original-commit: dd141a882478c2e3684638321f36b952bcac3858
Signed-off-by: Josse Colpaert <jco@openerp.com>
According to the documentation from IPCF, the proportion of VAT that may not
be claimed back must be recorded by default on the same account as the base
amount in a different move line that this base amount.
Task ID: #2373849closesodoo/odoo#67492
X-original-commit: 8b831cd5d1d837b103aab1abd5ee3cbe0e6787d7
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Commit [1] altered the way the FieldMany2Many behaves with respect
to 'create' and 'delete' options. Indeed, for many2many fields,
adding or removing records doesn't mean "creating" or "deleting"
records, as it is only about adding/removing records to/from a
relation. This is completely fine and correct.
Unfortunately, a feature has been lost in the process: it is no
longer possible to state that a many2many field should be editable
but should not allow to add (or remove) record to the relation.
This commit fixes the issue by adding two new options: 'link' and
'unlink' for that purpose.
[1] https://github.com/odoo/odoo/commit/c98579d25af01c14df4baf57fb4652f3e7469096
opw~2466213
closesodoo/odoo#67495
X-original-commit: df44e65bbbba55a7ee2224ad5b4f13248a39423a
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit gives access to float_compare function in server action python
code.
closesodoo/odoo#67500
X-original-commit: 3046b11f50aa1a0e02725492ba63b17c194db751
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
When confirming a SO, if a line uses a different UoM than the default
UoM of the line product, the computed cost will be updated to the
product unit cost.
To reproduce the error:
1. In Settings, enable:
- Units of Measure
- Margins
2. Create a product P
- Sales Price: $100
- No customer taxes
- Cost: $50
- UoM: Units
3. Create a SO
- Add P
- Set the line UoM to 'Dozens'
4. Display the order line field "Cost"
- [Note] As you can see, since UoM is 'Dozens':
- Unit Price: $1200
- Cost: $600
5. Confirm the SO
Error: Line cost becomes $50 (the cost of one P-product). Since the UoM
of the line is 'Dozens', Cost should be $600 (as before confirming the
SO). As a result, this error creates incorrect data in the margins
(95.83% instead of 50%).
OPW-2444335
closesodoo/odoo#67480
X-original-commit: 377f70ada0ec720aca055986ff19b8bbff84e33d
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
The astroid package where version is lower than 2.5.1 uses imports the `imp`
module that was deprecated in python 3.4 [0].
In Debian buster, astroid version is 2.1.0 and 2.3.3 in Ubuntu Focal.
With this commit, the deprecation warning is filtered out.
Note that pylint 2.5 avoid that deprecated import [1], that's the reason
why the warning was not showing on current runbot Docker image.
[0] https://docs.python.org/3/library/imp.html
[1] https://github.com/PyCQA/pylint/commit/51c646bf70a6e0a86492bfd2ddd1885671d64d67closesodoo/odoo#67469
X-original-commit: 8127bea147c093aa64ac7d31ebc69e4dcbef6eef
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
The run_push() method may change the location_dest_id of the stock move
but not the associated stock move line. That can produce a
de-synchronisation between stock move and stock quants as those are
updated by the stock move lines.
This commit ensures the location_dest_id of the stock move is also set
on the move lines in run_push()
opw : 2427301
closesodoo/odoo#67460
X-original-commit: 7dafde71c0591be74f9d433976243342b1b3e635
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>