- updateUI is async, most of the time it is really important to wait for
its async parts.
- method options are now async and should wait for async parts and user
choices before resolving their returned deferred.
While it was working perfectly in normal flows, some elements would not
have worked correctly if the datetimepicker was used another way. This
was revealed while working on another task.
This commit also fixes some issues:
- The datepicker was not working in languages where the date format is
different that the english one (the date was displayed correctly but
interpreted as if it was using the english formatting).
- Because of summernote, the datepicker sometimes loses the focus and
get it back directly... but this is enough for it to close. Now, we
open the datepicker on focus, not on click, so that summernote only
make it close then reopen right away (not possible to notice).
It's only for some use cases like paying a hotel or buying food
closesodoo/odoo#41888
X-original-commit: d076973fa48af000ead55019448de5261e2a766e
Signed-off-by: Josse Colpaert <jco@openerp.com>
We didn't apply the iotpatch files after upgrading the IoT Box,
resulting in the crash of the Box and the user needed to re-flash his
Box.
closesodoo/odoo#41885
X-original-commit: 8dceea9383ed94b9fed7e76bbbe33794526af417
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Preivously, the code of the IoT Box was retrieved from the branch that
was used during the build but the drivers were retrieved from the
connected Odoo DB. Both could be in different versions, which forced
used to make old drivers compatible with the new Box or new drivers
compatible with old versions of the Box.
All of this made it quite hard to modify the existing code, even for
new versions of the Box in master.
When connecting the IoT Box to an Odoo DB, we now retrieve the version
of Odoo that is used and checkout the Box to this branch. This means
that we can now modify the code of the Box in master without having to
worry about users using the latest build with older DBs.
Taskid: 2120749
X-original-commit: 6af5d669593a4f431d14fce08c6151932f97da82
Since commit 4d23d241bf, there is only one
CoA left for China. No need to have 2 separate modules.
Also, the translation in english was broken.
closesodoo/odoo#41826
Signed-off-by: Josse Colpaert <jco@openerp.com>
Makes it way easier to realise that a cache access blew up because of
a @depends_context('active_ids'), which returns a list, which is not
hashable.
closesodoo/odoo#41863
X-original-commit: 5d2ce1fb3f2f14c9274924d3f4052279671a0c3b
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Set active = false on menu that has a parent
- Delete the parent menu.
It crashes in the unlink method of ir_ui_menu
because it didn't set parent=null on records that are inactive.
Because the search method to get children
of a menu item only returns node where active=true
if `active_test` is not passed in the context to
disable this active test filter.
closesodoo/odoo#41859
X-original-commit: a9c0c1d45583d547754735e857168d5ae27876a5
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Purpose of this commit is to change or set prices automatically on
sale order line based on pricelist currency so removed depands from
currency field.
closes odoo/odoo#31535
Task: 2073790
Closes: #31535
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
purpose of this commit is when the pricelist is chnaged and
some products alredy added to the sale order, display a button
"recompute price" that throws a confirmation model asking for
recompute the price of the so line
task: 1947320
Closes: #31535
Co-authored-by: Mitali Patel <mpa@odoo.com>
Steps to reproduce
* connect as any user with right to edit website;
* go to website and chose a course;
* add content -> chose any of the possibilities;
* click on choose file, select a file and open it;
* click on choose file again, and then cancel
You get a traceback. This is due to the right panel that displays a preview
of the selected file. IN this commit we fix that issue by removing the
preview panel.
Task id 2146217
PR#40895
closesodoo/odoo#41837
X-original-commit: e59b86e6474ae994307952d53f4e5a7571ac1763
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce:
-install point_of_sale
-open a session and make a few sales -> closes the session
-go to point of sale > reporting > sales detail
-select a specific start date and end date
=> the start and end date are ignored by the report
Previous behavior:
the start and end date option have no effect on the report
Current behavior:
the domain is taken into account when generating a report
opw-2149216
closesodoo/odoo#41834
X-original-commit: 157e3fe4d4fb47b33211d1e52116284090b3e01a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
This purpose is achieved in several steps, each done with different
commits to ease understanding
* move emojis mixin and FieldTextEmojis field definition from social to mail
application. Rename emojis namespace accordingly;
* allow emojis support in chat fields through new field widget;
* use this new widget in mass mailing subject field;
* perform some code cleaning;
See sub commits for more details.
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
Related: odoo/enterprise#6630
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
In this commit we somehow clean code related to emojis widgets
* simplify some code bits;
* update comments;
* add an option on the emojis widget to trigger ``onchange`` on a ``keydown``
event;
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
Now that we moved emojis widget from social to mail and allowed its use
within a char field, let us use it for email marketing mailings subject.
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
Currently there is one emojis enabled widget which is based on text widget.
It is therefore limited to ``<textarea/>``.
In this commit we propose to support emojis in char fields, aka using an
``<input/>``.
We therefore move most of the code within a ``FieldEmojiCommon`` and then
creates two widgets based on it
* ``text_emojis`` inherits from ``FieldText``
* ``char_emojis`` inherits from ``FieldChar``
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
PURPOSE
Allow to use the text field with integrated emojis support in other apps
notably mass mailing
SPECIFICATIONS
Move emojis mixin and FieldTextEmojis field definition from social to mail
application. Rename emojis namespace accordingly.
LINKS
Task #2117238
PR #40045
Enterprise PR odoo/enterprise#6630
Install point_of_sale and a localization (i.e. l10n_be) with a tax
configured with 0% and no account.
Assign the tax to a product available on POS. Open POS session, sell
such product, close session and validate. Error message will popup,
blocking the action because the tax used for the product has no
associated account for posting the entry.
This should not be the case because the tax is 0% so it should not be
posted. Skipping taxes based on the amount to avoid the issue.
opw-2155173
closesodoo/odoo#41821
X-original-commit: c7936d2884c10865bfc39a43d30aef6926f29079
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
whenever we crop any image we set few data attributes to the cropped
image but if we change a cropped image from media dialog (ImageWidget)
we should remove crop related attributes from that newly added image
so that newly added image can be cropped with correct data.
since https://github.com/odoo/odoo/commit/a473453b3166a381130d9bd6ec4851b9e1ecab26
we are setting 'crop:originalSrc' data to the cropped image but not
removing from media dialog.
this commit also avoids unnecessary creation of an attachment.
closesodoo/odoo#41779
X-original-commit: 4a15b44243b3edbc7b2350806fea1a58f5734332
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since the purchase_price is now computed, it may be triggered before an
uom is set on the product line (onchanges may happen after computes).
closesodoo/odoo#41808
X-original-commit: 9ebbdd24752a0ff1c1057fc533074555810ffa39
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce:
-install accounting
-go to settings > accounting > check the 'Analytic Tags' and the
'Analytic Accounting' options
-go to accounting > configuration > analytic tags and try to use the search
=> You should be unable to search tags by name (working in 12.0)
Previous behavior:
searching tags by name is not possible
Current behavior:
searching tags works as intended and allows to filter by tag name
opw-2152154
closesodoo/odoo#41807
X-original-commit: bcd4458d57d996aa0812da21e7d03155a4314bcd
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Steps to reproduce:
-install the POS module
-install the Contacts module
-create or use an existing partner as a customer during the pos session
-go to contacts and activate the "customer" filter
-> partners used during the pos session are not showing in the list
The problem was that the 'customer_rank' property
https://github.com/odoo/odoo/blob/d8d7635d6cf2af60791f25201a7bd1c2d5ec238b/addons/account/models/partner.py#L430
was not updated properly after a pos account move was done
Previous behavior
After ending a POS session, partners that are created and/or used
during the session are not showing on the Contacts views when the
'customer' filter is active
Current behavior:
The customer_rank of the partners is increased by one for every sale
during the pos session
Partners created or linked during a POS session are now considered
customers and appear in the contact view when the "customer"
filter is active
opw-2148894
closesodoo/odoo#41792
X-original-commit: 22874376594f94232e0c4ad5a4db3ee76f24b39a
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
PURPOSE
Purpose of this commit is to allow users to look for leads and opportunities
by using the phone/mobile number fields. For example this allows salesmen
working in call centers to quickly retrieve all open opportunities of a
specific caller.
SPECIFICATIONS
Add a phone_search field allowing to implement a search on both phone and
mobile fields.
Allow searching independently from local format used to store the phone number.
Imagine we have leads with phone or mobile number that looks like ``+32 485 11
22 33``. We want to find this lead even when typing ``485112233``.
A custom search method is therefore implemented. It uses only the digits in the
phone or mobile number to perform the search.
A limitation is added on search having to contain at last 3 digits. Indeed
as it returns a domain whose leaf is ``[('id', 'in', ids)]`` it may be huge
for production databases.
LINKS
Task 2122873
PR #40131
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Have user groups specific to eLearning to separate them from generic website
editors. Indeed this is a specific work area and require more than pure design
skills.
SPECIFICATIONS
Two user groups are added in this commit
* group_website_slides_officer
+ can read any course/slide
+ can create a course (will be responsible)
+ can write on its courses
+ can upload slides to the courses he is responsible
+ can publish slides to the courses he is responsible
- cannot unlink courses/slides (you should archive them)
* implies group_website_publisher in order to see the top navbar in
frontend with the publish toggle button and the new content button;
* group_website_slides_manager: has full rights
+ can read any course/slide;
+ can create a course;
+ can add slide to any courses;
+ can publish any courses/slides;
+ can unlink any courses/slides;
+ has access to reporting menu entries;
Rights for other groups are untouched for courses / slides. As a reminder
we still support responsibles being outside of eLearning groups, for example
if an employee is a teacher that handles a course:
* people in upload_group_ids of a channel can upload slides, even if they
don't belong to any eLearning group;
* people responsible of a course can upload and publish slides even if they
don't belong to any eLearning group (done through controller as they
don't have real rights on underlying models);
We choose to keep the survey rights separated from eLearning ones. Indeed
it is easy in odoo to update the imply_ids field of groups if necessary
to link survey / eLearning groups; default user template can also be updated
easily. Standard Odoo should therefore correctly separate those groups. The
only specific rights is that eLearning officers can read all surveys, allowing
to choose them for certification-based courses.
LINKS
Task ID 2062462
PR #39485
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Prevent import on `stock.quant` since the fields are read-only and the
ACL explicitly prevent creation and edition.
opw-2128053
closesodoo/odoo#41802
X-original-commit: 6a9e8faf567b9b0b508ba279405cb0ec80c7538b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Timer test relies on setTimeout(..., 0) for its execution and its
verification. However it seems that in the browser there is *not always*
a guarantee that 2 setTimeout(...,0) will execute in a specific order.
Delaying the verification by 1 ms : setTimeout(..., 1) should force the
order of execution.
closesodoo/odoo#41732
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Removing the test "field changes are correctly debounced in text fields"
because it doesn't represent the reality that fields are not debounced
anymore in production code.
This test was nondeterministic.
Before this rev., this._super wasn't correctly reset after being
called. It means that it was sometimes wrongly set, for instance
in the following scenario:
utils.patch(SomeComponent, {
x: function () {
this.y();
this._super(...arguments); // this._super was still y
},
y: function () {
this._super(...arguments);
},
});
closesodoo/odoo#41691
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
During the fix of the click_all test in community in 0f2a500f0e,
I have overlooked that enterprise used this code and removed a bit too much.
Restore the start flag in enterprise.
closesodoo/odoo#41784
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The inventory button was shown or hide depending of the product valuation.
As the valuation was previously stored on the stock moves and posting
split the stock moves. Fifo and Avco valuation was not well computed.
The migration to stock valuation layer fixed this behavior. This
commit shows the post inventory button as soon as there are some
finished move to be posted.
task : 54665
closesodoo/odoo#41781
X-original-commit: 5dfa3f817d3a9f47a863a587569a862a40c7d159
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
The valuation stat button was shown only at validation of the manufacturing
order. If an intermediary inventory is posted. A part of the stock moves
are validated so some stock valuation layer are generated.
This commit shows the valuation button as soon as some valuation layers
are linked to those validated stock moves.
Task : 54665
X-original-commit: 7f67af93299c449ba80489a84ed0b13930edff90
The commit 75460e697a was introduced in
v12, when the workorder stored their consume data on stock.move.lines.
Their was an issue when posting intermediary inventory on productions
using workorder. As those 'dummy' stock.move.lines did not have their lot
field filled, an error at line validation was raised.
In v13, the workorders use workorder lines. The lots and quantity are
transfered on real stock move lines only at the end of the production.
Posting intermediary inventory did not failed anymore in case of partial
production
Task : 54665
X-original-commit: a41239b378a1cae394d18f43e991ec8bceeac826
To be able to detect issues in .pot like at #41364 due to bad .pot
file (cf fix at #41650)
closesodoo/odoo#41778
Related: odoo/enterprise#7200
Original-signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
X-original-commit: ba39590b004655df55d5d182c4ad50caa7f583c1
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
12:00 AM is midnight and 12:00 PM is noon.
opw-2154640
closesodoo/odoo#41763
X-original-commit: e0df98d872c0feefbd31b119136057b7c36d81f3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The `text` attribute is not translatable, so we support the `title`
attribute which is.
Fixes#38568
opw-2148416
X-original-commit: 21203ec63db6702529a791f5abab317c6d4fb8af
return empty string instead of None to avoid `TypeError: argument of
type
'NoneType' is not iterable`
closesodoo/odoo#41772
X-original-commit: dd65c9fd7213f3d780a733e67390b2ae59f0f526
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
Install POS, create a product available in POS, tracked by Serial
Number.
Add some product to the inventory.
Open the POS session, sell the demo item, close the session (do not end
the session, just close the interface).
Go to POS orders, select the last order and click on "Return Products",
the refund will be created.
The user will be unable to process payment for the refund order because
Serial Number is missing. Adding a copy of the lot from the original
order line fix the issue
opw-2152776
closesodoo/odoo#41762
X-original-commit: 886dee9efc3bd743ca1b9353872021c1f81efa9a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Deleting a payment will prevent the POS session closing.
opw-2155093
closesodoo/odoo#41752
X-original-commit: a6927e31af53f28c04eb567db0da396ad07e7206
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
PURPOSE
This commit 62ac23f0b9 introduced SMS capabilities on for
event.type.mail and event.mail models.
Values of event_type_mail_ids on event.type are supposed to be copied to
event_mail_ids on event.event when changing the event_type_id of an event.
There are however 2 issues with that integration:
- The 'notification_type' field was not correctly set on default
event_type_mail_ids on event.type;
- The 'notification_type' and 'sms_template' fields were not copied from
event_type_mail_ids to event_mail_ids;
LINKS
PR #39892
Task ID 2115792
closesodoo/odoo#41736
X-original-commit: 3fd66d844aa66ca8d54223071c787974e6c88c94
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Go to Accounting > Vendor Bill, pay via check, view the invoice and
click on 'Print Check'. The widget will popup but as the 'next check
number' will always display 1.
This append because the model of account_payment has changed
https://github.com/odoo/odoo/blob/13.0/addons/account_check_printing/models/account_payment.py#L28
and now check_number is a char so it will not sorted correcly by the
database.
To avoid doing a lot of strings manipulation it is convenient to
store the check number as integer, with proper default case
Followup of opw 2151242
closesodoo/odoo#41659
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before that, an empty account.bank.statement.line recordset was passed to the function, and caused the recordset containing the currency to use to also be empty, eventually leading to a rounding value of 0, which raised and error.
closesodoo/odoo#41474
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before this change, it was not possible to a user to change its own
language via the Preference view.
In order to allow a user who does not have access rights on the
res.users model to modify his language (field included in the list of
SELF_WRITEABLE_FIELDS fields) it is necessary to force the reandly
attribute to False in the view used to edit the user's preferences.
opw-2151630
Closes#41412closesodoo/odoo#41748
X-original-commit: 272bff9e3173e1ed5da5d5a87e4c7be53ad59700
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>