Commit Graph
13 Commits
Author SHA1 Message Date
Jorge Pinna Puissant ef424a9dc2 [REF] *: remove owl from linter's accepted global variables
Before this commit, owl was in the linter's accepted global variables.
This allowed  direct access to owl global object.

For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`

Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:

`import { xml } from "@odoo/owl";`

task-id 3498859

closes odoo/odoo#137517

Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-05 10:21:53 +00:00
Gorash 0d99f4b9d9 [REF] base,all: Update modifier syntax: adapt JavaScript
closes odoo/odoo#104741

Related: odoo/enterprise#35255
Related: odoo/documentation#3523
Related: odoo/upgrade#4884
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-18 09:49:16 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
Adrien Dieudonne 42a458f144 [FIX] web, *: x2many list horizontal overflow
Follow-up of https://github.com/odoo/odoo/pull/121468

Since https://github.com/odoo/odoo/commit/9f4622492c5cd84847368d32bf02b0b538a6dd69 (16.2), ´additionalClasses´ has to be added on the field
instead of the component.

closes odoo/odoo#122963

X-original-commit: 82228e65b59427d536f10970cd85610136347ff8
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-05-31 09:23:16 +02:00
Adrien Dieudonné fdf4cbf600 [FIX] web, *: x2many list horizontal overflow
This issue only occurs on Firefox because ´has´ is not supported
and the following rule is not applied:
https://github.com/odoo/odoo/commit/2cd0106e63785dd34553c2b4747d72b93b9a7afd

Anyway, there is an existing css rule that is applied if the field
class is correclty added.

Steps to reproduce:
- Open Sale
- Add some content in the sale order line

opw-3201461
opw-3285854
opw-3266130
opw-3244581

closes odoo/odoo#121979

X-original-commit: add1df806157c074fd1a3224d1d8bdf1922481fb
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 08:42:12 +02:00
Michael (mcm) 9f4622492c [REF] *: register field descriptors instead of components
Before this commit, the field's description was stored on the
component and this component was then registered.

Now, an object describing the field is used on registration the same way
as it is done for views since https://github.com/odoo/odoo/commit/b828cfc72c587d0b73fcc5459695705640437671.
This split the component's description (props, template, ...) of
the field's description (displayName, supportedTypes, ...) and makes
it clearer.

closes odoo/odoo#112498

Task: 3171520
Related: odoo/enterprise#37105
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-16 14:13:32 +01:00
Aaron Bohy 49297bc7bb [REM] *: remove legacy basic views + some fields/widgets
This commit removes the legacy implementation of the form, kanban
and list views. It also removes the legacy view widget registry,
and all legacy widgets it contained. The legacy field registry
couldn't be removed yet as some fields are still used (e.g. in
client actions: FieldMany2One, FieldMany2ManyTags...), and
sometimes accessed from that registry (e.g. uom service). More
clean up will come later. Note that all tests using legacy views
have thus been removed, even though the tested feature might still
remain (e.g. FieldMany2One tests have been removed, but that field
is still there). However, those features are deprecated and
unlikely to evolve. They should be removed in the next saas, or the
one after.

Finally, this commit also removes the legacy view dialogs.

Task 3168640

Part-of: odoo/odoo#111809
2023-02-08 13:27:58 +01:00
Julien Mougenot f34768a555 [FIX] web,*: Unify active actions
`activeActions` is a set of boolean values determining what actions
(i.e. 'create', 'delete', etc.) can be performed on the current view or
subview (x2many).

Before this commit, the x2many fields used a different naming convention
than the one set on the views (e.g. 'canCreate' instead of 'create').
This caused mismatches when subviews would try to rely on the parent
view `activeActions` to define their own. This also introduced a bad
design where the "type" of `activeActions` would be determined by that
same mismatch.

Another issue was that the list renderer did not always check for the
existence of activeFields in its props, despite defining them as
optional.

This commit unifies the names of the active actions accross views and
x2many fields, while adding a "type" property to it s.t. its owner
can determine what context it finds itself in.

closes odoo/odoo#102115

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-10-10 10:53:48 +02:00
Michael (mcm)andluvi 710271240f [IMP] web: remove readonly mode of form view
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
  it means that the fields in the view are always in edit mode except
  if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
  the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
  button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
  hovering the status text in control panel.

task id: 2822553

X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
2022-09-27 12:43:50 +02:00
stefanorigano (SRI) eb1fa44652 [IMP] web: o_optional_columns_dropdown, move into thead
This commit moves the element inside the table to avoid that the
dropdown may overlap thead column labels.
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2946835

Part-of: odoo/odoo#98234
2022-09-12 10:06:56 +02:00
Mathieu Duckerts-Antoine 6a5497c187 [REF] resource: convert section_one2many
This commit converts the old "section_one2many" field to the new
WOWL field API.

closes odoo/odoo#97984

Related: odoo/enterprise#30789
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-29 13:49:11 +02:00
Arnaud Joset 0cb64fd99c [IMP] resource: improve clarity of two weeks explanations
Before this commit, when two week calendar were used, the tooltip was wrongfully assuming which week were odd and even.
Even with correct information, it was not easy to fill and could easily lead to wrong information on the payroll.

closes odoo/odoo#56055

Taskid: 2308804
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-28 12:26:07 +00:00
jbm-odoo 1e8db02368 [IMP] resource: Manage calendars over 2 weeks
Purpose
=======

In Belgium, we need to support some partial time on 2 weeks.
For instance, a mid time, means you could work on monday, tuesday
and wednesday on week1 and monday and tuesday on week 2. Others payroll
softwares manage this.

Specification
=============

Add a checkbox on resource calendar to manage 2 weeks. --> Consider even/odd weeks.
Add sections on calendars (Like sales orders)
Modify methods in resources to apply this behavor generically.

Check that attendances aren't overlapped

Write an integration test for holidays - benefits - payslip
to check all this, + "credit temps" and wage modification.

Note
====

For the sake of simplicity, we only manage calendars over 2 weeks
to consider the odd/even weeks and keep an easy implementation.
For more complicated calendars (eg: over a months with specific targetted days),
it's better to create specific allocation requests and apply specific leaves
for those days, as it would be the case for parental leaves.

closes odoo/odoo#31674

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-06-25 08:02:14 +00:00