Commit Graph
154959 Commits
Author SHA1 Message Date
higo-odoo 16cbbf96b9 [FIX] purchase_requisition,purchase_requisition_stock: Fix Test case
How to reproduce the problem:
- Install the purchase_requistion, purchase_requistion_stock, and any Localization modules such as l10n_be or l10n_in
  (apart from USD currency any localization module)
- error caught only when at the time of module installation but it must have a different currency_id apart from USD

https://watch.screencastify.com/v/1C7GQKHBASyiluGGkFfV

Cause of the problem:
 static values Currency USD cause the problem.
 the following module will be set the currency value
 l10n_be - EUR
 l10n_in - INR
 l10n_br - BRL
 when we installed the following modules then cls.env.user.company_id.currency_id values get changes accordingly

  will lead to this error
  Traceback (most recent call last):
  File /home/odoo/src/odoo/addons/purchase_requisition/tests/common.py, line 70, in setUpClass
    cls.env.user.company_id.currency_id = cls.env.ref(base.USD).id
  File /home/odoo/src/odoo/odoo/fields.py, line 1217, in __set__
    records.write({self.name: write_value})
  File /home/odoo/src/odoo/addons/account/models/company.py, line 301, in write
    raise UserError(_('You cannot change the currency of the company since some journal items already exist'))
  odoo.exceptions.UserError: You cannot change the currency of the company since some journal items already exist
opw-2945581

closes odoo/odoo#98512

Closes: https://github.com/odoo/odoo/pull/98174
X-original-commit: 70b7c57f7ea0a619a149461e0e738ddc25b822f6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-05 19:38:45 +02:00
Adrien Widart b62e6d45d4 [FIX] purchase_stock, mrp_subcontracting_dropshipping: dropship to subcontract
A user can not buy a subcontracted product and directly deliver it
(dropship) to another subcontractor. Moreover, in such situation, the
received quantity is not correctly computed.

To reproduce the issue:
(Enable debug mode)
1. In Settings, enable "Storage Locations"
2. Create three products:
    - P1:
        - Storable
        - With a vendor V1
    - P2:
        - Storable
        - With a vendor V2
    - P3:
        - Consumable
3. Edit V1:
    - Customer Location: Physical Locations/Subcontracting Location
4. Create two BoMs:
    - Product: P1
        - Type: Subcontracting
        - Subcontractors: V1
        - Components: 1 x P2
    - Product: P2
        - Type: Subcontracting
        - Subcontractors: V2
        - Components: 1 x P3
5. Create a PO:
    - Vendor: V2
    - Deliver To: Dropship
    - Drop Ship Address: V1
    - Products: 1 x P2
6. Confirm the PO

Error: a Validation Error is raised at `mrp.production` creation because
of a missing field (`picking_type_id`).

In some cases, when getting the values to create the MO, the basic
`_prepare_subcontract_mo_vals` does not return any `picking_type_id`.
That's the reason why an override has been added in
`/mrp_subcontracting_dropshipping` (see [1] for more details). Thanks to
this override, if the usage of the destination location is `customer`,
we know that we are in a "dropship" situation and we manually define the
`picking_type_id`:
https://github.com/odoo/odoo/blob/d73e70f22e47e81e59aff0c9f578aff260447256/addons/mrp_subcontracting_dropshipping/models/stock_picking.py#L15-L17
However, in the above case, the subcontracted stock move starts from a
subcontracted location and also goes to a subcontracted location
(because of step 3). As a result, the if-condition is not respected and
the `picking_type_id` is not defined.

Once this issue is solved, there is a second one: suppose the PO
confirmed. The user validates the transfer. New error: the received
quantity on the PO is not updated. This is because of an incorrect
condition in `/purchase_stock._compute_qty_received`:
https://github.com/odoo/odoo/blob/d0537e32e5aa4b0fe2ad674ab3ec7c42ae1a12f9/addons/purchase_stock/models/purchase.py#L306-L315
Added by [2] and modified by [3], this condition checks that:
- the destination location usage is `internal` (correct, this is a
subcontracting location)
- the source location usage is not `supplier` (correct, this is a
subcontracting location, so it is `internal`)
- the destination location is not part of the warehouse children (here
is the issue: the SM does not have any warehouse, so it gives a false
positive)

So, because of the incorrect third condition, the condition is
respected. And because `to_refund` is `False` (which is correct), we
don't do anything. That's the reason why the received quantity is not
updated.

[1] d73e70f22e47e81e59aff0c9f578aff260447256
[2] e6a1e240f1
[3] fd22fe221026e353aac7414348b029ae7e290b2f

OPW-2922546

closes odoo/odoo#102224

X-original-commit: a51b4158b964a11fa371a9eb8c877c9ec395f412
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-10-05 14:26:14 +02:00
Adrien Widart 0ba6a5714f [IMP] mrp_subcontracting_purchase: add some tests
Tests for
- e6a1e240f1
- fd22fe221026e353aac7414348b029ae7e290b2f

X-original-commit: 3cbe69c8e68d872fe239f499e37fb559f20984b9
Part-of: odoo/odoo#102224
2022-10-05 14:26:14 +02:00
maximilien(malb) d0259f3275 [FIX] account: cash rounding dropdown
Two dropdown were too small, it's now corrected by adding a new group.

closes odoo/odoo#102223

Task-id: 3006637
X-original-commit: 1a56ad9895f7b5b029a27cabdffbadba60cd87ef
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-05 14:26:11 +02:00
Michael (mcm) db99d1a084 [FIX] web: fix field selector style
The commit 797c87d3948c0bf815a8a587a36be9e5bedb35de misses
some diff. This commit contains the missing diff.

closes odoo/odoo#102206

X-original-commit: 59f4d112abf1eb175214614f9a84fc0c7a4af932
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-10-05 14:26:03 +02:00
Romain Estievenart 30e598db87 [FIX] web: apply missing hover effect on form view note-editable
This commit applies the same behavior between hovering an `o_input` and
a `note-editable` inside the form view

closes odoo/odoo#102205

X-original-commit: 43b1baf10bc004a2ac5d63990b9a65aab74cba9c
Related: odoo/enterprise#32304
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-10-05 14:25:57 +02:00
Romain Estievenart 26b3ef90f7 [FIX] web: unify hover effect for edit fields on form view
This commit applies the same behavior between the community and the
enterprise for the `o_field_widget o_input:hover` effect.

Before this commit the hover on community applies a border on all
quadrant, now we only see the bottom border as in Odoo Enterprise

X-original-commit: 89d67a125fd8146d979c2b12ade1f4dbe5fc2441
Part-of: odoo/odoo#102205
2022-10-05 14:25:57 +02:00
Romain Estievenart a5a75a0b5f [FIX] web: restore min-height on form view note-editable
This commit restores the behavior we had before wowl :

- Having a min-height of 180px when the node-editable is a child
 field (without a parent form group).
 e.g: open the form view of a `crm.lead` inside the `crm` app.

- No min-height added when the note-editable is inside a form-group
 e.g: the condition & terms inside the form view of a `sale.order`
 inside the `sale` app.

X-original-commit: 294e8b8ad3efca2211cff61992b3cd07493eb1bb
Part-of: odoo/odoo#102205
2022-10-05 14:25:57 +02:00
anhe-odoo 1b2ae7fceb [FIX] spreadsheet: fix set_as_filter action in context menu
Task Description

In some case, when trying to display the context menu on a
pivot cell (doesn't seem to impact PIVOT.HEADER), we get a
traceback caused by the arguments of the formula take into
account in the ´getFiltersMatchingPivot`, called by the
"isVisible" property evaluation of the "set as filter" action.

These errors only rise when using a pivot with "__count" as
measure and a positional argument.

Moreover, when trying to open the context menu with a filter
defined without any field, we get another traceback.

Reproducibility

The first issue  can be reproduced with the following steps:
1. Go to the CRM app
2. Create a pivot view
3. Group the row by Country
4. "Ungroup" the columns (keep only the total)
5. Set "__count" as measure
6. Insert the pivot on a new spreadsheet
7. Edit the pivot formulas to use positional argument for country_id
8. Insert a new filter on the country field
9. Right click on a pivot cell

The second issue can be reproduced with the following steps:
1. Open a spreadsheet with a pivot
2. Add a filter related to the pivot but without any field matching
3. Right-click on a pivot cell

Fix Description

The first issue is coming from the fact we try to get the value related
to a field in the pivot formula using the 2nd and 3rd argument instead
of using the last two arguments of the formula. This is fixed by passing
to getPivotHeaderValue only the last two arguments of the pivot formula.

For the second issue, we simply check that the pivot field is defined
before looking at its name.

Related Task

task-2999181

closes odoo/odoo#102204

X-original-commit: 15e0c8aba57d4e0a8c58f288a4e96f0bc884736c
Related: odoo/enterprise#32303
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-05 14:25:51 +02:00
maximilien(malb) 2d80ae6857 [FIX] account: display fix account move
Before this commit, the field terms and conditions was weardly placed
And also reducing the size of the field quick_edit_total_amount

closes odoo/odoo#102192

Task-id: 3003938
X-original-commit: 10b842da4cc641145fa672c4837b0cde1120963c
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-05 14:25:48 +02:00
William Braeckman b6221c87d7 [FIX] loyalty: fix test day bugs
- Make content helper more generic for programs
- Add search fields for loyalty.card
- Fix creation emails for gift cards in pos not being sent properly
- Fix validity date check on loyalty rules being inverted.

TaskId-3002190

closes odoo/odoo#102160

X-original-commit: f893fda1a40127b7510e861c96f4d4cf9d10f79d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-05 14:25:46 +02:00
Dhaval BaraiyaandMahendra Barad <mba@odoo.com>, Prakash Prajapati <ppr@odoo.com> 1e48724f8b [IMP] *.*: update the tooltips in various modules
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.

task-2860991

closes odoo/odoo#102179

X-original-commit: 5e4cf8f9f6a4372f45aa04a5965f8073bb4ea68a
Related: odoo/enterprise#32298
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Mahendra Barad <mba@odoo.com>, Prakash Prajapati <ppr@odoo.com>
2022-10-05 12:04:48 +02:00
Alexandre de Pape (alpa) 4cf471a947 [FIX] website_sale_renting: Traceback on product catalog click
closes odoo/odoo#102161

Taskid: 3000852
X-original-commit: 4fed737bb82eaf928a66f6cd537bd115efa3a9a6
Related: odoo/enterprise#32287
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-05 12:04:39 +02:00
Alexandre de Pape (alpa) c97f380851 [FIX] website_sale{_renting,}: When you add the categories on the left you can tell if the categories are collapsible or not. But the field appears below "datepicker" that we added with rental search
closes odoo/odoo#102159

Taskid: 3004243
X-original-commit: b51efeaead1740e82c37343465b8031abc9f0251
Related: odoo/enterprise#32286
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-05 11:04:23 +02:00
Omar (Comunitea) 1c0c08bd86 [IMP] l10n_es: Add taxes for 'ISP Bienes de Inversión'
closes odoo/odoo#98021

closes odoo/odoo#102152

X-original-commit: c63d0e013a1d0f08129e56d23a519468b4cc4568
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-10-05 11:04:20 +02:00
Omar (Comunitea) e17c26c540 [CLA] Comunitea
X-original-commit: bc38529031485dfbf3e82fa52f60140e59b67e86
Part-of: odoo/odoo#102152
2022-10-05 11:04:20 +02:00
Danial Sheikhani 59cee7b12e [FIX] website_sale: display issue in product form view
This commit fixes display issue of base_unit_price

task-2996496

closes odoo/odoo#102144

X-original-commit: 02f8ba495a82f1d0b654d561bf8e4c877b570756
Related: odoo/enterprise#32278
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-05 11:04:14 +02:00
Aaron Bohy 51d81bf1df [REF] web: remove deprecated widgets from registry
closes odoo/odoo#102170

X-original-commit: a63e0eb264cb60fafe5f85fefa2f140881f1f9c2
Related: odoo/enterprise#32294
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-05 09:35:07 +02:00
FrancoisGe 39ecfcff49 [FIX] web: sort an open group
This commit solves two bugs:

1. In a grouped empty list view, if you click on a sortable column,
then a crash is displayed.

How to reproduce:
- Go to a grouped empty list view with at least one sortable column
- Click on the sortable column

Before this commit :
    A crash is displayed

After this commit:
    Nothing happens.

2. In a grouped view with at least one open group, columns that do not
have an aggregates value cannot be sorted.

How to reproduce:
- Go to a grouped list view with at least one open group.
- Click on a sortable column that does not have an aggregates value

Before this commit:
    Nothing happens

After this commit:
    The records are sorted by the clicked column.

closes odoo/odoo#102143

X-original-commit: 537bbc79fe0ce34fe8b4746bf4cc86f9ebfc8a12
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-10-05 09:34:59 +02:00
PoMa 16da82cbdd [FIX] account_accountant: disable bank_rec_widget keyboard nav
Keyboard navigation was misleading, and it was adding a box around
focused which was irremovable because it was injected by the browser

closes odoo/odoo#102033

X-original-commit: 519bbe4b55c907bcd71d03e34dbc706d13a2268b
Related: odoo/enterprise#32235
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-05 09:34:56 +02:00
FrancoisGe 63b8a92e9c [FIX] web: html field in list view
Before this commit, in a list view, html fields in readonly mode were
not rendered correctly. It displayed unprocessed HTML.

For the value :
    <div>Hello</div>

Before this commit, it was displaying:
    <div>Hello</div>

After this commit, we display:
    Hello

closes odoo/odoo#101253

X-original-commit: a6292c17b886996c82c797e562b725d63d4a5b7e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-05 09:34:52 +02:00
Kevin Baptiste 2d9744195c [FIX] hr_holidays: close tag
The `<span>` was not properly closed.

closes odoo/odoo#102162

X-original-commit: cb3b87f8fe66d11e1a96066a27eb3ef979bc3e39
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-05 08:34:00 +02:00
Radhika Shyara 1d9598fd08 [FIX] project: fixes missing stage changed notifications
Steps :
 - When the user is subscribed to the `Stage changed` subtype
   but not `Task in progress` and on change of stage, the users only
   subscribed to stage changed will not receive stage changed notification.

Cause :
 - When the stage is changed it will also change the kanban_state to
   in progress and due to that, it will track the kanban_state from
   _track_subtype, and the user who subscribed only stage_changed will not
   get notified.

Fix :
 - So in this commit, prioritize the stage_id changed notification so that
   when the stage_id is changed we use that one, and the in-progress won't
   be triggered, but when we change the kanban state back to progress it
   will be triggered. As in progress is implicit when changing the stage_id.

task-2818058

closes odoo/odoo#102172

X-original-commit: 4d952d679629a4a225ff208a6d018e11f14bf47e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-05 07:38:44 +02:00
Benoit Socias cbe58fd16f [IMP] website: move device visibility options onto visibility options
Before this commit the Device visibility option was on its own row
inside the options panel.

This commit moves the buttons of the Device visibility option before
the dropdown inside the main row of the Visibility option.

task-2900730

closes odoo/odoo#102154

X-original-commit: 82000acfb6f8c7884994135413dcddac5441f8b4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-05 03:23:21 +02:00
Benjamin Vray f317dd5bcb [FIX] website: fix dropdown menu closing in edit mode
Before this commit, in edit mode, it was not possible to close an open
dropdown in the header anymore.

This was due to BS5 (merged at [1]). Before, the 'show' class was added
to the dropdown menu element (the element with the 'dropdown' class).
But that changed: the 'show' class is now added on the button (the
element with the 'dropdown-toggle' class). And as in edit mode the
openings/closing of the dropdowns are handled manually in the header, it
no longer worked correctly.

[1]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968

task-3001198

closes odoo/odoo#102145

X-original-commit: f3e1dc52356164453f72827e3dc87ad903df3d0e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-05 01:18:59 +02:00
Sébastien Theys bdea645949 [FIX] mail: fix and clean display of chatter in new form views
Fix display conditions, clean duplicate code.

Follow up of https://github.com/odoo/odoo/pull/100570

And follow up of https://github.com/odoo/odoo/pull/98101/ (for the SCSS part)

task-3003947

closes odoo/odoo#102165

X-original-commit: 6c6d7ce06ed4b18162db893a0afb65e0479ee11f
Related: odoo/enterprise#32290
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-05 00:09:00 +02:00
Didier (did) 8554c9d583 [FIX] im_livechat: move checkbox "only if no operator"
task-3006024

closes odoo/odoo#102158

X-original-commit: 0e314674d4157e5f10a313ec70008ed443ce8366
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-05 00:08:57 +02:00
Mathieu Duckerts-Antoine 6b2dab4868 [FIX] web: list: allow accurate text selection
Before that commit, it was not possible to select some part only
of a input/textarea input in an editable list view.

closes odoo/odoo#102169

X-original-commit: e572c11ecfb994a474ce800e46895e9233fae64b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 23:00:42 +02:00
Aaron Bohy d9d174efc6 [FIX] web: FormViewDialog: add "Remove" button
In the conversion of the FormViewDialog from legacy to wowl, we
forgot the feature allowing to display a "Remove" button in the
footer, and to execute a custom callback when this button is
clicked. This is used for instance by the Gantt view.

This commit restores the feature.

closes odoo/odoo#102149

X-original-commit: 3eb126d0297a7e3db0cb98cd1ad9555eefaa0cfa
Related: odoo/enterprise#32281
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 22:00:43 +02:00
Aaron Bohy 78c6c70ee4 [FIX] web: FormViewDialog: handle close attr on buttons
Before this commit, clicking on view buttons with attribute
`close="1"` in FormViewDialog didn't close the dialog once the
button action was performed. This commit fixes that issue, and
ensures we do not reload the record if we're about to close the
dialog.

X-original-commit: 32d211a6fd5c121fa5f556f1d78b79421edc6f68
Part-of: odoo/odoo#102149
2022-10-04 22:00:43 +02:00
Pierre Rousseau 9d455d830b [FIX] spreadsheet_dashboard: set the first sheet as active sheet
Before this revision, the active sheet was not correctly set to the first
sheet.

Task-id 3002541

closes odoo/odoo#102148

X-original-commit: faf6cde43f5d092b8b053d4b6392c6641ec0a48e
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-04 22:00:40 +02:00
FrancoisGe afdaf8cb4f [FIX] web: create a record with the widget "many2many"
Before this commit, creating a new record with the "many2many" widget
did not allow to use a context containing a default value
for the parentID (id of the Record containing the many2many).
This value is ignored.

How to reproduce?
- Go to a form view with a field using the "many2many" widget
 with context = {"default_parentID" = ...}
- Click on "Add a new line"
- Click on "Create" (The form view should display the parentID field)

Before this commit:
    The parentID field is empty.

After this commit:
    The parentID field contains the record corresponding
    to "default_parentID".

closes odoo/odoo#102157

X-original-commit: a52eacc5397dc2f98eb052f4cd1e362a97621074
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:58:07 +02:00
Mathieu Duckerts-Antoine 2c60272507 [FIX] web: ModelFieldSelector: click on popover back button
Click on the back button in the model field selector popover used to
often remove too many names in the path created via the selector. For
example, starting with "partner_id.name" and clicking on the back button
in the opened popover would give the invalid path "" instead of
"partner_id". We fix that problem.

closes odoo/odoo#102156

X-original-commit: e4a7b63c68a87d7afef987e8d036d7ba9c5b6f96
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-10-04 20:58:04 +02:00
Mathieu Duckerts-Antoine 7db644da96 [FIX] web: DomainSelector: operator change
In a domain selector, have a selection field and the operator "is set"
selected, then change the operator to be "=". A crash occurs. This
happens because the category of operator change and thus the function
onDidTypeChange of DomainSelectorSelectionField is called with no
parameter. The same problem can happen with DomainSelectorDateTimeField.

We fix that by calling component.onDidTypeChange with the right
parameter in any case.

X-original-commit: a01c2473d93d0d123391ba0131ad505775b3c50b
Part-of: odoo/odoo#102156
2022-10-04 20:58:04 +02:00
Lucas Perais b072e1bd5b [FIX] web: form always edit: a virtual record can be discarded
Before this commit, a virtual record in form view always had the
o_form_dirty class, which is problematic when a tour ends with a virtual record.

After this commit, a virtual non-dirty record in form view doesn't have
the class o_form_dirty, and doesn't have the o_form_saved either as that doesn't make more sense.

closes odoo/odoo#102153

X-original-commit: 0041b9fd8eb75d5b680d94d491e2b9f684b2d0c1
Related: odoo/enterprise#32282
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:58:01 +02:00
Lucas Perais 5992fac7aa [FIX] web_tour: drag_and_drop_native: pass position to mousemove
Before this commit, the positions of the virtual pointer were not
passed to the mousemove event, preventing draggable code to correctly work.

After this commit, the Event is a proper MouseEvent, with clientX and clientY set
correctly.

X-original-commit: 2e60d1b733fd73021fb1dea490e6fa3ba2fc31d0
Part-of: odoo/odoo#102153
2022-10-04 20:58:01 +02:00
Julien Mougenot 5805ca28a8 [IMP] core/utils: make separate useDraggable hook in web
A new useDraggable hook is introduced and used in the various components that
use the feature.

It relies on the draggable hook builder which is a generic way to prepare
specific drag and drop features.

X-original-commit: cb1cfe5f5efe1b683d7fdffde3718bd8bf1bcd86
Part-of: odoo/odoo#102153
2022-10-04 20:58:00 +02:00
Julien Mougenot dc7ac937b0 [IMP] core/utils: improve sortable hook with generic draggable hook
X-original-commit: 13745d597d03b552fe5f73ca81143a49efb8aa9f
Part-of: odoo/odoo#102153
2022-10-04 20:57:59 +02:00
Lucas Perais 288623993a [FIX] web: Notebook: class set on pages should appear in DOM
Have a form arch containing
```
<notebook>
  <page class="myClass" />
</notebook>
```

Before this commit, "myClass" did not appear in the final DOM.

After this commit, it does.

X-original-commit: e886adcb38695bcfa8a9f741d4e496229fb199ff
Part-of: odoo/odoo#102153
2022-10-04 20:57:59 +02:00
Mathieu Duckerts-Antoine 75789de7e1 [REF] web: views: put FormLabel's template in xml.
This commit improves extensibility of FormLabel component's template

X-original-commit: f463f28f6d4c2487d59b713ad9118bbaf19b8d3c
Part-of: odoo/odoo#102153
2022-10-04 20:57:59 +02:00
Mathieu Duckerts-Antoine d21634c394 [REF] web: 'web.Field' template
X-original-commit: 60c7b65f7f8efd5209b9fb0166a69035fb92e911
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais 36385e736d [FIX] web, x2ManyField: allowed to not have an arch set
In which case we just don't render any Renderer.
Useful when we want to render invisible fields.

X-original-commit: e77afa6266a66e9d126d9a0293bb3e0eb8fb0ff3
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais 9c375b48fa [FIX] web: legacyLoadViews: correctly retrieve string from arch
X-original-commit: f1f45d2673fe87abfb8cfdd5b978f16db373b53d
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais a02af5b259 [REF] web: basicRelationalModel: factorize legacyUtilities
The mapping operations between the new RelationalModel API and the
BasicModel is now done in its own file

X-original-commit: 1202610ce6946ee4b2878e19e6ee6038edc9a71e
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais 5cee846bb2 [REF] web: formGroups: improve extensibility
X-original-commit: 9f64da010ef74848a3e4dd6b2c6d99365a0312c2
Part-of: odoo/odoo#102153
2022-10-04 20:57:57 +02:00
Lucas Perais 654b47e253 [REF] web: improve ViewCompiler and FormCompiler extensibility
X-original-commit: b0897a76dbbad039043b29b248ba13bfb518f45c
Part-of: odoo/odoo#102153
2022-10-04 20:57:57 +02:00
Joseph Caburnay ec2b66fb13 [REF] barcodes,web: barcode_handler and field_float_scannable to wowl
closes odoo/odoo#102150

X-original-commit: c57a0ada02bfc1f02b3516f92f87b510942c5a87
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:57:44 +02:00
FrancoisGe 75ca493a15 [FIX] web: click on m2o_avatar in editable/multiEdit list
The goal of this commit is to fix the behaviour of clicking on a field
with the "many2one_avatar" widget in a list view.

Expected behaviour when clicking on a field with the "many2one_avatar" widget:
- Editable list view: switch row to edit
- Multi_edit list view with selected record: switch row to edit
- Other case: open the many2one_avatar record in a form view

Before this commit, clicking on a field with the "many2one_avatar" widget always
opens the record in a form view.

After this commit, the expected behaviour when clicking on a field with
the "many2one_avatar" widget is respected.

closes odoo/odoo#102146

X-original-commit: ad597d414c59723d3c6af5dfdc1a3a41fd4f4032
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:57:42 +02:00
Romeo Fragomeli bf7997e5ee [FIX] web: quick create inputs don't take all space
Adds `width: 100%` on the `.o_field_widget` so the input it can take the
all width in the "Quick Create" form.

Also, this commit fixes the CSS selector for the `margin`
rule as in the "Quick Create" form view there is no `.o_group` anymore
on `.o_inner_group`.

Steps to reproduce:
* Go to project
* Select a project
* Click on the `Create` button => BUG

closes odoo/odoo#102151

X-original-commit: 774213758c7ddf7b74a9b370457f017e09d9bbcf
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-10-04 20:01:32 +02:00
Simon Genin (ges) a36fdc43cd [IMP] web: toggling an optional field in list view do not unselect row
Toggling an optional field was unselecting the row, but didn't correctly
copy the same bahavior than legacy when it comes to the saving and
discarding of the data being edited.

However, by simply removing the line of code unselecting the row, we get
a better ux for no cost. The user can continue the record edition after
adding or removing columns.

Note that the focus will always be reset to the first column though.

closes odoo/odoo#102142

X-original-commit: 63c87eac6173af13ec84f90a7f25f07a074197f3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-10-04 20:01:29 +02:00