* the cache_invalidate() was invalidating the changes made in the wizard as well, make it impossible to set any value other than the default one, even though the preview entry was updated accordingly. That also prevented to simply validate the wizard as the accrual account was required but reset anytime we changed its value.
* the preview_data field was incorrectly set as Binary while the widget only supports Text
Part-of: odoo/odoo#76037
Some assets are missing from layout due to an incorrect namespace
since conversion to new assets system.
opw-2638542
closesodoo/odoo#76238
X-original-commit: b55cb521f9b0abc98877e9e57b81c2d6eb6ca35c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Calling `_get_answer_score_values` on each question creation or update is
not necessary if value is already provided.
Followup of odoo/odoo@0d32ed45aeclosesodoo/odoo#76223
X-original-commit: c6c7605cdae803aca4f441ef4e622a1b79f17019
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- create a second warehouse, resupply from the first
- create a product, replenish W2 from W1
- Goto Inventory Forecast
--> Issue value are wrong.
An OUT is when WH source is Set and WH dest is not set.
An IN is when WH dest is Set and WH source is not set.
closesodoo/odoo#76129
X-original-commit: ad7deb4cfced42f08733da5ed9c1233109900d87
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
In a POS session, when using the scanner, if the seller changes the
customer, the prices may become incorrect
To reproduce the issue
1. Create a product P:
- Sales Price: 38
- Barcode: 2312345000002
- Available in POS: True
2. Start a POS session (with debug Window)
3. Scan 2312345010001
- This is product P with price $10
4. Set a Customer
Error: The price is now $38
Because the price has not been set manually, when changing the customer,
the pricelist is updated and so does the price.
When scanning a barcode that includes a price, the latter should be
considered as manually set.
OPW-2618934
closesodoo/odoo#76096
X-original-commit: e66724272a5379c5d56f8fe48fa48ceac53cf12d
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
- Hide transition mode if there is 0 or 1 level on accrual plan;
- Fix kanban card
- Reduce bottom padding on calendar view
- Log a message when an allocation linked to accrual runs for the first
time
closesodoo/odoo#75940
Taskid: 2636417
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Use the method serializeNode of the editor rather than directly
the one from utils in order to only serialize when the collaboration
is active.
closesodoo/odoo#76143
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Because the "Replenishment" can unlink a lot (thousand of
`stock.warehouse.orderpoint`).
and psql needs to check every Many2one `orderpoint_id` constraint
and without index it takes too much time.
opw-2637321
closesodoo/odoo#76116
X-original-commit: 864d90a064f093bd6ba24d8464ee491a443a320e
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
By activating the profiler debugger, the two qweb options is added. The
qweb templates that need to be rendered are compiled into a new function
to add instructions for saving data.
`Add qweb directive context`
It's a sub-option of "Record sql" or "Record traces", add some context on
thread at current call stack level. This context stored by collector
beside stack and is used by Speedscope to add a level to the stack with
this qweb directive information.
```
directive=t-call='website.layout', xpath=/t/t
t_call_content
directive=t-foreach='5' t-as="'a', xpath=/t/t/div/div
directive=t-esc='website.search([])', xpath=/t/t/div/div/t
execute
```
`Record qweb`
Add profiling data used by ProfilingQwebView widget. In the `ir.profile`
form view, the widget display the duration and number of sql of every qweb
directives with the xml of templates. Every xml is recorded to be
consulted even if the user change the xml templates.
```xml
<t t-call="website.layout">
<div>
<div t-foreach="5" t-as="a">
<t t-esc="website.search([])"/> <!-- will display 5 separate requests -->
</div>
</div>
</t>
```
closesodoo/odoo#74712
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
344d82c commit changed how the editor `_historySteps` should behave.
Before that commit, `_historySteps` could have 0 steps whereas after
that commit `_historySteps` should always have at least the first step
be a snapshot. When reseting the history, we should now add a snapshot
as a first step. This commit guarantees it.
closesodoo/odoo#75901
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
344d82c renamed `resetHistory` into `historyReset` but failed to update
some calls to it and rename its equivalent in wysiwyg.js. This commit
corrects the discrepancy.
Part-of: odoo/odoo#75901
When saving a mailing, we do some processing (converting classes to
inline styles mostly) in order for the mailing to display properly in
all email clients. Until we started saving the processed version
separately from the unprocessed version, we had to revert the process
whenever we would start editing the mailing. This was extremely
expensive and made the loading of a previously created email very, very
slow. This was kept so far for backward compatibility reasons 3 years
ago (see f296992). This commit removes the that unnecessary conversion.
Part-of: odoo/odoo#75901
Since the introduction of Odoo Editor, `field_html`'s `_getValue` uses
`wysiwyg.getValue`. This conflicts with the mechanism of `mass_mailing`
which modifies the html of the editable area in place to save an
"e-mailable" version on the `body_html` field, then relies on
`_getValue` to reset the original html (`body_arch`).
This ensures the field has a value before modifying the html in place,
so we can manually restore it instead of relying on a side effect of the
old behavior of `_getValue`.
Part-of: odoo/odoo#75901
Steps to reproduce the bug:
- Install inventory, purchase and product_expiry
- Create a new storable product that is tracked by lots or serial numbers and expiration date
- Go to inventory > configuration > Warehouse Management > Operations Types
- In “San Francisco: Receipts” > Enable "Create New Lots/Serial Numbers", “Pre-fill Detailed Operations”, and "Show Detailed Operations"
- Create a new RFQ > select the created product > Confirm the order
- Click on “Receipt”
Problem:
In the created “stock_move_line” the expiration date field is not set
Solution:
When we add a new "stock_move_line" and choose a product, an onchange is triggered in order to set
the expiration_date field even if we do not choose a "lot /serial number name".
So we can replace the onchange with a compute function to do the same thing in the creation.
opw-2634583
closesodoo/odoo#76130
X-original-commit: d1ccfdc4097debe63aa6c9d42965a7801c1331cd
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Issue: When creating a manufacturing order and setting a scheduled date
when no workcenter is set, a traceback shows up
Steps to reproduce :
1) Install Manufacturing
2) Enable work centers
3) Create a manufacturing order, in the work order tab, add a new line
and set a Scheduled Start Date, confirm the date
-> Traceback
opw-2633940
closesodoo/odoo#76117
X-original-commit: ebf54c802664e6c2143785b950667c136944fcbf
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Purpose of this commit is to globally improve code performance by limiting
search impact by
* adding limits when only first found record id used;
* avoid unnecessary searches when record set can be filtered instead;
* using cache when accessing ir.model;
Task-2638444
PR odoo/odoo#76005
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
Purpose of this commit is to globally improve code performance by limiting
search impact by
* adding limits when only first found record id used;
* avoid unnecessary searches when record set can be filtered instead;
Task-2638444
PR odoo/odoo#76005
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
Purpose of this commit is to globally improve code performance by limiting
search impact by using cache when accessing ir.model.
Note that tests are left untouched as they are generally done using admin
(or at least data preparation is done as admin). Diff is kept small currently.
Task-2638444
PR odoo/odoo#76005
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
Purpose of this commit is to clean field definitions by
* doing compute in batch: especially when the loop can be reduced to a single
computation / batch assignment (based on groups or config parameter for
example);
* remove default when having a compute as computes should completely define
the field value at any time;
Some side dish code cleaning is performed at the same time: unnecessary
import or dead code removal.
Task-2638444
PR odoo/odoo#76005
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
Purpose of this commit is to clean field definitions by
* doing compute in batch: especially when the loop can be reduced to a single
computation / batch assignment (based on groups or config parameter for
example);
* remove default when having a compute as computes should completely define
the field value at any time;
Some side dish code cleaning is performed at the same time: unnecessary
import or dead code removal.
Task-2638444
PR odoo/odoo#76005
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
*: mrp_subcontracting_purchase,payment,purchase_(stock)
BEFORE THIS COMMIT
fa-shopping-cart was used for different purchase-related contexts.
This icon should only be used for online shopping / ecommerce.
AFTER THIS COMMIT
Wa make sure one icon is used for one concept.
- fa-shopping-cart : ecommerce / add to cart
- fa-credit-card : purchases
- fa-credit-card-alt : replaces other uses of fa-credit-card
- fa-pencil-square-o : quotations in marketing modules
Icons are updated accordingly. Other icons are also changed to
increase readablity.
--- Links ---
Task Id - 2593306
COM PR - odoo/odoo#75694
ENT PR - odoo/enterprise#20478
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
To improve readability of the year view dashboard of hr_holidays:
Currently the week number on the year view of hr_holidays are not aligned with the dates -> Align the week numbers with the dates
The week number are also of the same size than the dates -> Decrease the size of the week numbers
The empty weeks have a week number (https://tinyurl.com/yzkmwbm5) -> Don't add a week number if the week is empty
Summary of the changes:
In hr_holidays, on the year view dashboard:
- Align the week number with the days
- Size the week number to be smaller than the number of days
- Remove number when the week is not displayed
task-2637136
closesodoo/odoo#75927
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, if one RTCDataChannel was not available, signaling
using the RTDDataChannels was faulty.
This commit fixes this issue by skipping unavailable dataChannels.
closesodoo/odoo#76102
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Manage correctly a/b testing in mass_mailing.
We can now organize a mass_mailing campaign by testing
multiple mailings for the recipients targeted (subject,
templates, design, ...)
For this a new tab on the mailing record is added to better
promote the existence of the feature.
When an user has the group to manage mailing campaign, he can
access the tab A/B Test. This tab allows to enable A/B testing
for the mailing. If there is no campaign set for the mailing,
one is automatically created allowing the user to continue
smoothly.
Once A/B testing enable, the percentage of recipients use can be
set for each mailings. Also, the user can choose the deciding factor
that will set the final mailing as winner.
In a case, the user is not in manual mode, he can set the schedule datetime
for sending the final mailing.
task-2123242
COM PR: odoo/odoo#75622
ENT PR: odoo/enterprise#20454
UPG PR: odoo/upgrade#2781
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, we add the DebugMenu component in the project
sharing webclient but this one is displayed in the menu bar in backend.
In project sharing views, we don't display this menu. So, this component
is useless in project sharing.
This commit removes this component and also the menu_provider file in
the assets of project sharing.
Related PR: #73341
Part of task-2633229
closes#76098
Related: odoo/enterprise#20662
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Before this commit, when the internal user is not follower of the
project and enter in the project sharing feature. If he wants to see the
form view of a task, he cannot and have a Session expired error.
This issue arrives because in the chatter we check is the user is a
follower of the project shared.
This commit fixes this issue by just using the _document_check_access
method to check if the user can access to the document. Indeed, we don't
need to check if user is a follower because the _document_check_access
does it with the `ir.rules`.
Related PR: #73341
Part of task-2633229
closes#76098
Steps to reproduce:
- Install "Field Service" module
- Go to settings and activate "Recurring Tasks"
- Go to Field Service -> All tasks and create new one
- Set for Planned Date : 10/01/2021 14:00 -> 10/02/2021 14:30
- Check Recurrent and go to Recurrence tab
- Select repeat every 1 weeks
- Select Monday
Issue:
Wrong date for next occurrences (first occurrence is 09/06 instead
of 10/04).
Cause:
Calculation based on today date.
Solution:
Calculate next occurrences based on planned_start_date if set.
opw-2628777
closesodoo/odoo#76092
X-original-commit: 86060f9426eef6516db6dda7829ae17050f0fcc3
Related: odoo/enterprise#20659
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
In case a production order loses its procurement group. The backorder
generation process do not have access to the last backorder sequence
used. This commit set a default value to avoid any traceback.
The new backorder name will not be guaranteed exact related to the
production sequence but will be unique in any cases.
closesodoo/odoo#76091
X-original-commit: aae07e88a8166cf26a8c81bb8ee37d630fd6672c
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
During the refactoring of the project_graph and project_pivot views,
their static key "components" were incorectly set making impossible for
OWL to render them. This is now fixed.
closesodoo/odoo#76065
Related: odoo/enterprise#20647
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
We clean various graph archs taking into consideration that:
- the default type of a graph is "bar".
- a bar chart is by default stacked.
- the field attributes type="row" and type="col" does not make sense for
a graph view (since its implementation was separated from the pivot
implementation a long time ago))
- the boolean attributes should now take 1 or 0 as value (but the other
values are accepted for retrocompatibility).
Part-of: odoo/odoo#76065
Setting a default value on a readonly related field without an inverse
method is nonsense. We log some warning when it happens.
We also fixed other cases where a related field has a default value
that overrides the target field's value.
closesodoo/odoo#67762
Related: odoo/enterprise#17313
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>