Commit Graph
159952 Commits
Author SHA1 Message Date
Adesh JolheandManisha Tulsiyani 23cf931808 [IMP] hr_,sale_(timesheet, project),purchase: generic improvements for the project
Purpose of the commit is to do the generic improvements for project.

So in this commit did the following changes:
 - adding a label 'last update' to the stat button in project form view.
 - indicate 'my project' in the tab instead of 'project sharing view in portal' in project sharing.
 - set the first non-folded stage of the project as default on newly created tasks.
 - remove user confirming the SO as the default project manager.
 - hide fields service_tracking, service_upsell_threshold if sale_ok is false.
 - set purchase_method to purchase by default if product is of service type.
 - remove the : next to the totals labels and decrease the font-size for values of 'total hours'
   and 'remaining hours' in timesheets notebook in project task form view.

task-2897867

closes odoo/odoo#96548

Related: odoo/enterprise#29774
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Manisha Tulsiyani <matu@odoo.com>
2023-04-04 11:01:59 +02:00
Victor Piryns (pivi) cfade861be [FIX] sale_timesheet: hide SO in project's settings if not billable
Current behaviour:
You can see the `Sales Order Item` field in the project's `Settings`
sheet page when the project is not `Billable`.

Expected behaviour:
If the project is not `Billable`, we hide the field `Sales Order Item`.

Steps to reproduce:
- Install `sale_timesheet`.
- Project > kebab-menu on project > Settings
- Click on the Settings tab of the project's form view
- Observe there is a `Sales Order Item` field, even if the project
  is not Billable.

Reason for the problem:
Before, `Sales Order Item` was in the Invoicing tab, which is
visible only when the project is billable and a partner is set.
Due to a recent refactoring (b77f60b155),
the field was moved to the `Settings`, but the visibility condition
that was on the invoicing tab was not.

Fix:
Add the missing visibility condition on the field `sale_line_id`.

Affected versions:
- saas-16.1
- saas-16.2
- master

opw-3250937

closes odoo/odoo#117546

X-original-commit: ea97fb5be0ae3d40940f7befac6a2bc19c89b084
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-04 08:03:56 +02:00
Ahmad Khanalizadeh 861db8a5a7 [FIX] delivery: use correct unit price for commodities
Steps to reproduce:
Make a sale order with a product and quantity > 1, add
FedEx international shipping and validate the delivery
In the document you will see that the unit cost is equal
to subtotal which is wrong.

There is a discrepancy between `_get_commodities_from_order` and
`_get_commodities_from_stock_move_lines`, that the former makes
commodities with `monetary_value` equal to the unit price, while
the latter uses subtotal. in the method `commodities` in
`delivery_fedex`, `monetary_value` is treated as unit price, so
the right way to fix it is to do it in
`_get_commodities_from_stock_move_lines`.

Note that when rating a delivery, commodities are made in
`_get_commodities_from_order` and then passed to `commodities`,
while for sending the shipping, commodities are made in
`_get_commodities_from_stock_move_lines`.

opw-3233369

closes odoo/odoo#117521

X-original-commit: 3beddbdd18937e1c69ec4fa6f523296c7c55528b
Related: odoo/enterprise#39234
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
2023-04-03 22:55:48 +02:00
momegahed 915dcda565 [FIX] account_edi: EDI PDF not rendering when having an EDI XML
Steps to reproduce:

- install any edi l10n
- create an invoice with edi xml
- try to print the invoice (this adds a pdf attachment)
- the attachment viewer shows whichever attachment added first
- it shows only the xml file name

Bug:
`_message_set_main_attachment_id` only works if there are no
`message_main_attachment_id` set.

Fix:
Override `_message_set_main_attachment_id` in the `account.move` module to
alter this behavior

OPW-3147811

closes odoo/odoo#117510

X-original-commit: 383834b11bf6b7a80848e5d238b12fa237b9edf3
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-04-03 20:48:02 +02:00
william-andre 49b7acf53c [FIX] account: delay the synchronization to end of the registry load
Before this commit, the translations were loaded as soon as `account`
was updated, leading to all fields being read/parsed, even from other
modules.
This commit delays the sync of the translations to after the registry is
loaded.

To reproduce:
* install `l10n_in` (fails because of `python_compute`), or `l10n_mx`
  (fails because of `l10n_mx_tax_type`)
* update `account`

A traceback will be raised inside of `_update_translations`.

closes odoo/odoo#117511

X-original-commit: c50a2d634faef3cd5aceaa3a614c42d9dae6cac2
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-03 18:08:58 +02:00
Benjamin Vray 4999a5210d [FIX] website: fix the livechat button that hides the cookies bar
This commit addresses the issue where the livechat button was hiding the
buttons of the cookies bar. With this commit, when a cookies bar is
open, the bottom fixed elements (such as the livechat button) will be
hidden.

Most issues caused by bottom fixed elements hiding buttons on a page had
already been addressed in this [commit]. However, the case of a modal
without a backdrop (like the cookies bar) had not yet been addressed.

Steps to reproduce the bug:

- Activate the livechat on a website.
- Activate the cookies bar on the website.
- When both are open, the livechat button hides the buttons of the
cookies bar (only if the page has a scrollbar and the page is not
scrolled to the bottom).

[commit]: https://github.com/odoo/odoo/commit/1cdd1f2f9a7d90fbf8e0da61116abfcbe6db5ae1

opw-3213808

closes odoo/odoo#117506

X-original-commit: 2e4b9cd6dbcea5844afd4b16a98d9f16abee1556
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-03 18:08:53 +02:00
Cuong, Nguyen Minh Tran Manh b44754dcaf [FIX] sale,purchase: fix report pdf borders
Since BS5 integration in v16.0, the pdf of the sale and purchase report have changed. Borders would be present in the body of the report and the total detail.

Came back to v15 display by using the table-borderless class on those elements.

closes odoo/odoo#117492

X-original-commit: 8dd6927ca6195f9972f6f444395765aafca1b593
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-03 17:07:32 +02:00
Samuel Degueldre a838223a35 [REF] web: remove dependency of js module system on guardedCatch
guardedCatch is a legacy feature meant to differenciate promises
rejected as control flow from promises rejected because of an error. In
recent years we have settled on the stance that using promise
rejections, which are treated as errors by the language in many ways, is
a bad idea. This commit removes the dependency of the odoo module system
on this legacy feature.

closes odoo/odoo#117457

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:30 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
c5dd03ffee [FIX] project: review UX and UI in Project app
This commit reviews the UX and UI in Project app and improves the usability of the
new features recently added (subtasks list in kanban card, state field replacing
kanban_state field, etc).

The following changes are made in this commit:

- swap of user_id icon in the kanban box and the removal of the allow_unassign field and setting
- change the ordering of the fields in the subtask list
- make small layout changes in the project.task and project.project kanban cards
- remove the "lock-icon private" sub-title of private tasks, replace it with a
  little lock icon on the bottom right icons of the kanban card.
- remove the break tag in the project.task kanban card that was unecessary
  given the new display and margin style settings
- lock icon is bigger
- kanban icons are better aligned
- state is as big as avatar
- remove the 'remaining hours on SO' field
- deadline field will be optional and hidden by default in project.task list view
- remove the rating field
- add stage field as optional in project.task list views
- priority and state fields will no longer be optional
- stage_id will be copied when duplicating a task, except when the task is
  generated through the recurrence
- remove the tooltip of the tag_ids field
- When duplicating a task having sub-tasks, '(copy)' is no longer
  added to the name of the sub-tasks of this task.
- project.task kanban view:
  * (+ x tasks) mention next to the name is removed
  * The caret is replaced with 'fa-check-square-o x/y'
    which will represent the number of sub-tasks closed
    compared to the total number of sub-tasks
  * Only open subtasks are displayed
  * When changing the state of a sub-task to a closing one,
    the sub-task is muted and removed from the list on the view reload
  * The name of the parent task on the kanban card of sub-tasks is
    displayed except when viewing the sub-tasks of a particular task
    through the sub-tasks stat button
  * project.project kanban view: the fa-check-square-o icon of
    milestones is replaced with fa-flag-o
  * project.task kanban card: the fa-play and fa-pause icons
    are moved on the right of the remaining hours widge.
  * Allow users to edit the stage_id in batch from the list view of tasks
    if all of the selected tasks are part of the same project.
  * the state will have the same size as the avatar
  * change the opacity of the tasks that are closed
  * state is at the right of subtask list
  * the striked should be replaced by the opacity on the kanban card

Enterprise PR: odoo/enterprise#38132

Task-3229873

closes odoo/odoo#116628

X-original-commit: 09b5d5843096d27b5a4ab0f603ad44bdb2e74723
Related: odoo/upgrade#4478
Related: odoo/enterprise#38771
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Panagiotis Kyriakou <paky@odoo.com>
Co-authored-by: Bastien (bvdn) <bvdn@odoo.com>
2023-04-03 17:07:21 +02:00
Kartik Chavda cb12ab2f1c [IMP] {hr,sale}_timesheet{,_attendance}: improve generic UX
Purpose of this commit is to do generic UX.

So, in this commit done following points:
 - improve search on invoice for portal commit when invoice is in
   draft then search on id of invoice instead of name.
 - display unit_amount field in muted when value of unit_amount
   is equal to 0.
 - rename timesheet attendance report.

task-2969791

closes odoo/odoo#100141

Related: odoo/upgrade#3897
Related: odoo/enterprise#31304
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-03 17:07:07 +02:00
Kartik Chavda fdb692c25b [IMP] project_timesheet_holidays: create timesheets for global leave wo calendar
Before this commit when user create a global without calendar then
it'll not create any timesheets for any employee but global leave
without calendar is taken as leave global leave for all calendar
in that company's calendar and should create timesheet for all
calendars employee in company.

This commit create timesheets for all calendars employee in that
company if global leave does not have specific calendar set on it.

task-2969791

Part-of: odoo/odoo#100141
2023-04-03 17:07:07 +02:00
Joseph Caburnay 2989ef360a [FIX] point_of_sale: edit list popup failed to show
When trying to add a product that requires specifying lot/serial numbers,
the popup to list the numbers failed to display. This is because there
is no longer `el` in component. We need to explicitly reference the element
we need. This commit introduces a t-ref in the root element of the EditListPopup
to have a reference to it from the useAutoFocusToLast hook to fix the issue.

closes odoo/odoo#117465

X-original-commit: 2a6368e7b72da5a64705cbc3c1f5d44b85677ab0
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-04-03 15:59:54 +02:00
Thanh Dodeur 6c8439ce43 [FIX] mail: add missing call icon in the discuss sidebar
Following the discuss refactoring* the call icon in the discuss sidebar
has not been reimplemented.

This commit fixes this issue.

\* https://github.com/odoo/odoo/pull/110188

closes odoo/odoo#117464

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-03 15:59:52 +02:00
David (dafr) f9f4190e53 [FIX] purchase_stock: Prevent picking update when product_qty isn't updated
_create_or_update_picking() is a time-consuming method.
On some Purchase, all the purchase.order.line may be written with 'product_qty' in 'values', even though it did not change.

OPW-2978569

closes odoo/odoo#117387

X-original-commit: 5575fe2dedfae2e9d558ca29884d2ebead3c8bbe
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David <dafr@odoo.com>
2023-04-03 14:56:39 +02:00
xO-Tx 29fd20d945 [FIX] website: fix input default value translation
Issue:

- Go to website > edit mode > add a form
- On one of the form fields, add a default value > save
- Change language > translate > the input has html code shown as value.

On translation editor, the default html values we get from translation
mapping (see 'ir.translation' > _get_terms_mapping()) are used on the
editor's JS code (beforeEditorActive()) to set the right translatable
attributes values on DOM elements, and since the use of jQuery "attr()"
will not update the "value" property on inputs, we force it to replace
the default translation html.

Remark: the same issue will prevent updating the "value" property on
the input when "AttributeTranslateDialog" is used for translation.

task-3042522

closes odoo/odoo#117472

X-original-commit: 9dbc25aab92ee31281d2bbc8c2ab6d743d5e43af
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-04-03 13:55:30 +02:00
xO-Tx f56ff35a5f [FIX] website: fix input attributes translation
Issue:

- Go to website > edit mode > add a form
- On one of the form fields, add a placeholder > save
- Change language > translate > impossible to translate the placeholder.

The fix on [1] was added to prevent interacting with inputs in editable
zones. This prevents translating attributes on those inputs too (using
the AttributeTranslateDialog) so the goal of this commit is to add
an exception to the restriction in [1], when input attributes are
translated.

Remark: On translation editor, elements with translatable default values
will get a `<span/>` as translation value which stays visible until the
content is updated on the editor. This issue can be fixed on CSS for
`placeholder` and input `value` attributes (since we can select elements
with attribute translation on CSS). In this commit, we need to hide the
text on JS until the editor's code sets the right values on inputs and
textareas.

[1]: 3e598a8

task-3042522

X-original-commit: 52aa67f74b89ad95d773bf1af836a136d0445b3a
Part-of: odoo/odoo#117472
2023-04-03 13:55:30 +02:00
Bastien Fafchamps (bafa) dfda7a14c1 [IMP] web: SelectMenu: Truncate selected value while keeping auto width
Before this commit:
When the label of the selected value was too long, the SelectMenu width
would grow indefinitely to accomodate, this behaviour was causing some
layouts to break.

After this commit:
The width of the SelectMenu is still automatic and will try to fill its
parent but will not make it grow. Instead, if the label is too long and
does not fit in the parent, it will be truncated.

Solution:
Using a grid display we can easly set the label to auto and truncate it
while keeping a constant size for the icons.

closes odoo/odoo#115799

Related: odoo/enterprise#37285
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-03 13:55:18 +02:00
Bastien Fafchamps (bafa) 7a6a64068b [IMP] web: SelectMenu: Support for de-selection in the dropdown in multiselect mode
Before this commit, in multiselect mode, clicking on a selected choice in
the dropdown did nothing. Now, while hovering, the choice's background
becomes red and clicking on it will remove it from the selection.

Part-of: odoo/odoo#115799
2023-04-03 13:55:18 +02:00
luvi 804c74813e [IMP] web: export SCALE_LABELS from calendar_controller.js
This commits exports the SCALE_LABELS list from the calendar_controller.js
file. This allows us to import and know the list of available scales from
other locations (Studio for example), and be updated with the supported
scales with their value and label.

Part-of: odoo/odoo#115799
2023-04-03 13:55:18 +02:00
luvi 129fa3f150 [MOV] web, *: move TagsList to core components
Since this component is imported and used in many places, it is more
convenient to move this component a core component instead of a
component made exclusively for the Many2ManyTagsField component.

This change makes the usage of TagsList possible by SelectMenu, which
would create issues as the fields folder should not be imported in
other modules.

Part-of: odoo/odoo#115799
2023-04-03 13:55:17 +02:00
Bastien Fafchamps (bafa) eb4a7d18b9 [FIX] web: SelectMenu value with no corresponding choice should not be displayed
This commit fixes an issue where when a value without a corresponding
choice was given to the SelectMenu, we would display it as a
string. It was missleading as it looked like an option was selected.

Now giving a value with no corresponding choice will result in the same
behaviour as giving no value.

Part-of: odoo/odoo#115799
2023-04-03 13:55:17 +02:00
luvi 2d28239f9b [IMP] web: SelectMenu has multiSelect props
This commit adds the ability to select multiple values from the
SelectMenu component. A list of tags are displayed in the toggler
to remove already selected values, and selected values are colored
in the list of choices.

This feature is similar to how jquery select2 handles multiple
selections, by adding the values in the input toggler. The feature
will be used by the studio sidebar during the refactor.

Part-of: odoo/odoo#115799
2023-04-03 13:55:17 +02:00
fdardenne d760b81271 [IMP] web: SelectMenu: support object as value
Before this commit,  the `SelectMenu` component didn't support object
in the value props of the component.

This commit allow us to use object in the `SelectMenu` value props.

Part-of: odoo/odoo#115799
2023-04-03 13:55:17 +02:00
luvi 98a89ed51f [IMP] web: improve SelectMenu and DomainSelectorDialog components
This commit makes some changes to the SelectMenu and DomainSelectorDialog
components, since they are now used by web_studio, in the sidebar editor.
Those changes makes them more in line with the features that were used by
their legacy counterpart.

Part-of: odoo/odoo#115799
2023-04-03 13:55:16 +02:00
Lucas Perais 47699f3e47 [REF] web: x2manyField: ensure we don't pass the props viewMode if not set
Before this commit, we passed the viewMode props to the X2many field everytime.
Since that props is optional, we don't have to pass it if it is not a string (null or undefined)

This allows to display a field set as invisible in studio

Part-of: odoo/odoo#115799
2023-04-03 13:55:16 +02:00
Lucas Perais a28c3c6897 [FIX] web_tour: wait animationFrame instead of setTimeout, handles o_blockUI
Before this commit, the tours waited only a setTimeout before executing a step.

After this commit, it waits a whole animation frame.

It makes sense in itself, as tours test visual cuesn but also needed as OWL relies
on animation frames to patch the DOM. In cases where we want to check in the DOM something
that is not css-selectable (ie inputs and their value), the animation frame is the right timing.

Also, the tours now handle the class .o_blockUI which blocks the tour's execution

Part-of: odoo/odoo#115799
2023-04-03 13:55:16 +02:00
Lucas Perais 91000641f1 [FIX] mail: tests helpers: export mail setup registries
This commit exports the function responsible for setting up the mail registries in tests.

This is usefull if one doesn't want to instanciate a full webClient in tests and still have mail features.

Part-of: odoo/odoo#115799
2023-04-03 13:55:16 +02:00
Lucas Perais 2787c9539c [IMP] web: core: ModelFieldSelector improved extensibility
Before this commit, when the ModelFieldSelector was updated, it only transmitted its chain as a string
But in some cases we do need the full chain as Object to check on fields that are part of it.

After this commit, this is the case.

Part-of: odoo/odoo#115799
2023-04-03 13:55:15 +02:00
luvi d80f45792d [IMP] web: add Notebook component features
This commit improves the Notebook component to support the ability to
disable some tabs. Once the page is disabled, the tab is greyed out
and set as inactive. Also, an icon can be placed in the tab, before the
label.

This change is used since the Notebook component is used as the sidebar
element during the web_studio refactor. The sidebar needed to disable a
tab depending certain conditions. Now, the component has this behavior
by default once a page has the isDisabled attribute.

To display an icon before the label, you can use the icons props, as an
object, which keys are page names, and values are font awesome classnames.

A test has been added for each new feature introduced.

Part-of: odoo/odoo#115799
2023-04-03 13:55:15 +02:00
Lucas Perais 6085480ea1 [IMP] web: core: draggable: execute willStartDrag
Before this commit, the draggable hook did not execute willStartDrag, that is, before
the element is actually moved.

After this commit it does, allowing for implementing some features, like copyOnDrag.

Part-of: odoo/odoo#115799
2023-04-03 13:55:15 +02:00
Atul Patel 323b893049 [FIX] l10n_no,l10n_de_skr03,l10n_de_skr04: remove chart template reference
As rewrite the whole chart template mechanism,
from here: https://github.com/odoo/odoo/commit/512574861691f425ec6a17f20fe4b586bb88a299
we need to remove chart template reference from
localization module. some of them are remaining.
so removed from norway, Germany localization in migration
script otherwise we got this error:

```
 from odoo.addons.account.models.chart_template import update_taxes_from_templates
ImportError: cannot import name 'update_taxes_from_templates' from 'odoo.addons.account.models.chart_template'
(/home/odoo/src/odoo/saas-16.2/addons/account/models/chart_template.py)
```

closes odoo/odoo#117466

X-original-commit: 76a40e484d70b876dc1b406d25c6cab3839b7216
Signed-off-by: Christophe Simonis <chs@odoo.com>
2023-04-03 12:56:56 +02:00
Géry Debongnie 332c781ff6 [FIX] web: make mock_server implementation closer to orm
The mock server implementation does not exactly match the actual orm
implementation. It is not really a big deal, but it makes the test suite
less useful.

In particular, the onchange call should return a value for all fields
when we are creating a new record. Also, the default get implementation
was not exactly correct.

The motivation for this change is to prepare the future relational model
refactoring.

closes odoo/odoo#117434

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-03 12:56:54 +02:00
Mahamadasif Ansari 1de2820e5c [FIX] survey: consider question as normal if question selection is random
Currently in the survey:
- If we have a conditional question and the question selection mode is
  random and we select the question layout as one page with all questions
  or one page per section, the conditional question is not visible. This
  happens because the  random mode condition is ignored.
- If we have a conditional question and the question selection mode is random
  and we select the question layout as one page per section, the traceback is
  generated when we start the survey. This is because it is trying to get value
  from the "selected_answer", which does not exist in random mode.

Expected behaviour is If the question selection mode is random, the conditional
questions are considered normal and visible and do not generate a trace back if
the question layout is one page per section.

This commit fixes the above issue by adding a condition that treats
the conditional question as a normal question when the question
selection mode is random.

task-3142209

closes odoo/odoo#117048

X-original-commit: 73552632b4397ebad1149c6e394ce4ff6d0f0d1e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-04-03 12:56:51 +02:00
Audric Onockx (auon) f403a3f179 [IMP] hr_timesheet: allow progress over max
Allow tasks' progress to go beyond go beyond 100%.
In tasks' list views, display the progress bar in red
if the progress > 100%.

task-2909337

closes odoo/odoo#96104

Related: odoo/enterprise#29565
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-03 12:56:46 +02:00
Audric Onockx (auon) 399e08fa85 [IMP] web: display progressbar in a different color when > 100%
This improvement will give a visual indication that the progress
has gone over 100% by changing its color.
As, depending on what it measures, it could be positive or negative,
we add an option to the widget to determine the class (color)
that should be used.

task-2909337

Part-of: odoo/odoo#96104
2023-04-03 12:56:46 +02:00
pedrambiria ce1c3f90ab [FIX] l10n_fr_pos_cert: raise error when there is no order
Before this commit: if the user wanted to generate a
POS Inalterability Check statement, an IndexError was raised.
This commit raises a more understandable error.

opw-3237383

closes odoo/odoo#117398

X-original-commit: 9cc56fc3d3cdb43e393df0975e10192c3b10f455
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-04-03 11:45:39 +02:00
Ahmed Khalaf dd6fd233ed [FIX] stock: quantities in transit not seen by report
Before this commit, if there is a demand for quantities and they are
available but reserved in transit (not yet in a stock location) they are
shown as not available.

To reproduce:

1) Have 2/3 step incoming shipments in warehouse
2) Purchase a quantity to create the incoming transfer
3) Validate the first step so that quantity is now in Input location
4) Create a MO with the component with quantity only in Input location
5) Go to forecast report of component, the quantity is shown not available.

closes odoo/odoo#117372

X-original-commit: 39ff1feae9f44b64ee3fff6ccee837ac4922ad1e
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Ahmed Khalaf  <ahkh@odoo.com>
2023-04-03 10:41:37 +02:00
Thibault Delavallée 8f8adf760b [FIX] website_forum: fix post/forum website URL computation on memory records
'slug' cannot be called on records which are not yet saved, aka have no ID.
In this commit we set the website_url to False for records that do not have
any ID.

Code managing those URLs is updated to be defensive, as notably when using
studio you may end up trying to call methods on in-memory records.

Followup of odoo/odoo@da3f4c2aff

Task-3254382

closes odoo/odoo#117255

X-original-commit: 36c734ab37fdf1d6a245e0e29cfefe3cc46c6d92
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-03 10:41:34 +02:00
Prakash Prajapati c2fafa05de [IMP] hr_timesheet: use name_get to add employee's company
Currently, if both companies have employees with the same name, it is not known which
company the selected employee belongs to.

After this commit:
    - The name of the company will only be appended by the name_get when more than
      one company is present in the database.

Example
- Administrator - My Company
- Administrator - Tiny ERP

task-3101249

closes odoo/odoo#107938

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-03 10:41:31 +02:00
Kartik Chavda ad40298a9a [IMP] {hr,sale}_timesheet: improve generic UX
Purpose of the commit is to improve the UX of the timesheet.

So in this commit did the following changes:
- SOL field display by default in timesheet list view
- If the timesheet is invoiced, it will appear in read-only mode

task-2918757

closes odoo/odoo#97203

Related: odoo/enterprise#30000
Related: odoo/upgrade#3729
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-03 10:41:23 +02:00
bve-odoo df1139856b [FIX] core: oversight in 36544651f2049bcf18777091dbf02c9631b33243
closes #112101

Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-03-01 09:19:37 +01:00
bve-odoo 6c2b889a28 [FIX] *: prevent warnings on runbot and sentry noisy tracebacks
As we have a team dedicated to work on analysing tracebacks
with sentry, and to takedown all tracebacks occuring on the saas,
we do an effort to avoid unecessary warnings and tracebacks
for both sentry and the runbot.

closes odoo/odoo#112101

Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-02-27 17:45:35 +01:00
David Monjoie 416c579bee [FIX] web_editor: fix font size dropdown not closing after select
The title attribute for font size used to be on the first child of
the button. This was simplified in [1] to be on the button instead.
However, having the title on the child rather than the button was
actually intential because Bootstrap 5 only allows to instantiate
one component by node, as specified by [2] which did move the title
attribute from the button to the child in the first place.

task-3253081

[1]: https://github.com/odoo/odoo/commit/e095e62f4af96d14943ebbe5f0da57c897bd44
[2]: https://github.com/odoo/odoo/commit/09b720eff1a7378351e04661d3df1c3be31ee965

closes odoo/odoo#117263

X-original-commit: 9bd380da016db949eaa0f6453a14a24ffaf61928
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-04-03 08:37:49 +02:00
Thomas Lefebvre (thle) 41b2480893 [FIX] hr_holidays: add employee in the event title of the calendar view
Issue:
In the calendar view of Time Off (Approvals / Time Off),
we see the "display_name" of the events,
but we don't see explicitly the name of the employees
associated with the events.

Solution:
Change the title of the event
by adding the employee's name at the beginning.

opw-3239972

closes odoo/odoo#117376

X-original-commit: 508f2a9a0adac804f82c24512d85458a888d7b62
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-03 07:37:53 +02:00
Benjamin Vray 1b6354fc06 [FIX] web_editor, *: hide 'column' options in dynamic snippets
*: website_blog, website

Before this commit, when clicking on a column in the "Blog Posts"
snippet (only with the "Big picture layout" template), the options for
that column were displayed in the editor panel, even if options should
never be displayed for the columns of dynamic snippets.

We had already prevented the appearance of options for elements in a
dynamic snippet in this commit [1] and also in this one [2], using a
'pointer-events: none' to prevent clicking on the elements. However, as
this also removed the mouse hover effect, the 'pointer-events: none' was
changed to 'pointer-events: auto', in this other commit [3], for the
"Big picture layout" template of the "Blog Posts" snippet, so that the
user could see the hover effects in edit mode. And by doing so, we
inadvertently allowed the options to appear again.

In the end, this 'pointer-events: none' was not the right solution, as
for example, for the dynamic "Products" snippet, it may be useful in
edit mode to be able to switch between slides by clicking on arrow
buttons, or to see the mouse hover effects on images (slight zoom).

In this commit, we proceeded differently by hiding the options for
elements that are inside an 'o_not_editable' element (unless they have
the attribute and value 'contenteditable="true"'), excluding them when
generating options so that they don't have associated options.

Steps to reproduce the bug:

- In edit mode, drop a "Blog Posts" snippet in the page.
- Click on the first blog image ("Sierra Tarahumara").
- Bug => Resize options are visible when they shouldn't. The options in
the "column" part of the right panel should also not be visible.

[1]: https://github.com/odoo/odoo/commit/64b663fb42ddca67a06cb067c897abb5a3c4dd70
[2]: https://github.com/odoo/odoo/commit/1345e879d809f811641ea3ad388b5d2c0b16f005
[3]: https://github.com/odoo/odoo/commit/3c0d98bcd8adf9325ee3497eb8d25ec7f904d6a5

task-3054763

closes odoo/odoo#117407

X-original-commit: 80f841e5e33f4694361730d3e015a6a813261685
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-02 20:55:50 +02:00
qsm-odoo 0c0f405018 [FIX] website_mass_mailing: add missing s_newsletter_list class
Commit [1], combined with commit [2], added a s_newsletter_list class
on two newsletter snippets to move the related newsletter option to the
root node that contains the newsletter subscription input.

The problem is that no migration script was made thus making it
impossible to customize old snippets anymore. We could mark them as
outdated... but it happens that marking a snippet as outdated (by
incrementing the vxml counter for example) is not straightforward
(users that already migrated would not get that XML update).

This creates a widget that tries to fix snippets that were malformed, on
page load. An upgrade script should be made to fix databases and get rid
of this in the future.

opw-3243399
opw-3244080
opw-3246089
opw-3246194
opw-3246435
opw-3248473

closes odoo/odoo#117416

X-original-commit: 8d7eaaf916250086cd2f628bd2f3b07cc825959a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-02 19:58:47 +02:00
qsm-odoo 6c6a079294 [FIX] website_mass_mailing: restore newsletter inputs post-upgrade
Commit [1] renamed the "js_subscribe_email" class into
"js_subscribe_value" as the same subscription feature layout is now
available for sms (not only email).

The problem was that no upgrade script was made to convert the old class
in old databases... so newly migrated users have a traceback on all
pages which contain a newsletter. For now, this patches the JS to
support both class names. In the future, we'll probably have to remove
the compatibility and make an upgrade script about the old class.

[1]: https://github.com/odoo/odoo/commit/bd6ef64f4c79b9c04dc8b85dc2daccb61d55cad0

opw-3243399
opw-3244080
opw-3246089
opw-3246194
opw-3246435
opw-3248473

X-original-commit: 2b16b4d7b2041b20c0537d78d78f447164fef5fe
Part-of: odoo/odoo#117416
2023-04-02 19:58:47 +02:00
Lucas Lefèvre 9eda122f7c [FIX] spreadsheet_account: set fiscal day in tests
Install `l10n_au_keypay` on a fresh database, run the tests:
two tests in `spreadsheet_account` fail.

They wrongly assumed the last fiscal day of the main company is always 31th December.
This is not true with the module mentioned above installed since
https://github.com/odoo/odoo/commit/65dacfc17bec5feba1216354c71ca542c1b762b2

(look at `chart_template.py`)

Runbot build errors: 19796, 19797

closes odoo/odoo#117419

X-original-commit: a8d28ef16318df7d42c93265580a8e5dbc75cb1d
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-01 18:01:49 +02:00
Hubert Van de Walle (huvw) af064c1914 [FIX] web: ImageField size attribute not applied correctly in CSS
Steps to reproduce
==================

- Go to the product page
- Open studio
- Click on the picture and set the size to large
- Save and quit studio
- -> The size doesn't change

Port of https://github.com/odoo/odoo/pull/87087

opw-3217741

closes odoo/odoo#117423

X-original-commit: 63a3466c805c09989e5e022519e1ba450ecb1053
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-04-01 17:03:57 +02:00