According to last runbot state. Should probably be removed someday as actually
there is not much gain with those tests.
X-original-commit: dc05f873571ca60b7fbbb701a86760f13a6d3172
Identification type was always been overwrite by the _onchange_country even when just opening the contact form, this was always setting the is_vat identification type as default without taking into account if the user has defined their own default.:
* If Identification type is set and it is compatible with the country then we leave it as it is (this is the case the identification type has been set by a default).
* If Identification type is set but is not compatible with the country then compute and set the Identification type that is is_vat True for the country
Where country is the one set in the partner record, if not set will use the country of the move's company, if not defined then will use the country of the environment company
closesodoo/odoo#67628
X-original-commit: 8e9b1c404a71c0a7dce37c7f5f6ecef1396e0a1a
Signed-off-by: Josse Colpaert <jco@openerp.com>
Steps to reproduce the bug:
- Create an Expense E
- Create a report R from E in the journal J (type=purchase)
- Generate the journal entry JE from R
- Go to Accounting Dashboard and click on J in the kanban view
Bug:
JE was not displayed in the entries filtered for J
PS: When creating a journal entry from an expense sheet, the move_type of the entry
is 'entry'.
opw:2474729
closesodoo/odoo#67674
X-original-commit: 31ca461ee3a6b9560fe6d78642e8fe5017b1085e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The "TypeError: Mixing apples and oranges" error message is raised when
users are using recordsets from different models together. The error
message was confusing some users thus have been reworded to be more
explicit.
The initial proposal was to replace "apples" and "oranges" by "torchons"
and "serviettes" but it was rejected because the French are not capable
not to mixup the two. They suggested to instead replace "apples" and
"oranges" by "pain au chocolat" and "chocolatine", this was rejected
because none of us understood the difference between the two, they both
are couques.
closesodoo/odoo#62266
Task: 2366612
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Steps to follow to reproduce the bug:
-Go to the Contact app
-Choose any contact
-In the contact form> go to the "sales & purchase" tab and try to assign a user in the "salesperson" fields
Problem:
You can choose any user regardless of their type. While normally we can only choose internal users
Solution:
Add a domain to the "user_id" fields to only see users of the kind "internal type"
opw-2468819
closesodoo/odoo#67642
X-original-commit: 1361686fe502be137a4757c9092fab4223d484f8
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
When an index has name 'tablename_fieldname_index', this index is
dropped if the field has index=False. This lead to dropping a
user-created index or dropping/recreating the index when index=True is
set in a dependent module. Some info is logged instead.
closesodoo/odoo#67602
X-original-commit: 6a87318df296a11e3300723ca0c8b49c0dcf5fa7
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
When table name is long enough, the foreign key constraint name computed
by odoo and the one by PostgreSQL are different, for the same table,
column and definition, are different. As an example,
base_partner_merge_automatic_wizard_res_partner_rel(partner_id) foreign
key is named
base_partner_merge_automatic_wizard_res_partner_rel_res_partner_id_fkey
in Odoo while it's
base_partner_merge_automatic_wizard_res_par_res_partner_id_fkey in
PostgreSQL. This difference trigger a useless foreign key drop/create.
closesodoo/odoo#67601
X-original-commit: 353b415c74da057d5e81cce4d309bebb5f0f2927
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Before this commit, we only check if another endpoint can be serve in case of
404 not found. Idea was that each url has only one endpoint.
Fun effect is that if record doesn't exist, route doesn't match, so in reality
we had one endpoint but we fallback too to check if another match.
But it doesn't match a recurring case, when you archive a record, and want to
create a redirect for your seo and customer to another record, it is just
ignored because the url math a controller (that return 403 since you don't have
anymore the access right)
Since ask to the customer to delete the record is not always possible
(e.g. a product already sold) now we check if a fallback match for 403.
closesodoo/odoo#66030
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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>