action_invoice_sent() triggers two onchanges which normally don't happen at the same time. Added a check to one of them (onchange_is_email()), so that on action_invoice_sent(), only one of them calls the computationally expensive onchange_template_id_wrapper(), effectively halving the time taken.
Time for executing the action for one invoice dropped from over 3 seconds to a bit over 1.
closesodoo/odoo#74160
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
When consulting the costs reports, if the beginning of the dates range
has a day greater than the day of today (e.g., start date: 2021/02/25,
today: 2021/07/10 => 25 > 10), the costs of the current month won't be
include in the report.
To reproduce the issue:
(DB without any demo data. Let X be the day of the month for today)
1. Create a vehicle V
2. Add a service S1 for V
- The category of the service type does not matter
- Cost: 500
- Date: today
3. Add a second service S2 for V
- Same service type
- Cost: 250
- Date: Last month with a day > X (so if today is 2021/07/26, date
could be 2021/06/27)
4. Fleet > Reporting > Costs
Error: The report does not include S1
When generating the dates range, the current date is used as the end of
the interval. Since the interval step is '1 month', it will lead to an
issue in the above case:
Suppose today is 2021/07/26, the interval starts on 2021/06/27. Then, if
we add one month to this date, we have 2021/07/27, which is after the
end of the interval (2021/07/26), so the date is ignored. As a result,
current month won't be included in the report.
Note: A similar issue can happen with the contracts
OPW-2477004
closesodoo/odoo#74273
X-original-commit: 7ea6300f951bd426c94d721bb56e6ad85a58bd30
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When adding some services to a vehicle that does not have any
immatriculation date, the costs report does not consider these services.
To reproduce the error:
(DB without any demo data)
1. Create a vehicle V
- Remove the Immatriculation Date
2. Add a service for V
- The category of the service type does not matter
- Cost > 0
- Date: today
3. Fleet > Reporting > Costs
Error: Costs Analysis is empty, the service is not considered
In the SQL view, the date used as start point is the oldest
immatriculation date. Therefore, if the vehicle doesn't have this date,
the report lines won't be generated.
OPW-2477004
X-original-commit: 8d362af654c1905535d78fbf8d73677633b65d63
Currently, When the One2many list contains a large amount of fields and the
user clicks or resizes the header, list takes table width as its initial width
and because of this list to overflows outside of the form view.
Issue raised after commit: d58edef12a
after this commit, clicking or resizing the list header does not impact the
width of the list.
TaskID-2388582
closesodoo/odoo#74277
X-original-commit: a145e1242118d3e539790327221486e1bd94e59a
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
- Create 2 companies (i.e. Company A & Company B)
- Create user with access to both companies and default company set to Company B
- Log with created user
- Switch to Company A
- Go to Project and create a new Project (i.e. Project X)
- Go to Timesheets and add a line for Project X
- Display all timesheets in list view
- Select created timesheet and print "Timesheet Entries"
Logo and address printed on timesheet report are from Company B.
Company used for timesheet report is default company of current user.
This fix will use company linked to the project if it is unique.
Otherwise, it will use current company.
opw-2502182
opw-2509463
closesodoo/odoo#74281
X-original-commit: 0812641544d49746d111ca4bb88a2091bf0dd6c8
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Setting a controller URL to a menu which is linked to a page should unset the
m2o relationship to preserve the page URL.
Step to reproduce:
- Create a page (with a menu) and save, eg: "My Page" (url will be /my-page)
- Edit that new menu and change the URL to /shop (or any controller)
Issue:
- The page URL is now /shop, which doesn't have a lot sense if there is a
controller for that URL.
- Unpublishing the website.page will unpublish the menu, as a menu needs its
page to be published in order to be visible.
Note: The flow introduced here is the same as if you choose an URL of an
already existing page, the menu's page will be unlinked from the menu and
left with its original URL.
task-2575974
closesodoo/odoo#74163
X-original-commit: b52a01f76d89ebb7bdd75577e60a09f048c83000
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Before this commit, the FlexCheckout API was used to process validation
operations only. It proved itself to be:
- unusable without making small payments with immediate refunds
- badly suited to PSD2 due to its Merchant Initiated Transactions (MIT)
- not worth the maintenance cost tied to its complexity given the simple
flow that it implements
- inconvenient to integrate to standard payment flows
- poorly customizable in regard to the hosted tokenization page
This commit thus removes it entirely and drops Ogone's support for
validation operations with it.
task-2494916
Before this commit, it was not possible for an acquirer to support
tokenization while not supporting validation because the acquirer would
be thought to be compatible with either flow based on the
`support_tokenization` field. This was a false assumption because some
acquirers, such as Ogone, can offer to tokenize a payment method in
payment with redirection flow while not allowing tokenizing a payment
method for future usage, without payment.
Note that this was not an issue for acquirers supporting the direct
payment flow because they could either support validation natively, or
seamlessly charge a small amount and refund it immediately to tokenize a
payment method.
This commit makes it possible for a module implementing the validation
operation to filter acquirers based on whether they support it,
regardless of their support for tokenization.
task-2494916
Before this commit: When o2m inside inner group and it has record then
sometime group is not displayed side by side instead second group comes
below first group.
After this commit: If o2m inside inner group and it has record, it will
always displayed beside first group, the issue was occuring due to
o2m list table layout which is fixed and due to which group width
increased and second group comes below first group, here we are setting
max-width to listview so that it never increase width than max-width.
task-2571376
closesodoo/odoo#72700
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
PURPOSE:
When the user creates a new content for a course and specify an invalid
video link, the system will display a traceback when the 'onchange' hook
of the field is triggered (i.e: when the user unfocus the field).
Instead of displaying a traceback with the 'Warning' function, we will
rather use the 'UserError' function which is more user-friendly and does
not provide any debugging information.
SPECS:
- Replace the 'Warning' function call with 'UserError'.
LINKS
Task id: 2607238
closesodoo/odoo#74237
X-original-commit: 7e9949b9c1e2e98a4d5059de695dbed95751b8b5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Because there are some restrictions with the HTTPS and trusted certificates
We forward, in some cases, the POS and the POS RESTAURANT to a specific url.
HTTPS: /pos/ui
HTTP: /pos/web
To allow rules for webserver
We make this change when we check 'Direct Devices'
And when we use a 'Order Printer' type 'epson_epos'
closesodoo/odoo#74239
Tasks: 2597021
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
- Create a survey with passing score at 80 point
- Some user complete the quizz with 85 point, the quizz is "passed"
- If you update the passing score at 90, the quizz completed by user are now "unpassed".
This PR avoid to recompute quizz_passed.
closesodoo/odoo#74238
X-original-commit: d5355037545fb8366675b792f8cc5ed30ecca1bf
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
When sharing the RFQ link to a vendor, the price unit was displayed.
The price shouldn't be displayed if the PO is not confirmed.
opw:2547660
closesodoo/odoo#73681
X-original-commit: 4e2fd7552d5fd7fb1daeb65abffe11d42add09fb
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
In database with frontend and live chat there are lot of bad query error.
bad query: UPDATE "mail_channel_partner" SET "write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (328111)
closesodoo/odoo#74193
Error: Could not serialize access due to concurrent update
X-original-commit: f10e04e0a3352acd3af80cb78b192eae17b98280
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This is a fix of this fix: https://github.com/odoo/odoo/pull/73239
As the button has been moved to another module, the attrs were less coherent with the current (sale_timesheet) module.
An inheritance was made to add the correct attrs when this module is installed.
opw-2530161
closesodoo/odoo#74192
X-original-commit: 4ea0cddb57608eb7fc75066d2c4ff385c838e10c
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
The frontend code was still using the legacy RainbowMan, with the wowl
webclient, we rewrote this RainbowMan and started using that one
instead, but because the frontend code had no access to the wowl
environment, the legacy version was still used in the frontend. Since
the frontend now has access to the wowl environment, the old code can be
removed and the calls can go through the new effect service.
closesodoo/odoo#74148
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Step to reproduce
- go to planning app
- configuration > roles
- set the color of a role to dark purple
- schedule > by role
The dark purple is not set, instead of that, #3daec3 is displayed.
opw-2601898
closesodoo/odoo#74185
X-original-commit: ee38f8e393e937c5694e6b75cd05b8a35d4f1624
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
How to reproduce the problem:
- Install sale_timesheet.
- Create 2 service products: one with "Create a task in sales order's project" (e.g. Product X), and the other with "Don't create task" (e.g. Product Y), in the Service Tracking field. Both with "Milestones" as Service Invoicing Policy.
- Create a Sale Order with these 2 products (with e.g. quantity of 10 for both). Confirm the SO.
- Edit the SO. Put 5 in the "Delivered" column of the Product Y. Create Invoice and confirm it.
- Go to the Project app -> Overview (of the newly created project).
- The "Other Revenues" is missing/not correctly filled
Cause of the problem : the query to fetch the value would not take the invoiced Product Y into account, it should now work correctly.
opw-2540624
closesodoo/odoo#74191
X-original-commit: 59b5667665124e8db51caa94039e33b5f718718d
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Currently, when you add a link in any of the buttons on the website with
non HTML/XML page, it will raise the traceback as we fetch the content to find
id to propose as a list of anchors.
Reproduction Steps:
1) Add a button on the website using the editor.
2) Add link in URL (i.e. /robots.txt)
3) Traceback
With this commit, When you add the non HTML/XML page to any of the link
will not raise the traceback.
task-2596392
closesodoo/odoo#74194
X-original-commit: 5f78c19995cc6d1fe480b982176e0701bd4d3e86
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Anonymous website users do not have access to the Customize menu
obviously, but the website.set_view_track widget still attempts to
extend the CustomizeMenu.
Now, set_view_track module is only loaded into editor assets instead
of frontend assets.
closesodoo/odoo#74186
X-original-commit: b7d485cf0280d388cdaab1723ac759e53dea04fc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
New system of ir.asset doesn't clear specific website asset on uninstall.
Now when we delete a website, we delete relate ir.asset.
task-2611030
closesodoo/odoo#74180
X-original-commit: 4e2df51a5f57bb8dde792e59295c20f3104bf4e2
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Usecase:
- Create a production order without BoM
- Add a component
-> Traceback
It's due to a compute that try to access the UoM
while it's not set
closesodoo/odoo#74177
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Use Case
========
The cron run perfectly well when there is no concurrent transaction.
But in real life users may interact with leads modified in the cron.
This cause two issue:
Concurrent update
-----------------
If a lead is modified in another transaction during a the transaction
where the lead is modified. The parameter crm.assignment.commit.bundle
allow to reduce the size of the transaction but before this commit
the first transaction was always way longer because it took the time
to handle the bundle + the fetching of all the data at the begining of
the cron.
The solution: start a new transaction after the preparation
of the data is done
Missing record
--------------
If the a lead is deleted in another transaction before
the transaction that modified the lead starts.
The code will then try to access a record which does not
exist anymore in the database causing a Cache Miss and Missing record
error.
The solution: Make sure a record exists in the current transaction
before using it. It reduce a little bit the performance of the cron
but avoiding the crashes is at this price.
Discussion
----------
This commit does not remove completely the risk of crash
due to concurrent update but reduce its probability a lot.
To remove the risk of crash, a proper exception management should be
implement in a further commit
closesodoo/odoo#74166
X-original-commit: 4a70f7539ec53b9c3419f83d584ad99111d2e172
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, it could happen that the test fails.
We may be waiting too long on the second click in the test and so
the form switches to edit mode too early.
Now, we don't await the click to keep sync.
closesodoo/odoo#74157
X-original-commit: 01708583777cf33e9b505a494fdc5cdb66db86b5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit avoids displaying commands associated with the wrong active
element in the palette command.
closesodoo/odoo#74149
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Fixes taking a hald day outside of working hours counting as half a day
instead of nothing.
See odoo/odoo#68977closesodoo/odoo#74147
X-original-commit: 35a7308188d069465ad624d4199ec26b6d25d651
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
Before this commit branding was removed only from nodes using t-esc and
t-raw.
This caused problems such as the ribbon preview rendering being
propagated across all products because the oe-model/id/xpath fields were
referencing the product card view itself.
This appeared because of the conversion from t-esc/t-raw to t-out.
The branding used to be removed from nodes using t-esc and t-raw, but it
was not removed for t-out.
After this commit the branding is also removed from nodes using t-out.
This restores the old way the ribbon preview was rendered, and therefore
also fixes the issue described in the related task.
task-2527056
closesodoo/odoo#74145
X-original-commit: 9e83dd83a39b542ec0e0d3045bcffcf24406c94b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, some snippets that contains special charactere like –
was wrongly displayed, since we removed the call to pycompat that did a
decode('utf-8') in previous version.
closesodoo/odoo#74041
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
PURPOSE
This commit aims to improve the 'Contact Tags' sections of the 'Contact'
module by adding a color picker (on the list and the form view).
SPECS
- Add a color picker on the 'Contact Tags' sections (i.e: list and form view)
- Add a placeholder for the 'name' field of the form view.
- Update the label of the 'color' field.
LINKS
Task id: 2608410
closesodoo/odoo#74033
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
It is a feature we would like to have, but it currently doesn't work well.
- Search is text based, but messages are HTML based, which means a lot of result
make no sense because they match HTML tags, attributes, ... Inversely when
searching for multiple words that do exist together but are separated by tags,
it will fail to find them.
- Content of messages is actually not indexed, which means the search doesn't
scale in big channel or with long messages. Indexing it is not trivial and has
a huge cost in terms of storage and dependencies (trigram index for example).
- The search of the control panel is great for business documents but it does
not fit the kind of searching UI that we would like inside discussions.
It is therefore decided to remove the feature until we are able to do it well.
Part of task-2369636
More information also on task-2359037
closesodoo/odoo#73903
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Previously, the button Sale Order in a Project form could only be seen when the sale_timesheet module (installed automatically with the Timesheet, Sales and Project apps) is installed.
Now, only the Sales and Project apps are needed to be able to display the Sale Order button.
opw-2530161
closesodoo/odoo#74048
X-original-commit: 42fcb59373fda8c82b2402b5524160215553df68
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
task-2355704 introduced a bug which prevented scrolling in reports, instead of only in report preview.
This PR fixes this bug.
task-2586245
closesodoo/odoo#73496
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose of the task is to give a preview of what the Burndown chart
will look like once there is data.
So in this commit added the demo data for the burndown chart.
closesodoo/odoo#73426
Taskid: 2504119
Related: odoo/enterprise#19788
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>
Fix vertical alignment and style the message as a badge (clickable for
project managers).
task-2579123
closesodoo/odoo#73210
Related: odoo/enterprise#19437
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit will simplify css output removing @extend(s) that are not
strictly necessary.
Moreover it will remove a deprecated compound-selector extension (good
catch @xmo-odoo).
task-2579123
Custom text decoration classes have been dropped with d9a0877096
in favor bootstrap default ones.
This commit will adapt the list-view generation code ans some mrp
translations that were mistakenly omitted.
task-2579123