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>
Steps to reproduce:
1. add a paragraph
2. add a blockquote
=> the cursor will jump in the paragraph
This commit fixes a bug detected when inserting a blockquote. The cursor
jumps to nearby paragraph on insert, and other issues.
The cause of the bug is tied to the fact that we rely on a complex behavior
when inserting paragraph related elements (within the insert command).
The way to make blockquote behave like the other paragraph related
elements is simply to add it to the list as done in this commit.
Task-3383441
closesodoo/odoo#134700
X-original-commit: 8195beacbd878c56bc93290bc03665e30667e177
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Previously we removed some code related to handling errors in legacy
RPC, that would wrap errors in an object and give them an event that
could be defaultPrevented to mark the error as handled, but this code is
still needed. This commit restores it.
closesodoo/odoo#134693
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This util was used in :
- owl_dialog_tests
- field_one2many_tests
- relational_fields_tests
- gantt_tests (enterprise)
These files are now converted to WOWL.
closesodoo/odoo#134684
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
In order to fix wrong url recognition, improve the url REGEX by:
- Recognize an url with a dot at the end in the string
`www.google.be.`. It was not recognized before this commit.
- Do not allow a special character after an url that is not
separated by "/", "?", or "#". Before this commit, the content
`www.google.be!` would have been recognized the url as
`www.google.be!` instead of `www.google.be`.
- Do not include in the url some character if they appear at the end.
The chars are:
- .
- ,
- }
- )
- ]
- '
- "
task-3373367
closesodoo/odoo#134660
X-original-commit: 0327ed28e855c89f9c13266c4aba5c99d80263ac
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this PR, it was not possible to scroll a chat window using page down/page
up, home or end keys.
This is because the thread component that is scrollable cannot became an activeElement.
This PR fix this by adding a tabindex="-1" on the scrollable element.
Task-3468978
closesodoo/odoo#134657
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
At the moment, the point_of_sale module has 3 different implementations of
numpads. This is absurd. In this PR we unify them all into a single
numpad component.
One of the reasons why there are multiple numpads is because each requires
a slightly different set of buttons. The new `Numpad` component provides
a simple API which allows the consumer to specify what the buttons should be.
This is done by proving the `buttons` prop, which has the following type:
```js
buttons: {
type: Array,
element: {
type: Object,
shape: {
value: String,
text: { type: String, optional: true },
class: { type: String, optional: true },
disabled: { type: Boolean, optional: true },
},
},
}
```
In this PR we also provide a simple set of helper functions for the tours
and adapt all of the existing tests accordingly.
closesodoo/odoo#132245
Task: 3470346
Related: odoo/enterprise#46427
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>