Commit Graph
154210 Commits
Author SHA1 Message Date
Pierre Rousseau c873acc6dd [REF] spreadsheet: rename plugins
Before this revision, it was quite confusing to know which plugin was
the Core one and the UI one.
Having {Pivot|List}CorePlugin and {Pivot|List}UIPlugin is self explanatory.

Part-of: odoo/odoo#100198
2022-09-15 16:08:18 +02:00
Xavier Morel 9bcc30be8d [FIX] auth_password_policy: remove validation in meter
Not sure what I was thinking (there was no chance the validation would
be structural, probably didn't think about the validation itself).

Possibly thought of creating a proper `Recommendation` type then ended
up not doing it, but left the props types in.

closes odoo/odoo#100206

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-09-15 13:38:49 +02:00
Xavier Morel 598492ef4d [FIX] auth_password_policy_signup: port to modern js and fix
b3b85cae9b unwittingly broke
auth_password_policy_signup when it ported everything to owl.

- move the CSS file back to assets_common
- reintroduce the old password gauge, moved over to signup (as it's
  not used anymore by auth_password_policy), and converted to modern
  JS style
- convert signup_policy to more modern JS style (for consistency)

Manifest file doesn't need to be updated because it globs.

closes odoo/odoo#100169

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-15 13:38:46 +02:00
Aaron Bohy 66d9fe67a6 [FIX] web: Many2OneField: do not display a link if unset
Before this commit, an empty many2one field in readonly rendered
an empty `<a href"...">` node. Even though that link was no visible,
it had a non null width, and was thus clickable (the cursor changed
when hovering it). When clicked, it opened the form view of the
comodel, in create mode.

This commit fixes the issue by not rendering anything if the value
is false.

closes odoo/odoo#100158

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-15 12:41:07 +02:00
John Laterre (jol) 8d08677b0d [IMP] base: add div on country_id
The purpose of this PR is to inline the "Validate" button
with the `country_id` field on the partner form view
when using Avatax.

task-2947705

closes odoo/odoo#100093

Related: odoo/enterprise#31277
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-09-15 12:41:02 +02:00
Antoine (anso) ff0b2d4412 [FIX] web_editor, web_unsplash: media dialog bs5 migration
Make sure there is no migration issue in the module. Adapt the design
to ensure visual consistency. Remove custom SCSS and use BS classes
when possible

task-2950589

closes odoo/odoo#98706

Related: odoo/enterprise#30616
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-15 12:40:55 +02:00
Antoine (anso) 68f1c90a03 [IMP] web: make "notebook" component more consistent
"Notebook" component had to be adapted to make the use of tabs
more consistent trough the app. The component now allows a use of
default tabs style in a vertical display

task-2950591

Part-of: odoo/odoo#98706
2022-09-15 12:40:55 +02:00
Stefan-Calin Crainiciuc (stcc) fff916da1b [FIX] account: tax line in invoice report
Steps to reproduce:

- Accounting > Customers > Invoices > Create
- Add one product line with tax 15% and one with no tax
- Print > Invoices

Issue:

In the report, the 15% tax is applied correctly on the first
product, but the taxed amount is not displayed. This is because lines
without a tax are not being considered as a separate tax group.

Fix:

Add an additional condition in the xml to check if the amount of taxed
money is equal to the invoice value. If not, then only a part of the
invoice amount is being taxed, so it must be displayed.

can be considered a forward-port of e213dab810724985dd62fb5f9a57f2bf6686a491

opw-2945837

closes odoo/odoo#100190

X-original-commit: 51064f233ca65b98d34503e2a11481d64ae8436a
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2022-09-15 11:05:37 +02:00
Arnold Moyaux 32ea90106d [FIX] stock: _compute_qty_order should not take environement context
savepoint do a flush that throw the current context and then recompute
the stored field (with a random matching context from the transaction).
In the case of qty_to_order, it will call qty_forecast and then
_compute_quantities on product.product.

Currently it will call _compute_quantities with a mix of self.env.context
(from the transaction) and a context generated from the orderpoint (with
deterministic data). But sometimes in the context took from the
transaction it could remain some other key used by _compute_quantities
(e.g. warehouse_id). Since qty_to_order doens't depends from context
it should not use self.env.context and only use the deterministic
context from the stock.orderpoint

closes odoo/odoo#100150

X-original-commit: 79694a88978ebc1213d6ba0ac0dcc59640f16d04
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-09-15 11:05:31 +02:00
Romeo Fragomeli 14d170e38b [IMP] web: set the barcode icon more generic and more Bootstrap usage
closes odoo/odoo#100082

Related: odoo/enterprise#31273
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-15 11:05:23 +02:00
Romeo Fragomeli b6a36df34a [IMP] web: convert many2one_barcode to OWL
Before this commit there is a widget `many2one_barcode` that allows
to scan a barcode.

After this commit, we have converted it to OWL, but it's more than a new
component. From now, the logic is in the basic Many2One as a
property/option (`canScanBarcode`) and we also have the equivalent
Component (`widget="many2one_barcode"`). This choice has been made to
support multiple use cases (e.g. having the product_configurator and the
barcode on the same product field).

Note:
now we use the `browser` class to allow to patch the browser feature
during testing.

Part-of: odoo/odoo#100082
2022-09-15 11:05:22 +02:00
Romeo Fragomeli 71a3048ec1 [MOV] web: move Barcode scanner to community
Move all file related to Barcode scanner (JS/XML/CSS)

Note: also the CSS class is renamed as it's not related to mobile
exclusively

Part-of: odoo/odoo#100082
2022-09-15 11:05:22 +02:00
Brieuc-brd 795891484a [FIX] web: restore checkbox/radio style
Since https://github.com/odoo/odoo/pull/98770, the style of checkboxes
and radio buttons has also been simplified. This simplification makes
them less readable.

To fix that, this commit restores the previous style for checkboxes
and radio buttons.

closes odoo/odoo#99632

Related: odoo/enterprise#31092
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-15 11:05:12 +02:00
Victor Feyens d41ed0b17e [FIX] payment,*: unable to access the documents of your companies
Task ID - 2960827
opw-2954181

closes odoo/odoo#99512

X-original-commit: 42ea4244692dc4b6e1f5917a715b1552bd223928
Related: odoo/enterprise#31037
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-09-15 11:05:07 +02:00
Pablo Montenegro a71951b44e [FIX] l10n_ar_edi: FCE Is Cancellation Field
This commit makes FCE Is Cancellation Field inivible in non Argentinean Companies

closes odoo/odoo#99339

X-original-commit: da6b17dec3a4b13e3bf1b1cf5557aa8267f236a6
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-09-15 11:05:03 +02:00
Yolann Sabaux 19ed75ddab [FIX] mail: revert upload_attachment fix
Cookies should be used internally by the web UI. The server-side is not supposed to be aware of it at all.

Reverts:
odoo#88745

Based on odoo#93812
discussion. It has been decided to revert the fix to avoid further unattended behaviours.

closes odoo/odoo#100178

X-original-commit: bdde7dda7356744d459e3991a7f382fee42bf8c5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2022-09-15 10:03:09 +02:00
Pierre Rousseau e55cc83068 [IMP] spreadsheet_dashboard: css tweaking
closes odoo/odoo#100083

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-15 10:03:06 +02:00
Pierre Rousseau 3860e8bca6 [FIX] spreadsheet_dashboard_account: use correct field to filter on
closes odoo/odoo#100076

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-15 10:03:03 +02:00
Pierre Rousseau 7101ebb9f7 [FIX] spreadsheet: correctly apply filter on chart in dashboard mode
Before this commit, a global filter did not update the domain of a chart
in dashboard mode.

Task-id 2961578

closes odoo/odoo#100047

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-09-15 10:03:00 +02:00
Thibault Delavallée 2971dc0a98 [FIX] sale: fix usage of message_post_with_template in batch
Sending confirmation email is generally done on a singleton recordset but
some calls could end up calling in batch. Anyway better safe than sorry.

Task-2710804 (Mail: Clean MailThread API)

closes odoo/odoo#100137

Related: odoo/enterprise#31301
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-15 01:23:27 +02:00
Thibault Delavallée 3cdc217736 [FIX] purchase_requisition: fix usage of message_post_with_view in batch
In order to post on a document, ``message_post_with_view`` should be called
on a singleton recordset. Otherwise it is done as a mass mailing which is
not really what is expected here.

Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#100137
2022-09-15 01:23:27 +02:00
Thibault Delavallée c1f1333d88 [FIX] mail: set 'email' message_type when sending mass mailing
When using the composer in mass mail mode, no explicit 'message_type' is given
to created 'mail.mail' records. By default those are set to 'email'.

In this commit we make it explicit, as it may change in a near future. This
type is not really 'notification', 'comment' or 'user_notification', so using
'email' is fine currently. It is used more for incoming emails but we don't
distinguish outgoing emails currently.

Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#100137
2022-09-15 01:23:27 +02:00
Thibault Delavallée a067791594 [FIX] gamification: fix usage of message_post_with_view
Gamification code is currently using ``message_post_with_view`` a bit weirdly

  * on a not mail-thread enabled record (using model / res_id propagated to
    composer which allows it);
  * using mass mail composition mode (aka creating directly mail.mail);
  * based on a template;

This is basically achieved with ``template.send_mail()`` method.

Task-2710804 (Mail: Clean MailThread API)

Part-of: odoo/odoo#100137
2022-09-15 01:23:27 +02:00
Simon Genin (ges) ddfd141165 [FIX] web: use command hook in component
Before: the command service was used inside components instead of the
hook. It introduced problems as the commands were not unregistered.
The commands were added multiple time to the registry.

closes odoo/odoo#100135

After: It uses the hook, "it just works".
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-15 01:23:21 +02:00
William Braeckman df51898abd [IMP] delivery_mondialrelay: use loadJS util function to load lib
closes odoo/odoo#100134

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-15 00:30:28 +02:00
Alexandre Kühn 486cd602fc [FIX] mail: guard ChatWindow/onClickHandler (nightly build failure)
closes odoo/odoo#100132

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-09-15 00:30:26 +02:00
Laurent Stukkens (LTU) a68cc656e8 [FIX] sale_timesheet: prevent undeterministic error in tour
Prior to this commit:
- Some of the `trigger` on a many2one fields where made on
  `ul.ui-autocomplete > li:first-child > a` which could lead
  to click on the loading if the rpc was not yet finished.
- A text command `Text` was used instead of a click as it is
  the default behavior for input elements.

This commit ensure that the `loading` is not taken by the tour
and that a click is done instead of a text command typing `Text`.

closes odoo/odoo#100125

Related: odoo/enterprise#31309
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-15 00:30:20 +02:00
Pierre Masereel e01137bc21 [FIX] point_of_sale: apply payment terms on invoices from POS
When an invoice is generated from the POS there are no payment terms and
due dates put on the invoices. It was not really an issue before the pay
later feature, but now it is needed.

closes odoo/odoo#100189

X-original-commit: ed49bc766cf6956691ca87be50f352247828453f
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-09-14 23:38:11 +02:00
Thibault Delavallée 94208cb8b4 [IMP] test_mail: improve coverage of post helpers
Purpose of this commit is to add some test about MailThread helpers built on
top of ``message_post`` / ``composer`` (log, post with view, ...). Some tests
about batch are also added.

Some performance tests are also added for those helpers.

Counters are updated. Note that they did not change, it is just an update
based on current master counters.

Task-2710804 (MailThread Api Cleaning)

closes odoo/odoo#100184

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-14 23:38:05 +02:00
pedrambiria 6da353d66f [FIX] point_of_sale: remove "willstart" for a performance issue
Before this commit: if the number of contacts is enormous, and the
"Limited Partners Loading" with "Load all remaining partners in the
background" is enabled, clicking on the product information button would
take lots of time to reload. Also, it would cause the same issue for the
"ClosePoSPopup".

The problem is that when "willstart" takes time more than the background
process it would call it again, and for every call.

The solution is to prepare the "willstart" function's data and pass it to the
constructor.

opw-2956104

closes odoo/odoo#100177

X-original-commit: 940c72d0a058240f75d3f2673a4145e8c1a0921a
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-09-14 23:38:02 +02:00
William Braeckman 1e09eaea73 [FIX] loyalty: fix use of invalid widget
The widget `many2one_tags` tags was used in the loyalty program form
view, however it does not exist.

TaskId-2982239

closes odoo/odoo#100170

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-14 23:37:58 +02:00
William Braeckman cfa09cedce [IMP] loyalty: use program default values for reward and rules
Prior to this commit the default values of a reward/rule would be static
and not depend on the program type.
It will now use the default value if the program_type is given in the
context.

TaskId-2982239

Part-of: odoo/odoo#100170
2022-09-14 23:37:58 +02:00
William Braeckman d5a1b78de0 [FIX] loyalty: fix generate ewallet from list view
Prior to this commit it was not possible to choose the customer when the
wizard was started form an ewallet's program ewallet list view.

TaskId-2982239

Part-of: odoo/odoo#100170
2022-09-14 23:37:58 +02:00
Louis Wicket (wil) b9b0d9c462 [IMP] mail, *: inverse of identifying is automatically causal
* = im_livechat, snailmail

The model manager will now automatically add `isCausal: true` to inverse
of identifying fields. This commit implements the feature and removes
now unnecessary declarations of `isCausal: true` from the code.

Task-2741402.

closes odoo/odoo#100119

Related: odoo/enterprise#31290
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-14 21:22:15 +02:00
Aaron Bohy a7766e0f4d [FIX] web: SelectCreateDialog: remove padding
We don't want any padding in those dialogs. The presence of the
padding was a consequence of the rewritte of that dialog in owl.

It is a frequent usecase to remove the padding from the body of
dialogs. We thus introduce a new props on Dialog and when this
props is set to `true`, we do not set any padding on the body.

This commit refactors other usecases to make them use the added
props.

closes odoo/odoo#100045

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-14 21:22:12 +02:00
John Laterre (jol) f413d204ec [FIX] account,sale: use commercial_partner_id for partner_credit_warning
Currently, the `partner_credit_warning` only works with companies,
not individuals related to a company.

Which means that the credit warning will not appear if you use a
contact from a company, instead of the company itself.

This PR solves the issue.

https://github.com/odoo/odoo/pull/83205#issuecomment-1242971077

closes odoo/odoo#100038

X-original-commit: acd3545372082268b86d18cd38197d4a464930c9
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-14 21:22:09 +02:00
Joren Van Onder 0d16724945 [ADD] pos_restaurant_stripe: support adding tip after payment
This is analogous to pos_restaurant_adyen and adds support for the two
American tipping flows:

- customer tips immediately themselves after paying using the TipScreen
- waiter adds tips end-of-day using paper receipts using the TicketScreen

To allow for tipping an optional amount= parameter was added to
stripe_capture_payment and the transaction_id on the paymentline was
saved a bit sooner so it can be used in the backend in set_no_tip and
_update_payment_line_for_tip.

Stripe docs:
https://stripe.com/docs/terminal/features/collecting-tips/on-receipt

task-2979312

closes odoo/odoo#99973

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-09-14 21:22:05 +02:00
tsm-odoo 30f6a5739f [IMP] test_mail: remove jquery usage from activity widget test
Adapt the activity widget test to use vanilla js instead of JQuery.
Moreover, selectors have been adapted to rely less on the DOM structure
and more on significant class names.

closes odoo/odoo#99924

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-14 21:22:02 +02:00
tsm-odoo 898e69b8df [FIX] test_mail: fix activity widget test
Before this PR, any fail during the QUnit test suite would have failed
the activity widget test. This is due to the fact that this test was
relying on the activity table to be the only table present in the
document. This issue is that QUnit is also using table to display
failed tests. Thus, the activity widget test was looking in the wrong
table to find its elements.

This commit fixes the issue by ensuring the test is actually targeting
the right table that is, the one inside the activity view.

Part-of: odoo/odoo#99924
2022-09-14 21:22:02 +02:00
Dossogne Bertrand 074342e937 [FIX] web: better content spacing in all PDF reports
In the PDF reports, the general spacing is too narrow, for
example in tables, in the address lines etc. This commit
upsizes a bit the line-height for the majority of text/digits-based
content.

taskID 2977261

closes odoo/odoo#99837

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-14 21:21:57 +02:00
Rob Coekaerts c448183426 [IMP] hr_recruitment: improve UX of applicants list view
Currently clicking the 'Other applications' smartbutton on an
application redirects to a kanban view that does not have very useful
information.

With this commit, this smartbutton now redirects to the application list
view and adds small UX changes to this list view.

task-2946398

closes odoo/odoo#99828

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-14 21:21:54 +02:00
maximilien(malb) 88ecb702f0 [FIX] account: Onboarding invoicing
1. When an invoice is created, the action is completed

task-2974631

closes odoo/odoo#99820

Related: odoo/upgrade#3891
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-14 21:21:48 +02:00
Vincent Larcin 7f908c6a69 [FIX] project: make personal stage non required in task form view
Since https://github.com/odoo/odoo/pull/90588, the personal stage is a required field in the task form view in debug mode.
However, we only generate personal stage for a given user when that user is first assigned to a task.
If a user creates their first task and assign it to themselves, they won't be able to give it a personal stage.

To prevent issues linked to the current users not having personal stages, this commit makes the field not required, but prevents the user from unsetting it

closes odoo/odoo#99735

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-14 21:21:45 +02:00
Vincent Larcin b79c0e20c8 [FIX] project: no personal stage when editing someone else's task
Since odoo#90588, the personal stage is a required field on the task form view in debug mode.
However, it does not make sense to have to set a personal stage when editing a task assigned to someone else.

This commit therefore hides the field when the user edits a task they are not assigned to.

Part-of: odoo/odoo#99735
2022-09-14 21:21:45 +02:00
Vincent Larcin cdf46cc9d9 [IMP] tests: evaluate domain strings in node modifiers in Form
This commit changes the node modifiers domain evaluation in the Form test class to allow strings.
Domains as strings are used by the web client to evaluate special values such as 'uid'.

Part-of: odoo/odoo#99735
2022-09-14 21:21:44 +02:00
Alexandre de Pape (alpa) 5dd15f18d6 [FIX] website_sale: add test for cart popover
This commit adds a tour that checks if the cart popover works correctly.

task_id=2964010

closes odoo/odoo#99583

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-14 21:21:39 +02:00
Maximilien La Barre 10dc2a4b9a [ADD] account: Unicity constraint on reco models
1- throw an error when creating a model with a name already taken
2- Duplicate action button create a new model with (copy) append to then name

task_id: 2971488

closes odoo/odoo#99581

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-09-14 21:21:36 +02:00
Philippe Wauthy 340f465d51 [IMP] hr_holidays: improve demo data and leave/allocation approvals
In hr_holidays demo data, change the existing allocation from Unpaid to Training Time Off

When a user is logged as Time Off Officer (not administrator):
- In the Approvals > Time Off list view, display the refuse button
- In the Approvals > Allocations list view, display the approve/refuse button

task-2939201

closes odoo/odoo#99496

Related: odoo/enterprise#31085
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-14 21:21:30 +02:00
Adrien Dieudonné 27bba0c2ce [FIX] website: Convert missing BS5 attributes
Before this commit, clicks event were blocked even if there was
no backdrop.

closes odoo/odoo#99338

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-14 21:21:25 +02:00
Adrien Dieudonné 51939d09f8 [REF] web, website: avoid compensateScrollbar JQuery override
In this commit, we simply set 'position' to 'sticky' on 'o_header_affixed'
to avoid to manage it's position with 'padding-top' and 'right'.

- 'padding-top' css property was used to compensate the navbar height
   at the moment where the stacking context change because of the
   fixed position.
- 'right' css property was used to prevent the menu to overlapp
   the scroll bar.

Part-of: odoo/odoo#99338
2022-09-14 21:21:24 +02:00