Steps to reproduce:
- Create a serial tracked product
- Update quantity add random SN
- Edit "ir.sequence" for serial numbers
(search sequence with dev mode enabled)
- Add a prefix for exemple "xx%(doy)sxx"
- Manufacture the product and generate new serial
Bug:
if a serial already exist next number in the sequence will be generated
instead of using the sequence
Fix:
apply same logic than for lots i.e. first generate from sequence then
take next number if it already exists
opw-3291532
closesodoo/odoo#134879
X-original-commit: df96d9ca10c576981f6af79e330b5b46cdeea377
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Before this commit, if you added a domain to a loyalty reward with
one of many2one fields like [("categ_id", "ilike", "test")], it wasn't
possible to open the PoS.
This commit addresses this limitation by replacing the many2one fields
with their corresponding value. To do this the product's field type is
loaded to ensure that this improvement applies exclusively to many2one
fields.
However, it's important to note that this improvement currently handles
only "one-level" of related many2one fields. Any domain that appears
like ("categ_id.foo", "ilike", "foo-val") won't function as expected.
opw-3473103
closesodoo/odoo#134811
X-original-commit: d0a6ab8d1f89f0dd2aa6641c63b6973ae7c753ad
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Steps to reproduce:
- Install Attendances app and Employee app
- Setup an employee with a contract which work entry source is from
attendance
- Change the working schedule to different timezone, for example
Asia/Hong_Kong
- By default the working schedule should be start to work from 0800 to 1700
- Now create an attendance in the first day of the contract, i.e.
1st May 2023, check in time 0700, check out time 2000
- The total work hours should be 13
- However, in the work entry, the genearted work entry is 0800-2000, only
12 work hours.
Current behaviour:
The generated work entry mismatches the value of the attendance
Expected behaviour:
The work entry should match the attendance
Explanation:
This issue is casued by the timezone issue. When the system generate
the work entry, it will calculate the date_from datetime and date_to datetime.
Then it will compare between the attendance and the date_from datetime to choose
the larger datetime to put inside the work entry as start time.
However, the date_from datetime didn't consider the timezone of the working schedule.
In the above example, Asia/Hong Kong time is UTC+8 time. Therefore if we convert
the attendance time back to UTC time. It is check in time 30 April 2023, 2300 to
check out time 1 May 2023, 1200. In the mean time, if we compare between the date_from
datetime (1 May 2023, 0000) and the attendance check in time (30 April 2023, 2300).
The system will take the date_from time and therefore the generated work entry time
is incorrect.
task-3468012
closesodoo/odoo#134533
X-original-commit: 2baf4e3ebcd9ce3beb47ee2881aa3e8bd8a74cbf
Related: odoo/enterprise#47007
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
To reproduce
============
* referrals -> configuration -> rewards
* try creating a new reward keeping description empty
* here description is required html field
* traceback on clicking save
Problem
=======
in case of html field, `this.data[fieldName]` is an object `Markup{''}`,
so `!this.data[fieldName]` is always `false` as objects are considered
as true value in JS.
Solution
========
in case of html, check the length of the Markup object
opw-3469539
closesodoo/odoo#134365
X-original-commit: dce8e1a8b6137c035488240f8004b870b73c8d51
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
Co-authored-by: Niyas Raphy <https://github.com/niyasraphy>
Steps to reproduce:
- Install eLearning module
- Create a course with 2 slides and publish them
- Add a user as a member of the course
- Complete the first slide
- Add a new slide to the course and publish it
- Go to course and click on `Attendees` stat button
Issue:
The member completion percentage is not updated.
Cause:
When (un)publishing a slide, only the current user that publish the
course have his completion percentage updated.
Solution:
When (un)publishing, (un)archiving, unlinking or creating slide(s)
(slide must be published for the creation case), or when user mark
slide as (un)completed manually, update the completion percentage of
all members of the course except the members that already have
completed the course.
From version saas-16.3 we do not need the custom context key we
introduced in 94e2dd2 because we will not update the completion
percentage of members that have completed the course even if they
manually mark a slide as uncompleted.
opw-3225707
closesodoo/odoo#134845
X-original-commit: 2796b3163c02306f1309e2dde764fff2f1b287cc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
When passing a date out of the current as a props to the DateTimePicker
component, the chosen date is actually set but the calendar doesn't
rerender to display the corresponding month.
This commit fixes this behavior to properly focus the date's month.
closesodoo/odoo#134844
X-original-commit: 9dbb35479615f5aef7b22f21bf9f58f176874886
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Before this commit, when pinning an old message from thread,
then page reload then click on pinned message link in
notification message in thread at time of pinning message,
it fails to jump to the pinned message.
This happens because the message is not in the store, therefore
it attempts to jump to message `undefined`, which doesn't exist.
This commit fixes the issue by inserting the message before
attempting the highlighting that will jump to the message.
closesodoo/odoo#134818
X-original-commit: 70769963d240add98ed2ee231412201434a825ba
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This traceback raises when user tries to create payment without payment date.
To reproduce this issue:
1) Install 'account'
2) Open any existing invoice (not a DRAFT one)
3) Click 'REGISTER PAYMENT' button.
4) Now remove 'Payment Date'
Error: 'Expected singleton: account.payment.term()'
Note:- 'TypeError: unsupported operand type(s) for +=: 'float' and 'NoneType''
is also produced for some invoices.
When user removes 'payment_date' '_compute_amount' method will be called, In which
'_get_total_amount_in_wizard_currency_to_full_reconcile' method is used.
In '_get_total_amount_in_wizard_currency_to_full_reconcile' method,
'_get_total_amount_using_same_currency' is used to get total amount.
On '_get_total_amount_using_same_currency' method payment_date is passed as an
argument for '_is_eligible_for_early_payment_discount' method.
See: https://github.com/odoo/odoo/blob/ed2e26633458f1284437286f71eba43c8d1818a7/addons/account/wizard/account_payment_register.py#L490-L498
On '_is_eligible_for_early_payment_discount' method if no reference date,
its returning True. which leads to above traceback
See:
https://github.com/odoo/odoo/blob/ed2e26633458f1284437286f71eba43c8d1818a7/addons/account/models/account_move.py#L1902-L1905
sentry-4337953422
closesodoo/odoo#134721
X-original-commit: a05be50b9cf75fb0226f7b464b3a8f580465d462
Signed-off-by: Laurent Smet (las) <las@odoo.com>
This commit adds the discuss message features to the livechat
threads:
- Edition/deletion of messages
- Reactions
- Replies
It also improves the history view present in the channel form view
by showing replies.
task-2742676
closesodoo/odoo#133456
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Removed the `ListRenderer` overload in `payment_term_line_ids.js` to fix
an issue where trying to set `this.props.list.editedRecord` to null was
causing a stack trace error when navigating away from a Payment Term
lines.
The original intention was to prevent the discard of new records when
clicking outside of the list, especially when the user is not required
to edit something on the newly created record.
It has been replaced by an overload `X2ManyField` component making the
`AddInLine` method mark all the new records as `dirty` by calling the
`update` mehod on them with an empty object to prevent them from being
discarded.
closesodoo/odoo#132257
Task-id: 3460696
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
This commit fixes an undeterministically failing tour.
`test_form_view_resequence_actions`
*Reason*
This test tour prepares some data before running the test.
The data preparation missed to specify the sequence of the actions.
*Fix*
The sequence is now set in the data preparation.
This reflects the way the form view would create the
actions if they were created through user input.
See the `canResequence` part in `_createNewRecordDatapoint`
inside `@web/model/relational_model/static_list`
Fixes runbot error 24578
closesodoo/odoo#134802
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
before this commit, the create/new button is shown in
the payment provider form, where us it is removed in
the kanban and tree
after this commit, the create/new button will be removed
from the form and users can use duplicate option to create
new provider
closesodoo/odoo#134779
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit fixes the "website_livechat_chatbot_flow_tour" which was
nondeterministic. This was due to the message service update which was
assigning data blindly based on the payload instead of handling it
properly. This is solved by enriching the chatbot step instead of
overwriting it.
runbot-24625
closesodoo/odoo#134778
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit fixes a tour that is failing undeterministically.
- Before
The tour was saving a form dialog just before saving the main form.
Sometimes, these two steps were too fast, leading for the second one
not performing the main form save action.
- After
The second step now awaits that the modal is closed before running.
This element is the kanban record saved by the form dialog.
Fixes runbot error 24576
closesodoo/odoo#134776
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Issue:
Currently there is no alignment between radio button and value,
we fix this commit.
Fix:
We move the input box inside the label.
step:
- Install sale app
- Create product(test) and add Attributes & Variants
- Select Brand (Display Type: radio) Attributes and add value
- Create sale order and add product(test)
- Check Configure
closesodoo/odoo#134734
X-original-commit: 9e32999d3eea96da6d0ab39642e3f2d612a8690a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit, emoji and gif pickers were handled as 2 different
pickers. They had dedicated buttons. This made composer quite
bloated, especially in chat windows were size is narrow.
Also the pickers were always displayed as popover, which is not the
best way to show content in mobile.
This commit improves those pickers in discuss so that only a single
button is present (emoji button). Clicking on this button shows a
picker that groups the emoji and gif picker, both of which can be
selected in the header of the grouped picker.
In mobile, instead of showing a popover, it now shows the grouped
picker below the composer. This makes it show where the soft keyboard
is present in mobile, making it easier to input emojis or gifs on
those devices.
This commit also added slight style changes to both pickers. Notably,
the search bar has an improved style that makes it look good when
next to the composer text input, especially in mobile layout.
task-3015707
closesodoo/odoo#123671
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
With the new version of raspios the timesyncd service is not
correctly stopped during a shutdown or a reboot.
Here 'timedatectl set-ntp true' enables and starts
the first existing network synchronization service
closesodoo/odoo#134797
X-original-commit: b0669ec60095ae4d28276fbef0ae9e1e0197626f
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Problem
---------
Before 16.2, the fields were empty, which meant that the expense and
income accounts of the chosen category could be used.
Since 16.2, when a product is created, the expense and income accounts
are automatically pre-filled.
Objective
---------
This task aims at retrieving the old behavior to allow using category
accounts.
Solution
---------
Remove the `property_account_expense_id` &
`property_account_income_id keys` in `_get_xx_template_data` in all
localization packages that define them.
task-3438931
closesodoo/odoo#134796
X-original-commit: dae46c926d5e63683968107f06bf2bfb8e07d267
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
This commit tried to remove owl_compatibility completely but its last
uses are either in refactoring or a bit complex to migrate. Instead of
removing the helpers completely, this commit simplifies them a lot and
makes them more readable and safe.
closesodoo/odoo#134295
Task: 3439226
Related: odoo/enterprise#46899
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: mass_mailing,website,website_sale
Before this commit, the ComponentWrapper was used to mount some
components which then render a dialog. This commit replaces these cases
by using the dialog service.
Task: 3439226
Part-of: odoo/odoo#134295
Some strings are missing in the pot file and are therefore not
translated. This commit updates the pot file to the latest changes.
closesodoo/odoo#134039
X-original-commit: 22045d368a7beb72dc5330054dfa201c3c047e6f
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Rationale:
- allow mass changing languages (in case you want to remove one lang)
- allow quick company re-assign
Other fields are marked as readonly to avoid messes.
Task-3494874
closesodoo/odoo#134786
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Before this commit, when opening a record with some attachments
and attachment box is open, switching to a record without any
attachment shows the attachment box open.
This is a problem because the attachment box is designed to only
be open when there are some attachments. The toggler for showing
attachment box is instead an "upload file" button when the record
has no attachment. This means that the open attachment box in those
records without any attachment cannot be toggled off.
This commit fixes the issue by automatically closing attachment box
when the record has no attachments.
Task-3493374
closesodoo/odoo#134771
X-original-commit: ab678ea7618ca1aee5a6ab31b2de59c87fcce32c
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
BSB definition is now moved from enterprise (l10n_au_aba) to l10n_au.
BSB is not limited to ABA bank interactions.
As such, it is useful to define this and allow validation in
l10n, making it available to users who are not using ABA files.
closesodoo/odoo#134321
Related: odoo/upgrade#5111
Related: odoo/enterprise#46914
Signed-off-by: William André (wan) <wan@odoo.com>
Hitting the "new" button in the tree view (in enterprise) was crashing because of the changes introduced on the display name computation. It is now also computed on 'new' records, when no field is set at all: this caused this function to try concatenating None with an empty string.
closesodoo/odoo#134172
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Steps to reproduce the bug:
- Drop a "Text-Image" on the website.
- Add a shape on the image.
- Replace the image.
Problem: The image version selected by default is the original one
instead of webp.
Because the mimetype of an image with a shape is `image/svg+xml`, a
condition has to be added in order to convert its format and its width
at the `_autoOptimizeImage()` call.
task-3449866
closesodoo/odoo#133517
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
Before this commit, the livechat was still using a dedicated
route to fetch messages on page load. Since [1], visitors are
actually mail guest so they can access the classic mail route
in order to do so. This commit adapt the livechat code to use
this route instead of the custom one.
At the same time, this commit simplify the livechat service.
part of task-3332628
[1]: https://github.com/odoo/odoo/pull/129770closesodoo/odoo#133430
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Prior to this commit:
When generating a sale order/purchase order report, all rows, including those
with entirely null values included in the report i.e. the entire matrix is
displayed.
Post this commit:
The sale order/purchase order report is generated with only the rows with at
least one quantity is added, rather than including the entire matrix.
closesodoo/odoo#132045
Task: 2860388
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Purpose
=======
Allow to group records by their property values,
like we can do with normal fields.
Technical
=========
Because there's no foreign key, when we group by a relational property
we need to check the existence of the ids in the query (and same for
selection and tags, because we might have value of a deleted
option / tag in database).
Task-3032464
closesodoo/odoo#103510
Related: odoo/enterprise#38778
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Add tests about the group by properties feature, the drag and drop
and the behavior in the pivot view.
Task-3032464
Part-of: odoo/odoo#103510
Purpose
=======
Allow to group records by their property values,
like we can do with normal fields.
Technical
=========
Because there's no foreign key, when we group by a relational property
we need to check the existence of the ids in the query (and same for
selection and tags, because we might have value of a deleted
option / tag in database).
Task-3032464
Part-of: odoo/odoo#103510
Purpose
=======
Currently, it is possible to use some bad characters in a property name
by writing directly on the parent (not via the child).
It's possible only with RPC call and it wasn't an issue because we
recheck the name anyway before using it in SQL query (but it should be
cleaned).
We also restrict the maximum length (there's nor reason to use
huge property names).
Task-3032464
Part-of: odoo/odoo#103510
Purpose
=======
Allow to use `default_properties.xxxxx` as a context key, to set the
default value on a property. We need that because when we group by
a property in a Kanban view, we can create new record in a given
column, and this process will set this context key.
Task-3032464
Part-of: odoo/odoo#103510
Summary
-------
This commit addresses an issue where fixed taxes were not calculated
correctly when applied to a line with a price of 0.
Steps to reproduce
------------------
1. Create a fixed tax with an amount of 5.
2. Create an invoice with a line having zero price and apply the fixed
tax.
3. Save the invoice. You should have a total of 5.
4. Change the quantity of the invoice line, to something like 2.
5. Save the invoice.
We expect the total to be 10, but we get 5.
opw-3212536
closesodoo/odoo#134762
X-original-commit: 2aafff6a36bd40719de9447a7ab9bf05274ff5d2
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
When creating an account payment with {"journal_id": False} in the values parameters,
a default journal is searched.
However, the found journal is directly overridden by the value in the parameters (i.e. False),
which triggers an error when trying to create the linked account move, because it violates
the not-null constraint on that field.
The default journal should only be overridden if its value in the parameters is not empty.
sentry-4286778702
closesodoo/odoo#134733
X-original-commit: dc26c686ab57119a15763d87effb27d9103927cf
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
Before this commit, when opening emoji picker and scrolling down
then making search, the scroll position was not reset to top.
This gave the impression that the search was incorrect, because
the most likely desired emoji is at the very top but was not visible
when searching in this condition.
This commit fixes the issue by enforcing scrolling top in emoji
picker content when the search term is updated.
Task-3493611
closesodoo/odoo#134675
X-original-commit: 7999ae51c51e24eea15edb8f08b2e35db4a774ad
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*account,web_editor,website,website_sale,website_slides
This commit removes all legacy utils except Markup, which will be
removed in another PR. A lot of those utils were no longer used and
thus have just been removed. Those that were still used either
already existed in the wowl codebase, so usecases have been adapted
to use the new version instead. A few have been re-implemented (or
moved basically) to the wowl codebase (e.g. isEmail and humanSize).
Part of task~3439226
closesodoo/odoo#134620
Related: odoo/enterprise#47044
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Previously, when creating a new customer from the POS interface, if
the default language was not changed in the form, an empty string
would be sent to the backend. This resulted in the new customer not
having a language set.
This commit establishes the default language selection as the user's
selected language when creating a new customer within the POS system.
opw-3466525
closesodoo/odoo#134613
X-original-commit: 82e4dc110fdd9f3a8b58e473474eb13709ddc7a4
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
For some localization, an invoice is created automatically when creating
a pos_order. This leads to a PDF being donwloaded for every pos_order
done during a session which might be annoying for the cashier.
This commit adds a method that is meant to be overriden by those
localizations so that this invoice is not printed everytime.
closesodoo/odoo#134268
X-original-commit: f5b4d588d18d8eda15d5e5f2f4353a3f05402888
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
In DM chat, the im status turns into typing icon so it was not
a problem. In group chat and channel, however, there was no way
to see typing members in chat window.
This commit adds explicit small text above composer in chat window
to list typing members of conversation.
Task-3474778
closesodoo/odoo#133757
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When we go to the simple user view, no need to show "Create Employee"
option unless we are inviting a new user. Also, to standardize the
behavior, we remove the context that conditionally used to hide the option.
Moreover, we add smartbutton leading to the related employees' view to the
simple user form view.
task-3334739
closesodoo/odoo#122870
Related: odoo/enterprise#41646
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
List of improvements:
- Add `Is a Kiosk` field when creating a new POS config
- Add category and change the image of the combo demo product
- Hide useless settings when kiosk mode is enabled
List of fixes:
- Fix bootstrap carousel traceback when no image is set
- Changed the warning sentence concerning adyen payments
- Fix start category in kiosk
- Fix sync between Self Order mobile and PoS restaurant, now new Lines
from restaurant are added to the mobile order
- Fix product reminder when adding something in PoS mobile
closesodoo/odoo#134508
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
The goal of this PR is to improve the readability of expense receipts on
hr_expense and hr_expense_sheet.
This PR do the following:
- Add the expense name next to the filename
- Vertically center the receipt on both model (was previously done in hr_expense
but not for the sheet)
- Make sure the title doesn't get hidden by the image (was previously done in
hr_expense but not for the sheet)
Also, to achieve the first point we had to modify the attachment so that we can
retrieve easily the information of which line the attachment is attached.
closesodoo/odoo#130181
Task: 3443067
Signed-off-by: William André (wan) <wan@odoo.com>