If the user only has "Point of Sale" permission but not "Employees" permission, the image will not be displayed using the link "/web/image/hr.employee/${cashier.id}/avatar_128"
instead use "/web/image/hr.employee.public/${cashier.id}/avatar_128"
closesodoo/odoo#130566
X-original-commit: 152e1a360fad3de1bc5363bf476e26f48563e5c0
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Those fields are no longer used since all client actions and the
studio report editor have been converted to owl.
Part of task~3439226
closesodoo/odoo#130462
Related: odoo/enterprise#45015
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
This field has been introduced as a fix in 15.0 [1] where views
were still legacy, and it hasn't been adapted in the forwardport.
So this commit converts it to owl as the support for legacy fields
is about to be dropped.
Part of task~3439226
[1] odoo/odoo#112520
Part-of: odoo/odoo#130462
Currently, the migration key is stored through a workaround as a config parameter,
because the behaviour needed to be changed in stable.
Now, several things can be fixed:
- `account_peppol_migration_key` is now a field on `res.company`, not `account_edi_proxy_client.user`
- `account_peppol_attachment_ids` can be removed as the specs changed and it's no longer necessary
- `peppol_proxy_state` can be removed as it's no longer useful after `enable_peppol` was added
- SQL constraints need to be changed to only include active users.
This allows users to deregister/migrate away from Peppol and then re-register later, with their previous edi user being archived
closesodoo/odoo#129595
Related: odoo/upgrade#4980
Signed-off-by: Laurent Smet (las) <las@odoo.com>
https://github.com/odoo/odoo/pull/112114 added a new component that extended the
Many2ManyAttendee component, including the setup() method. However, the extended
setup() method was not calling super. This commit adds the super call to the
component.
After the introduction of the new RelationalModel, the missing super call caused
a traceback when clicking on any calendar event.
task-3441130
closesodoo/odoo#130593
X-original-commit: c0856a6e1e8a740dbfeb9523616e4288119fb50e
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
RATIONALE
Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.
SPECIFICATIONS
Move some helpers used in mail, phone_validation and sms modules directly
at BaseModel level. Those are used to find emails, partners, phone numbers
and countries on records when sending them emails, notifications and sms.
Improve default behavior of those helpers to cover most existing use case.
Remove overrides now covered by standard behavior.
Simplify phone / sms methods implementation. It was a bit messy with methods
of sms overriding methods from phone. All this code can be simplified now
that we have several years of usage in addons to see what people did with
those modules. Globally
* _sms_get_partner_fields is replaced by _mail_get_partner_fields;
* _sms_get_number_fields is replaced by _phone_get_number_fields;
* _sms_get_default_partners is replaced by _mail_get_partners;
Add a generic phone formatting tool on BaseModel allowing to simplify most
calls done to the phone_validation API. Remove custom definitions on some
models as it is now available directly.
Task-3422449 (Mail, Phone: Move and improve field helpers)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
closesodoo/odoo#130468
Related: odoo/enterprise#45036
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE
Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.
SPECIFICATIONS
'_sms_get_default_partners' exists in SMS to find default customers to
notify when sending automated SMS. It can be replaced by '_mail_get_partners'
helper available on BaseModel in mail.
A specific case exists in calendar where it was overridden to avoid notifying
attendees that declined the event, notably for alarms. This feature has been
moved directly in the reminder sending method, to keep behavior coherent.
Test is updated accordingly, and is now really using the SMS mocks to simulate
the sending.
Task-3422449 (Mail, Phone: Move and improve field helpers)
Part-of: odoo/odoo#130468
RATIONALE
Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.
SPECIFICATIONS
Add a '_phone_format' tool method on BaseModel. It allows to format a number
either directly, either from a field available on the model. It allows to
ease number formatting. It uses available helpers to find numbers using
'_phone_get_number_fields' and '_phone_get_country_field'. With default
generic behavior this allows to simplify most calls to phone number formatting.
Having it available at BaseModel level allows to remove some custom code,
calls to phone_validation API, ...
Task-3422449 (Mail, Phone: Move and improve field helpers)
Part-of: odoo/odoo#130468
RATIONALE
Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.
SPECIFICATIONS
Simplify model custom code when dealing with phone and sms by using helpers
and standard behavior defined on all models.
'_sms_get_partner_fields' was introduced at odoo/odoo@bdebcab0ce to have a generic
implementation of finding partners on a record. Since then another version
has been added directly in 'mail' module, using '_mail_get_partners'.
'_sms_get_number_fields' was introduced at the same time to have a generic
implementation of finding numbers on a record. Since then a generic and
improved version has been added directly in 'phone_validation' module, see
'_phone_get_number_fields'.
Those method can therefore be removed, and replaced by the generic ones
available on BaseModel.
Task-3422449 (Mail, Phone: Move and improve field helpers)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#130468
RATIONALE
Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.
SPECIFICATIONS
In addition to finding the customer, sometimes we just want any partner on
a record, notably for VOIP. For that purpose we improve heuristic for
finding partner (fields or records). It introspects the model to find any
relational field towards res.partner. Note that as it is generic it does
not ensure the partner is a customer, just some partner.
Task-3422449 (Mail, Phone: Move and improve field helpers)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#130468
RATIONALE
Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.
SPECIFICATIONS
Support by default 'phone' and 'mobile' fields if present on model as phone
fields to fetch when searching for a number. This allows to remove several
of unnecessary overrides always doing the same thing.
Task-3422449 (Mail, Phone: Move and improve field helpers)
Part-of: odoo/odoo#130468
RATIONALE
Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.
SPECIFICATIONS
Move 'mail' and 'phone_validation' helpers directly at model level, allowing
to rely on those methods in all models instead of only when inheriting from
'mail.thread' or 'mail.thread.phone'.
Those helpers are used to find primary email, phone numbers or customers in
flows involving sending emails or SMS. A default behavior exists that is
generally valid for most models. Method can then be overridden to implement
their own custom behavior.
Future commits will improve them and remove duplicated computation between
mail, phone_validation, mass_mailing and sms modules.
Task-3422449 (Mail, Phone: Move and improve field helpers)
Part-of: odoo/odoo#130468
Probably due to a copy paste, _compute_sms_template_id on sms_template_id field
of alarm model is not correctly called. It refers to the mail template instead
of the sms one.
Task-3422449 (Mail, Phone: Move and improve field helpers)
Part-of: odoo/odoo#130468
In V14, the cardholder name is send, but not in V16.
closesodoo/odoo#130545
X-original-commit: b8d7d1a619c76e3ce0a50e9fc9251a33fc8ca52b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This PR will introduce multiple display improvements. Here is the list:
- In the accounting settings, the fiscal localization section has a button that
was oddly placed. This PR solves that issue.
- On the dashboard, when clicking the three dots on a card, the options "remove
from favorites" and "configuration" were not aligned.
- In ir_attachment, the label and field of "datas" will be aligned, and a gap
will be added between the icons.
- In the settings, the button links were inconsistent in terms of padding. This
PR resolves that.
- In the payment providers, two button links had text wrapping issues. By adding
Bootstrap classes, this has been resolved.
closesodoo/odoo#130522
Task-id: 3342969
X-original-commit: d4ba0c1f69212bfb0030036951c2888e935bbdf0
Related: odoo/enterprise#45060
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Exporting the EventConfiguratorRelationalModel and EventConfiguratorRecord
classes allows us to easily extend them into other modules. This will
allow us to add functionality to the event wizard of the sales lines without
doing tricks.
closesodoo/odoo#130521
X-original-commit: a597fb19b4bec4403f9f31eb141d3053c3b755cb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Fix a minor issue introduced in this commit: https://github.com/odoo/odoo/commit/60465047df56c07e61623c1f7304fede28232581
The issue is that the left bottom section of the invoice layout is constraint on the left side, even if nothing is present on the right part. This caused an issue for example with the Mexican Localization where the text beside a QR code can not reach the full width of the page, making the QR code and the text on top of eachother.
task-3444692
closesodoo/odoo#130456
X-original-commit: 1bbd89cacbbd4fc600eb2da20577d6688392485b
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
1. Purpose: be consistent with the information indicated in the
description of the form view + add a way for users to analyze the margin
of their project is relative terms
- updates right-side panel > display the margin % under the margin
- apply the same color code and visibility conditions as for the margin
- The margin section is visible only if there are revenues and costs for
the current project.
2. Purpose: currently, SOLs and associated revenues are only taken into
account in the project updates right-side panel when it is set either on
the project, its tasks or its timesheets. This was designed this way to
manage the use-case where the AA of the project would be linked to
multiple projects. We wanted to avoid duplicate information.However, in
practice, it seems that the current behavior is confusing and is
generating a lot of questions from customers (according to our
colleagues at the support and the PS). IMO, the use-case where an AA
would be shared with multiple projects is not very common and we should
privilege the basic use-case.In addition, even if we have duplicate
information in case of a shared AA, it is still possible to have the
detail per project from the accounting app by setting a corresponding
analytic distribution.
- SOLs and associated revenues should be taken into account in the
project updates right-side panel if their SO share the same analytic
account as the project, regardless if the SOLs are set on the
projects, its tasks or timesheets, or not.
task-3330274
closesodoo/odoo#128439
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This PR refactors the patch function in order to simplify its code but also and most of all remove the `this._super` bound on each patched method call.
The patch function now supports the javascript keyword `super` to get the parent's property.
This removes constraints we had with `this._super`. We had to create a rather complicated intermediate function to bind `this._super` and this function was called each time before we called a patched method. It was annoying for debugging but necessary. Because of this intermediate function `this._super` was also had to re-bind each time we entered a patched method which was annoying with async method, we had to save the parent method in the patch before awaiting its execution. Finally, not a big issue but still, objects could not have a `_super` property as it would be hidden in the patch.
task 3410198
closesodoo/odoo#125716
Related: odoo/enterprise#43852
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Before this commit, a patch was used to modify some classes in place
but these classes were declared some lines just before the patch.
This commit replaces those patches by mixins, it's a better way to
provide a same extension to multiple classes as the extension is
done by the language.
Task: 3410198
Part-of: odoo/odoo#125716
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.
task 3410198
[1]: 19ea1ac08043e22a811630968e44715cc3bfc495
Part-of: odoo/odoo#125716
This commit refactors the patch function in order to simplify its code
but also and most of all remove the `this._super` bound on each patched
method call.
The patch function now supports the javascript keyword `super` to
get the parent's property.
This removes constraints we had with `this._super`. We had to create a
rather complicated intermediate function to bind `this._super` and this
function was called each time before we called a patched method.
It was annoying for debugging but necessary. Because of this
intermediate function `this._super` was also had to re-bind each time
we entered a patched method which was annoying with async method, we
had to save the parent method in the patch before awaiting its
execution. Finally, not a big issue but still, objects could not have a
`_super` property as it would be hidden in the patch.
task 3410198
Part-of: odoo/odoo#125716
*=sale_timesheet.
In this commit improve following UI in task analysis and list view,
- aggregate the sum of following fields in project.task list view, hours spent
on sub-tasks, total hours, progress.
- in project.task list view move 'id' after the 'state'.
- from task analysis remove the measure 'remaining hours percentage'
from graph and pivot view.
task-3330295
closesodoo/odoo#124396
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Add a new filter to the orderpoints view to allow filtering by vendor.
closesodoo/odoo#101090
Task: 2964309
Signed-off-by: Tiffany Chang <tic@odoo.com>
Before this commit, there was no functionality to trigger replenishment before
min qty is reached. This commit adds a "Order to max" button to top of list view
of replenishment when orderpoint(s) are selected. This button will trigger
replenishment for lines where Max Quantity - forecast > 0.
Taskid: 2964309
Part-of: odoo/odoo#101090
This commit focuses on fixing the UX for managing avatars and badges
within `tagsList` in edition mode. The changes include:
For Avatars:
- Implemented an overlay effect on :hover, making it clearer which entry
is currently selected, providing a visual cue for users.
- The "remove" button now appears on :hover only, reducing visual
clutter and improving visual scanning.
For Badges:
- Added visual feedback when hovering the "remove" button, making it
more apparent and user-friendly.
task-3439555
part of task-3326263
closesodoo/odoo#130485
X-original-commit: 649a58cd88c4d74cdd62f47c1c0c354ced143481
Related: odoo/enterprise#45028
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Since the relational model was rewritten (PR 114024), the record id
is no longer present in data. We must replace record.data.id with record.resId.
closesodoo/odoo#130466
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Chart of Account Update with their translations
2865568
closesodoo/odoo#130463
X-original-commit: efbd486e4c114cb9f6dff2bbbf9a2ff23212ca61
Related: odoo/enterprise#45016
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Before this commit, an event listener was added on
several registries to copy the required registry for
mail tests. The registries should be copied once when
the test suite begin to avoid side effects in tests.
closesodoo/odoo#130461
Related: odoo/enterprise#45014
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The goal of this commit is to complete the list of activeFields for
an x2many in list mode when a record is opened with the fields present
in its form view. This ensures that there is always an activeField
for all the data in a record. Before this commit, when the x2many's
form view was not inline, when the form view was closed, the fields
not present in the list view no longer had an activeField, which could
cause crashes.
closesodoo/odoo#130453
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit introduces various fixes regarding the avatar card.
First one makes sure that the avatar card popover won't launch when
there is no user image associated with the many2one_avatar_user_field.
Second one prevents the card from opening when the related model is not
"res.users".
Third one allows to display the phone number of users even without hr
installed and makes sure that the work_phone and work_email are shown
in priority if available when hr is installed.
Direct fix to Task-3167110
closesodoo/odoo#129876
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
In this PR we add the automatic encoding of disallowed expenses rates for fleet based on tax deduction
task-3186404
closesodoo/odoo#125548
Related: odoo/enterprise#42768
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
We prevent to merge partner linked to more than one user (by raising an
exception) to avoid having multiple user pointing to the same partner as a
consequence of a merge.
We want to avoid this situation because it generates weird behaviors. As
res.user inherits from res.partner, having multiple user pointing to the same
partner makes the fields of that partner shared with all those users. This was
decided following the tentative to improve partner merge in website_slides
(odoo/odoo#114840), where we also noticed strange behavior like completing a
lesson with one user were adding karma to all the users linked to a same
partner.
We have also adapted WebsiteVisitorTests tests in website that were failing
because they were merging partners with more than one user: simply by merging
partners with only one user.
Task-3167160
closesodoo/odoo#125322
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Before this commit, when deleting a task with subtasks, only the parent
task was deleted. As child tasks are the required to have the same
project_id as their parent, they could end up views of another project
with no clear link to it. Generally speaking, keeping child task, when
their container (parent task) is removed does not make sense.
Therefore, this commit changes the default behavior for task
deletion. When a parent task is removed, all its child tasks are removed
as well. To avoid such a behavior in exceptional situation where child
task can make sense without their parents, the user first need to remove
this link before unlinking the parent task.
A warning is added in all the views where a task can be deleted (form,
calendar and list) to warn the user of this new behavior when he deletes
a task.
task-3044991
closesodoo/odoo#121260
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In this PR we make several UX changes that should make the life of the user easier:
- Add the possibility to upload personal documents in the contract
- Fine tuning of some fields (control of exclusive fields, conditional appearing of certain fields to not overcharge the display)
- Improve the order of tabs and their layout
task-3069359
closesodoo/odoo#122116
Related: odoo/enterprise#39804
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Before this commit, all badge color matched the messaging menu
color badge. Most badge counter in discuss show needaction counter,
so it makes sense to have a catchy color scheme (e.g. white text on
red background).
For starred counter in discuss sidebar, the counter is meant to see
at a glance how many messages are starred, without it being too
catchy.
This commit fixes the issue by introducing a `o-muted` modifier on
`o-discuss-badge`, which displays a grey background for starred
counter.
Also fixes a bug in dark mode where badge background color was
incorrect.
closesodoo/odoo#130452
X-original-commit: de232c330140fd4156e7f416fddfce88b21e71c5
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When applying a coupon, the amount can be totally covered, with nothing
left to pay. Express Checkout buttons should not be shown in that case.
After this commit, Stripe's Express Checkout buttons will not be shown
if the amount is not defined.
opw-3427969
closesodoo/odoo#130450
X-original-commit: 87e24d16c3dde8ab03d7c966b532f75a8c40ac30
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
The label was already Status on the field but not in the search view.
"State" is always used for the meaning location.
Sharing the same term meant it was not possible to have two different
translations.
closesodoo/odoo#130444
X-original-commit: 70fcdf30fc842410aafa9e61d2a1903589a15311
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Follow-up of [1]
Before this commit, when a message had both subtype description and
tracking values, they were displayed horizontally instead of
vertically.
This happens because [1] set `d-flex` on `textContent`, which is
horizontal by default. This assumes there's only 1 HTML node for
actual `textContent` so that message action list could be
positioned next to 1st text content line.
However, when message has subtype description and tracking values,
there is more than 1 HTML node in `textContent` and the intended
visual is showing them in `d-block`. This `d-flex` made them display
horizontally instead of `d-block`.
This commit fixes the issue by having a single actual HTML node in
`textContent` when there's a subtype description and some tracking
values. This allows to position `textContent` parts as desired
(e.g. with `d-block`) while having position of message action list
working as intended in original template of `Message`.
[1] https://github.com/odoo/odoo/pull/128940closesodoo/odoo#130435
X-original-commit: 469f46c602c842c7a7fae49e0af701e979ff18ba
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Impacted Version : Master only
Issue: Traceback when clicking on the `New` button
in the `POS Product category` view.
Steps to reproduce :
Step 1: Open POS
Step 2: Go to Configuration
Step 3: Open product category
Step 4: Click on New -> traceback appears
The cause of the issue is trying to access properties
on a record that is not yet created.
The solution is simple: we adapt the code such that it
can handle the case where the record is not yet created
closesodoo/odoo#130398
Task: 3450117
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Before this commit, in some cases (many2one invisible) unity returned
an integer as value.
Now, to be consistent, unity always return an object for many2one.
Note that, web_read_group still returns an array as value for many2one.
part-of task-id~3179751
closesodoo/odoo#130340
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.
This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().
task-3292454
closesodoo/odoo#130248
Related: odoo/design-themes#678
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
*: im_livechat, web.
Since [1] the messaging service is added to the livechat embed
bundle. As a consequence, the bus service is started even when
it is not needed. This is wrong since it would lead to lots of
useless connections to be made.
This PR prevent mail services from starting the bus eagerly in
this context and adds a tour in order to prevent further errors
on this matter.
closesodoo/odoo#130059
X-original-commit: b2bcef3c3b57061ef0694a5fc3c326cc8babc818
Related: odoo/enterprise#44782
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit adds the "show weekends" functionality to calendar which
allows the user to choose whether weekends should be shown in the calendar
or not (defaults to false).
task-3425523
closesodoo/odoo#129107
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Versions:
---------
- saas~16.2+
Steps to reproduce:
-------------------
1. Install Belgium accounting module
2. Switch to the company with the template
2. Go to Accounting -> Bank -> Reconcile Items
Issue:
------
Translations are only being loaded in French
Cause:
------
There is no translation assigned to the other
expected language: English, German and Dutch,
and the field name of `account_reconcile_model`
did not have the parameter translate = True
Solution:
---------
To fix this issue we have to add the respective
translations using name@Lang and add the parameter
`translate = True` in the field name of
`account_reconcile_model` so that the translations
can be loaded to this field.
OPW-3316716
closesodoo/odoo#126542
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>