Before this commit in case you start on blog with url like /blog/blog-1/tag/2,
you should be redirected to /blog/blog-1/tag/website-2 to avoid duplicate
content.
But because the replace was done with /tag/%s/ it will be not replaced and so
you are redirected to the same url, creating a loop.
closesodoo/odoo#45927
X-original-commit: 666306326cecc6ac8587b45d2dbf24c0463b33a5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, if you have a link with a tag that doesn't exists anymore,
you will have a traceback because you try to access to a unexisting record.
odoo.exceptions.MissingError:
('Record does not exist or has been deleted.\n\n(Records: [3], User: 2)', None)
Now, we filter on existing tag before to access a field.
X-original-commit: 54b45e5c287138a87a0b04ce4f301ea6893b9223
Steps to reproduce:
- install calendar
- create a recurring event with 0 repetitions
- save
Previous behavior:
raises an UserError, this would interrupt the sync with google calendar
Google calendar sometimes sets recurring events to 0 repetitions
once they are done recurring
Current behavior:
the event is handled like a punctual event but remains recurrent
initial commit: https://github.com/odoo/odoo/commit/ba727e15d2dc9a1325cd20527e2ccfe6f8bc63f0
opw-2185699
closesodoo/odoo#45947
X-original-commit: 5b63ddb4e03f34f015e7668c69108fb4a2badd08
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
Since PR 45225 hw_blackbox_be is no longer a module in the IOT but a driver.
It should therefore no longer be executed
closesodoo/odoo#45924
X-original-commit: acf11a68d17f300de3cc03cc53aa1cbac2f1977a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Missing part of #44947 of task 2160847
closesodoo/odoo#45922
X-original-commit: 367d236a974b1b726a770e58a03344a3d83fa49f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
When performing an import-compatible export, m2m values would be
exported as a record per cell unless the `id` subfield was the first
to be exported. Which is not the case when using the export UI (as it
always adds the field itself before any subfield). This would make the
m2m not actually export-compatible in most cases.
* export m2m "display name" in an import compatible format as well
* re-prioritise exporting xids when there are multiple m2m exports in
import-compatible mode
* never fall back on the o2m / non-import-compatible m2m path for m2ms
in import-compatible mode
Note: if multiple m2m fields are specified only one of them gets filled.
Task 2065428
closesodoo/odoo#37407
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Ravi Singh <ras@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
When applying the selected date range using the widget the
tip wasn't consumed. This commit fixes it by listening on the
event triggered when clicking on button apply.
closesodoo/odoo#45916
X-original-commit: 150d69f70a505efa298c66119eced29d8caa3699
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
PURPOSE
In various views, the min width of some columns is too short for the label of
the field. This task aims at fixing this by increasing some minimal widths
and relabeling some fields.
SPECIFICATIONS
crm
* in view_crm_lead2opportunity_partner_mass, view_crm_lead2opportunity_partner
add date widget on create_date and remove the phone field in the inline
treeview of opportunity_ids;
event
* in view_event_form set width of boolean field 'done' to 70px and in
view_event_mail_tree set string of field 'mail_sent' to 'Sent'
* in view_event_form_inherit_ticket set string of fields seats_max to
'Maximum', seats_reserved to 'Reserved', seats_unconfirmed to 'Unconfirmed'
and set width '100px' in the inline treeview of event_ticket_ids;
gamification
* in challenge_line_list_view and challenge_form_view set string of field
'target_goal' to 'Target' in the tree view and inline treeview of line_ids
LINKS
Task ID 2166865
PR #43401
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In the code for commenting or posting to twitter a selected range of
text, we did not take into account the case of no selection (eg. we
click on an element, but another code prevent default browser action).
opw-2197227
closesodoo/odoo#45883
X-original-commit: c578279dba4a3fd95e261d8dc58f2704c3b50eb0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
- In some cases when trying to open a discuss conversation a
traceback can occur because of the usage of a local variable
before its assignation.
closesodoo/odoo#45867
X-original-commit: 47bec812a36c1e41bdb525439dfd18a208e1dd79
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
When more than one user are linked to the same res.partner and this user is assigned to a task or a sale.order
as many email notifications will be created as there are users linked to the same res.partner.
This won't send more than 1 email, but multiple mail.notification
records will be created.
This causes duplicate entries in the mail.notification table, and can
crash when an old unique constraint is still present in that table (from
earlier Odoo versions)
To prevent this, we deduplicate the notifications and order by notification
type to get 'email' first in case the user have different notification
type ('email', 'inbox').
How to reproduce:
- Create a first user test1
- Create a second user test2
- Merge the contact test1 and test2
- Create a customer customer
- Set the user test1 as salesman
- Create a new sale.order with customer as partner
Add a test to reproduce the pathological scenario
Solution
add distinct on partner.id and order by partner.id,
users.notification_type
closesodoo/odoo#45386
X-original-commit: 00f36c60e4790c8f5341cbc4f2c67e22e6d68f87
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
adds _isCustomResource method which will check whether resource is custom or
not, this method checks for JS and SCSS resource, if resource is custom then
do not show "No Update" warning inside ace editor.
task-2167570
closesodoo/odoo#44536
Related: odoo/enterprise#8368
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Steps to reproduce:
- install sales and easypost shipping
- have a delivery order of multiple packages with easypost
- click "send confirmation email"
previous behavior:
the template does not handle multiple package references
and the associated link is wrong
current behavior:
each reference is set in a separated link
opw-2167037
closesodoo/odoo#45507
X-original-commit: 65eaa3e7daf0b547ae2bb98e335fc5941cb200a6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
- Activate 2 currencies
- Create a landed cost product
- Create a Vendor Bill in a currency different from the company currency
- Add the landed cost product
- Click on 'Create Landed Costs'
The landed cost is created in the company currency, but with the amounts
in the vendor bill currency.
This happens because the currency conversion is missing.
opw-2200500
closesodoo/odoo#45861
X-original-commit: 41f52aef54ddf9ab4cd0f23c1224c2d7581a1ede
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Some of the implicit side-effects got missed, namely that under some conditions
(e.g. using an odoo subcommand) `initialize_sys_path` can be called before the
config has been loaded at all, resulting in the first call not properly setting
up things, and one of the subsequent calls fixing things up.
Since this breaks workflows right now, quickly fix it, we'll re-investigate
how to fixup the entire thing in order to restrict & enforce a single call.
closesodoo/odoo#45844
X-original-commit: 6cb4c829e1559bcf836e4b573051760565b7d0c1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Activate multi-step routes
- Set Incoming Shipments: Receive goods in input, then quality and then
stock (3 steps)
- Create an Immediate Transfer from 'WH/Input' to 'WH/Quality Control'
- Add 2 products, set a quantity
- Validate
Two immediate transfers are created, one for each product, while a
single planned transfer is expected.
This is because the `default_immediate_transfer`i key is polluting the
context.
opw-2180556
opw-2197720
closesodoo/odoo#45843
X-original-commit: 74ad073fd66ca4ff345aaf37a7245a8b93808cb3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Line return will add a space between icon & text, as it is done for the one
just above and the one below.
closesodoo/odoo#45875
X-original-commit: c26db3344b1e62158c4a3aa0c457802ea2376c63
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Since Chrome version 80, the V8 javascript engine is using an new
pointer compression feature [1]. This features tries to reserve more the
4GiB of memory. As a consequence, during HttpCase tests, odoo tries to
launch chrome headless in a subprocess but fails because of the
memory-limit-soft.
With this commit, the Chrome browser is spawned in a forked process
that removes the memory limit.
Also a new Chrome CLI switch is used to prevent crash reports to be sent
to google.
[1] https://v8.dev/blog/v8-release-80closesodoo/odoo#45859
X-original-commit: 726d9c50720c2d3c9e617e998ed0dcd12272a271
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
During an HttpCase, when the Chrome browser starts, it may happens that
the websocket is unreachable. In such a case, the stop method is called
and tries to stop the browser gracefully by sending a `Browser.close`
through the websocket ... which is not reachable.
The result is a confusing traceback. With this commit, nothing is sent
is the websocket is not available.
Moreover, the `sigxcpu_handler` attribute is used in the stop method but
not yet declared. Fixed by moving it before calling the _chrome_start
method.
X-original-commit: 0d156fd3bc114b40680ca5aa0456e0f21a5b8cff
Before this fix, if the user has no PoS access rights, he cannot delete a contact
due to a check done on open PoS sessions.
closesodoo/odoo#45868
X-original-commit: f7b83cfc41045e1cc81d2e1c5540ac105f333a61
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Before this commit, the popup activity in kanban was rendered using
the position of the button. So the left popup was nearly in the center
of the screen but the width is too large to be contained on the screen.
After this commit, in mobile, the popup activity in kanban will be
placed on the left of the button to avoid to go outside of the viewport.
Steps to reproduce:
* Go to sale app (in mobile)
* Click on the activity button of a kanban card (clock icon) BUG
Task ID: 2198429
closesodoo/odoo#45860
X-original-commit: 392c8a57df798d92b8be73d743b690891cf2fda2
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
The computed field 'session_show_ranking' was only computed based on the fact
that the survey had a scoring mechanism.
It's not very accurate since we also need a question that saves as the attendee
nickname to be able to display a relevant ranking chart.
This commit fixes the compute method by adding the necessary condition.
Task ID 2188482
closesodoo/odoo#45852
X-original-commit: 86ca11517d3872b2bf3cf89eda513a3bc8c84292
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
`require_signature`and `require_payment` were visible in
debug-mode only for seemingly no reasons, making our
sales team having difficulties with our customers payments.
Issue introduced by TaskID #2033229.
closesodoo/odoo#45842
X-original-commit: dffba03715aba7da3c372f61645720a6e122ad74
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
When we edit a link on the website, the target page is loaded to find
the anchors. This occured at every typed character which was obviously
not efficient.
task-2187754
closesodoo/odoo#45831
X-original-commit: 06ae0b7b00c837733a9c67772007aee6712b246e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose
=======
In multi-company, the group by "company" refers to the field
"mode_company_id" and not to the company of the employee so due to
that there is a confusion.
So for the field model_company_id:
- on the views, name the field "Company"(Functionally it doesn't change)
- on the model, name it "Company Mode".
closesodoo/odoo#45181
Taskid: 2168320
Closes: odoo#45181
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently when the company is created or updated the whole
web-client is reloaded
so write a qunit test case when a company is created or when
the data is written to the company for the web-client reload.
closes odoo/odoo#44714
Taskid: 2188789
Closes: #44714
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
=======
If you set a future driver and click on "apply change", a new assignation log is
automatically created for the new driver.
But the end date of the former assignation isn't populate.
Specifications
==============
Set the date "end date" for the former driver with the "start date" of the
new driver.
closesodoo/odoo#44635
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently when user change the image on a vehicle, it change it
for the car manufacturer and the goal of this image is to recognize
the manufacturer of the vehicle.
After this commit is applied, the model and vehicle image will be
fixed as per the selected brand image. user will not be able to
change from the vehicle and model.
closes odoo/odoo#44153
Taskid: 2168922
Closes: #44153
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When a field is related, defining a selection or selection_add will
have no effect and the paramater is ignored.
Log a warning and fix all fields badly definied
Closesodoo/odoo#45716closesodoo/odoo#45832
Related: odoo/enterprise#8613
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Commit 9a482fc introduced change for the document layout preview:
all "td" tag included in clearfix were in display: flex;
Because of this some styles were broken in form views on mobile.
We could have only put this rule in the right scope but
we preferred to fix this correctly.
Steps to reproduce:
- Go to Settings
- General Settings
- Click on Configure Document Layout
Related to task-ID: 2184243
closesodoo/odoo#45830
X-original-commit: 0206ee8f8a3652ae0eeb5aa78a94b92bd6e84921
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The default product category and uom should be fixed on generic
undeletable records (in data files).
And by caching those default values, we can gain up to 20% time when
creating products without providing uom and categories.
Also remove the unnecessary defaults on the compute fields, which do the
same as the compute (and have no use because it is a non stored field).
closesodoo/odoo#45791
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Each search on member_ids will trigger a ref call (one exists query each
time), whereas we could just directly use the appropriate share field on
res_users.
This commit cleans some useless .decode('utf-8') calls when we return rendered
templates results in the survey controllers.
The http module is capable of handling that type of results and the calls were
not necessary / added complexity.
Task '2187328'
closesodoo/odoo#44540
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit ComponentAdapter warned on every update and render.
This can make a lot of noises when we use some adpaters.
After this commit ComponentAdapter will warn only in debug=assets mode.
closesodoo/odoo#45583
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
addEventListener supports an `options` argument, which can
be useful to listen on events during the capture phase
This commit allows to pass these options to the hook useListener
closesodoo/odoo#45478
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Purpose
=======
Lighten the survey layout. It should be free of website footer and header.
Also, livechat button should not appear on survey pages.
Specifications
===========
Survey Layout inherits from web.frontend_layout, mainly to be able to use all the
styles rules defined in it and keep consistency between other frontend pages and survey.
Instead of inheriting another layout, this PR sets no_footer and no_header to True
for all survey layout. The idea is to show only the survey itself without having
other web/website object in the layout.
Also, to avoid having the livechat button displayed on survey layout, 'no_livechat' template variable
has been introduced. The livechat button will be displayed on all layout inheriting from frontend_layout (that is extended in website_livechat to add that livechat button) only if 'no_livechat'
is False. By default, this variable is not set so will be considered as False.
In survey layout, no_livechat is set to True.
Links
=====
Task ID: 2195185
closesodoo/odoo#45112
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- create a SO with a section;
- create an invoice from the SO.
Before this commit, an SQL constraint was raised : 'Forbidden unit
price, account and quantity on non-accountable invoice line'. This error
occurs, because the default_get function adds a default account_id to
all the lines (including section lines) if a journal_id is passed in the
context. The journal_id is added in the context since : 03353118d3176463fbf779471cc272d31fb11b2e
Now, the default_get function only adds a default account_id if the line
is not a section line or a note line. This avoids the SQL constraint to
be raised, and the invoice is correctly created.
opw-2199356
opw-2199017
opw-2198781
opw-2198650
closesodoo/odoo#45809
X-original-commit: d71830f5d9f9a717194aaa8ec993d99739fe09e7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
In case of MTO+Manufacture, a sale order have a count of
manufacturing order created from it :
1. create SO with MFG+MTO product with quantity of 5.
2. confirm it. MO will be created for 5 Nos.
3. increase it to 7 . another MO created for 2 Nos.
4. there are 2 MO created based on 1 SO.
It was due that new stock move was merge, and the
'created_production_id' info was lost during the merge (keep only
the original one). To fix, avoid merging stock move with distinct
'created_production_id' (done by override
'_prepare_merge_moves_distinct_fields' and
'_prepare_merge_move_sort_method' methods ).
task-2199568
closesodoo/odoo#45800
X-original-commit: 1fb32cfd17122b625d211a7d22ec319fba35e87f
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Incorrect forward-port of e09798098679f made in 51d49517a8b5af2d1c85d9c6.
closesodoo/odoo#45775
X-original-commit: 099d0d6785b85dd67ef091fdaef084713fafb3c0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>