Commit Graph
154691 Commits
Author SHA1 Message Date
Tiffany Chang (tic) c9ea3fcac6 [IMP] purchase_requsition: convert custom js to OWL
For original specs, see [1].

Some performance changes: the best price/date/unit price fields are now
loaded by JS instead of passed via action context (allows for easier/
consistent reuse of view + now we can refresh without undoing any state
changes due to buttons being pushed).

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

closes odoo/odoo#101502

X-original-commit: 41ae508c2e6fc3c40b29b1bfc4b5dd7c4440a719
Signed-off-by: Antony Lesuisse <al@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-09-29 12:16:58 +02:00
Adrien Widart f25e271c4a [FIX] mrp: add operation field on kanban view
When creating a MO with some WO from a mobile, the quality checks are
not created

To reproduce the issue:
(Need quality_control)
1. Create two storable products P_compo, P_finished
2. Create a BoM:
    - Product: P_finished
    - Components: 1 x P_compo
    - Operations: create a new operation OP
3. Add a step to OP:
    - Type: Pass - Fail
4. Switch into mobile mode
5. Create a MO for 1 x P_finished
6. Confirm it
7. Open the WO

Error: the tablet view skipped the pass-fail step, the user can already
mark the MO as done and close it

When confirming the MO, it leads to the quality checks creation. To do
so, we iterate on the `quality_point_ids` of the WO to generate these
quality checks:
https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L406
But, the WO has not any quality point, which is incorrect: it should
have the one related to the step created on the operation P. This field
is a computed one and is based on the quality points defined on the
operation linked to the WO:
https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L70-L73
But again, there is an issue: the WO has not any defined operation
(which is incorrect, it should be linked to OP). And this is because of
the WO creation from the kanban view: the field `operation_id` is
missing so it is not defined during the WO creation.

OPW-2984037

closes odoo/odoo#101346

X-original-commit: 751f1253d4a32491d210aceb4767084088c314ad
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-09-29 12:16:55 +02:00
Pierre Paridans d4c9a58d1d [FIX] web_editor: toolbar should be scrollable on smaller screens
Before this commit, when all editor toolbar's items doesn't fit into the
screen width, they can't be reached.

This commit fixes it by allowing the toolbar to be scrolled horizontally
to let the user reach all the items.

Steps to reproduce:
- Open a Contact
- In the notebook, open the Internal Note tab
- Focus the description field
=> the toolbar's last items are inaccessible

closes odoo/odoo#101537

X-original-commit: 3a7349d02b6b667c890af2f197a3640d875b804e
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-29 11:13:15 +02:00
stefanorigano (SRI) b633a95bb6 [IMP] web, web_editor, website, spreadsheet: use system fonts
Use system fonts for backend and web-editor's UI.
This commit removes references to proprietary fonts and allows the OS
to use the system ones. The aim is to reduce http request and the
general footprint (see enterprise counter-part).

The new font-stack:

- apple-system (San Francisco): iOS Safari, macOS Safari, macOS Firefox
- BlinkMacSystemFont (San Francisco): macOS Chrome
- Segoe UI: Windows
- Roboto: Android, Chrome OS
- Helvetica Neue: old OSX versions
- Ubuntu: Ubuntu
- Liberation Sans: Linux (others)
- Arial: Any
- sans-serif: General fallback

This was actually already introduced for the website default theme and
as a general option with [1] but it was not complete: if reaching the
need to use Roboto of the font stack, the repo Roboto was used instead
of the potential system one. It was not shown during testing with the
previous font stack. With the new one, on Ubuntu, it was revealed as
the Ubuntu font comes after Roboto.

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

task-2995248

closes odoo/odoo#101533

X-original-commit: 9f8f8f2ef88aee746819469c918b2d31ec29d031
Related: odoo/enterprise#31985
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-29 11:13:10 +02:00
Mathias Mathy (MAMA) 71a06e1aae [REM] stock_picking_batch: choose_lines_widget
the choose line widget is never used and can be safely removed.

closes odoo/odoo#101484

X-original-commit: 96462cec054d05955839a4a24d1c6aa9a3c7d7e2
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-29 11:13:07 +02:00
tsm-odoo c7ef46977a [IMP] bus: remove websocket connection lost toast
Before this commit, loosing the websocket connection would
have resulted in a toast being displayed. This toast is seen
as degrading the UX experience and is redundant with the already
existing "Connection Lost" toast. This PR removes it.

closes odoo/odoo#101501

X-original-commit: a26c8aa18ad6c4f52a4526e20d570ca1bc4123f2
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-09-29 10:12:03 +02:00
Dardenne Florent (dafl) 9a132ba95f [FIX] web: many2many_tags_field: fix mobile placeholder
Before, in mobile, the placeholder for `many2many_tags_field` when in mobile
was the text "props.placeholder".

Now the placeholder text is dynamically set.

closes odoo/odoo#101513

X-original-commit: b7fe9f2cf2b04b1172ec2ecbb3998328976f4960
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-29 09:09:09 +02:00
Brieuc-brd 47de574e1b [FIX] im_livechat: adapt window height
Since PR[1] the size of the chatWindow has been increased in the
backend.
But on the frontend, this window has kept the old height.

This commit fixes this issue.

PR[1] : https://github.com/odoo/odoo/pull/92872

closes odoo/odoo#101508

X-original-commit: bd9849361d2a72ddd9a036edcf31fab21316d909
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-29 09:09:06 +02:00
Kevin Baptiste b84c7824f8 [FIX] hr_holidays,hr_recruitment: fix styling
Fix styling of form view after merge of form-always-edit.

closes odoo/odoo#101506

X-original-commit: 2cb4797d66b128c982e005a2b46f9347eecac5da
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-29 09:09:03 +02:00
Kevin Baptiste 55f75818a1 [IMP] hr_recruitment: convert widget to Owl
Convert the ApplicantChar (opening the form view of the applicant) to
Owl.

closes odoo/odoo#101495

X-original-commit: d1ff94c6675acff76b19ff984fcbc89805bd4d38
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-29 09:08:58 +02:00
jbw-odoo a32bca2bdc [FIX] l10n_it_edi: handle negative unit price
Before this fix negative aml unit prices were systematically set to positive in the edi xml generating inconsistencies.

Manual forwardport of d31d562

closes odoo/odoo#101493

Task: opw-2963947
X-original-commit: 0954550e55ce35445a198006872a12298cd77d5b
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2022-09-29 09:08:55 +02:00
Rob Coekaerts b0ab807e0a [FIX] hr_skill_slides: log course notifications on correct chatter
Since https://github.com/odoo/odoo/pull/94876 every call to
_action_add_member (or _remove_membership) in hr_skill_slides is
wrongly logged on the chatter of the calling employee. With this commit,
it is now logged on the affected employee.

The method is now also supported to be used in batch.

task-2980912

closes odoo/odoo#101486

X-original-commit: dd77aee24cdac95dd4c07393f8ee74fe5d80d922
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-29 09:08:50 +02:00
Camille Spiritus 525806a039 [FIX] account: display actual amount in payment view
The amount displayed in the payment list view was always the full amount of the invoice

This would not always correspond to the actual amount of the payment, for example if a cash discount is applied.

Fix: the amount displayed is the amount actually registered

task-2991745

closes odoo/odoo#101455

X-original-commit: 98ce4327522533d90f3f6b36dcd171faa5dde086
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2022-09-29 09:08:47 +02:00
Thomas Lefebvre (thle) c438197675 [FIX] payment_authorize: long partner name credit card payment
Steps to reproduce:
    - install payment_authorize module;
    - complete a credit card payment using Authorize.net with a partner name of almost 50 characters;
    - confirm the payment.

Issues:
    An error message appears.

Causes:
   The Authorize.net API define the max length of information.
   It is possible that some information exceeds the maximum length.
   (https://apitest.authorize.net/xml/v1/schema/AnetApiSchema.xsd)

Solutions:
    Truncate information if the number of character is too large.

opw-2990762

closes odoo/odoo#101496

X-original-commit: 9da8882e0b218e95f2662a9c7f980b17b72fe7be
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-09-29 08:05:52 +02:00
Pierrot (prro) 18af81960c [FIX] account: stop open move widget propagation
With the adaptation to OWL, the widget did not stop the js propagation,
leading to a traceback error.

closes odoo/odoo#101494

X-original-commit: a7985185589de6454178c8d6df3d95fb0f2cac15
Related: odoo/enterprise#31964
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Roose Pierre-Rodéric ( prro) <prro@odoo.com>
2022-09-29 08:05:47 +02:00
Thomas Lefebvre (thle) 9cb4cbc270 [FIX] account: currency issue in payement receipt print
Steps to reproduce:
	- install the "account" module (Invoicing app);
	- create an invoice;
	- make partial payments in other currencies,
	- print the payment receipt.

Issues:
	The amount and the currency do not match.
	In addition, it is difficult to see the conversion between the payment currency and the invoice currency.

Causes:
	The currency symbol of the line corresponds to the payment currency.
	The amount of the line corresponds to the amount converted into the base currency of the invoice.

Solutions:
	Add one column named "Amount In Currency" and add the amount in the currency of the payment.
	In the column "Amount", correct the symbol of the currency.

opw-2973067

closes odoo/odoo#101489

X-original-commit: b05d95a046fb7cfd438adce3d5f1e8b2f84953bf
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-09-29 08:05:45 +02:00
Nicolas (vin) ee6c6c1b9e [IMP] account: bank statement misc improvements.
In order to better display the functionalities, we will change how
the demo data for bank statement are created. There will now be one
bank statement and multiple bank transactions not linked to a statement.
Also rewords one error to be clearer.

closes odoo/odoo#101466

X-original-commit: 5e14b28905fc00bad2c2ccd40328c676d049917d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-09-29 08:05:42 +02:00
Thomas Josse (thjo) f4f61a4b5e [IMP] survey: UI Preening
Purpose
=======

Keep iterating on the UI & Onboarding of Survey as we plan to massively
distribute it with the new Saas formula (installed by default).

Specs
=======
* Changed the look and feel of the Action Helper inside the Surveys
* Changed the Default Feedback Form: end message modified and two layers
removed

task-2901947

closes odoo/odoo#101507

X-original-commit: 6280f160d77e3c1777516fbfd2e225e13642872b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-28 21:26:47 +02:00
Patrick Hoste 385fc1c7eb [IMP] web: allow custom 'modal-body' class on Dialog component
This commit simply enables a custom prop for the Dialog component so that it
can have a hand-picked background instead of the default 'white'.

Will notably be useful for the social images carousel where we need a dark
background.

Task-2855647

closes odoo/odoo#101505

X-original-commit: 8da44acadbd4ad4c03dba496daf317f1f2ab8371
Related: odoo/enterprise#31973
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-09-28 21:26:37 +02:00
Aaron Bohy 6f455ca0c9 [FIX] website_hr_recruitment: remove toggle_button widget
For the sake of consistency with the other website content views,
this commit removes the `toggle_button` widget to display the
`is_published` field in the jobs list view.

closes odoo/odoo#101504

X-original-commit: 59b9b52bec9edd5de9b24cb8c353cdc73945d4bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-28 21:26:35 +02:00
Julien Mougenot e8124d2e38 [FIX] web,*: Fix style in sample data views
This commit defines new rules to disable elements in views using sample
data.

Previously, this was done by setting a 'o_view_sample_data' class on the
view and then setting another class 'o_sample_data_disabled' on elements
which had to be disabled.

Now, the logic determining which elements are disabled has been moved to
each view's SCSS file to avoid polluting the templates with redundant
class assignations. A mixin (o-sample-data-disabled) has been defined in
the SCSS utils to have the same rules on these elements.

closes odoo/odoo#101485

X-original-commit: 3e413c96ff2dff60de22e1d5e1fed7070ac2943d
Related: odoo/enterprise#31960
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-28 21:26:32 +02:00
Julien Mougenot 05d361d383 [REF] web: Rename legacy sample view class
This commit renames the 'o_view_sample_data' class to
'o_legacy_view_sample_data' in legacy views to allow new views to use
different sets of rules.

X-original-commit: 05ae053dc94f9ce91c099d74f6740604e3e376c3
Part-of: odoo/odoo#101485
2022-09-28 21:26:32 +02:00
Lucas Lefèvre a3c69f2592 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/758a22f6 [FIX] chart: allow plugins to react to chart duplication
https://github.com/odoo/o-spreadsheet/commit/d8116451 [IMP] line charts: Introducing stacked line charts
https://github.com/odoo/o-spreadsheet/commit/8a428d31 [IMP] spreadsheet: Introducing Frozen panes
https://github.com/odoo/o-spreadsheet/commit/804a8a34 [IMP] notification: Add new notification type
https://github.com/odoo/o-spreadsheet/commit/733d8ecf [REV] composer: bad cursor placement on focus
https://github.com/odoo/o-spreadsheet/commit/6423a245 [FIX] collaborative: do not transform commands in other dimension

closes odoo/odoo#101396

Related: odoo/enterprise#31915
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-09-28 21:26:22 +02:00
Nemael 51156b5682 [FIX] mail: emoji stay hovered when scrolling
This PRs fixes an issue where an emoji stayed greyed-out when
hovered, and the popover is scrolled

This fix create a field to hover an emoji, and the field can
only hold one emoji view at a time

Task-2998153

closes odoo/odoo#101499

X-original-commit: 5c2a6878856635d732a417ea9f8067953ba6df33
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-28 20:30:00 +02:00
William Braeckman 6a42ec7c73 [IMP] calendar: migrate attendee_calendar to wowl2
Migrates the attendee_calendar view aswell as the modules patching it.
The code has been simplified as much as possible to reduce complexity
while still retaining a similar flow.

TaskId-2999194

closes odoo/odoo#101492

X-original-commit: ee14c3ec4830454d80a63793a91f6d1c838363f1
Related: odoo/enterprise#31963
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-28 20:29:51 +02:00
Arnaud Joset e34a9322b4 [FIX] web: fix missing labels for week_days widget
If the day fields are missing from the fields in the view the labels are
not loaded.
This commit adds default labels to the fields to avoid them being empty.

TaskId-2999194

X-original-commit: c6f8a229e9a8bcb798dc2944185fc48c3c871025
Part-of: odoo/odoo#101492
2022-09-28 20:29:51 +02:00
Arnaud Joset 5b0fc11639 [FIX] calendar: default value for recurrent meetings
Before this commit, the default values of a recurrent meeting were overriden
by the false value, resulting in "count = 0" dans "weekday = False" in the form
view of recurrent meeting by default.

TaskId-2999194

X-original-commit: c8d9eefdc99eaacc124eebf7f0cbaabed4e38bf4
Part-of: odoo/odoo#101492
2022-09-28 20:29:51 +02:00
Arnaud Joset e01352f806 [FIX] google_calendar: fix logging parameters
Before this commit, _do_request can either receive json or dict as parameters.
requests.request param value can also be a string or a dict.

When the params is a string, the code tries to copy it with the copy method
which is only available on the dict, resulting in an error.

TaskId-2999194

X-original-commit: 75f889ca013d41939c669f07035e39d056d581d7
Part-of: odoo/odoo#101492
2022-09-28 20:29:50 +02:00
William Braeckman 99adf83e38 [IMP] web: expose sub template of calendar components
Make it easier to override component's sub templates by making them
overridable on the component.

TaskId-2999194

X-original-commit: 4f4e91ebb14d563dd3ec6d305b9984db25e06cbf
Part-of: odoo/odoo#101492
2022-09-28 20:29:50 +02:00
Nicolas (vin) 59e14989f7 [IMP] account: Opening the journal item on analytic line open the move
Opening the account move line form view from here is not useful,
as most would do it only to access the move behind it.
In order to display more relevant information, the move line
on the analytic line form view will instead directly open the
account move of the move line.

closes odoo/odoo#101491

X-original-commit: 1a861bd5d9f9a01e815e53f147c950f1535789c5
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-28 19:32:02 +02:00
clesgow e8367f2df8 [FIX] web: Bootstrap 5 vs wkhtmltopdf incompatibilites
In Bootstrap 5, the `container` class was updated to use variables for
its left/right paddings. This seems to conflict with wkhtmltopdf, and no
paddings are added, shifting all reports.
This introduces the set paddings defined in Bootstrap 4 for the reports.

Steps to reproduce:
Go to Inventory -> Products -> Products -> Any consumable/storable
product -> Print labels -> Dymo

Also with Bootstrap 5, the `table-borderless` class wasn't working
properly on the PDFs either, as the borders were still visible. This
removes all borders within a `table-borderless`.

Steps to reproduce:
Go to Inventory -> Products -> Products -> Any consumable/storable
product -> Print labels -> 2x7 with price

Part of task-2985735

closes odoo/odoo#101490

X-original-commit: 0b9acefb18ad8b4a0df72789c853ed8d113a495b
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-28 19:31:59 +02:00
Ricardo Gomes Rodrigues (rigr) 5026b6806d [IMP] account: improve the payment terms preview
This commit improves the payment terms by:
- Showing "Payment terms" instead of "Due date" if the user has selected payment terms (instead of a due date)
- Auto-fill the amount and date example in the dynamic preview of the payment terms if the user opens the payments terms popup.

closes odoo/odoo#101488

X-original-commit: 04c1f169e5e97a7f92bdf009ed545eb8607f943b
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-28 19:31:56 +02:00
Odoo's Mergebot d666f57079 [FW][MERGE][IMP] base, web: improvements usability and usage of properties fields
Purpose
=======

Improve the usability of the properties fields.
Improve usage of properties fields, add them in project and crm.

Specifications
=============

Add the properties field on project and task as well as on lead and sales
team.

Prefetch the properties to improve performance.

Allow to display an avatar widget for the relational properties, hide the
move arrows if the action can not be done, show the many2many properties
even if one record in the list is not accessible, improve the behavior
of the relational properties when some records can not be accessed.

Perform various fixes notably with onchange support and various display
tweaks.

Task-2965523

closes odoo/odoo#101487

Forward-port-of: odoo/odoo#100653
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-28 19:31:54 +02:00
std-odoo 89a9253ccf [IMP] web: always reset the autocomplete input for properties tags
Purpose
=======
Always reset the autocomplete value when creating a new tag,
even if the tag already exists.

Technical
=========
The input value is reset when the tag is created because the props
of the autocomplete component change, but if we do not change the props
of the autocomplete component (e.g. because the tag already exist and
nothing should be done), the text value is not reset.

Add a new option for that purpose.

Task-2965523

X-original-commit: 352e811e821ef7c1fc075c32dda7272145749526
Part-of: odoo/odoo#101487
2022-09-28 19:31:53 +02:00
std-odoo 608bffff59 [FIX] base: fix the default properties value
Bug
===
If we re-write the same definition record, the default values were
applied again (even if the definition record didn't change).

This is because the compute on the properties is called even if the
definition record didn't change.

Task-2965523

X-original-commit: 70d80771f2430f83c91e7ef46eeebde8de70c3fe
Part-of: odoo/odoo#101487
2022-09-28 19:31:53 +02:00
std-odoo 50abdbe9d9 [FIX] base: fix the property onchange
Bug
===
- create a new helpdesk ticket without properties
- create a new property
- change the customer
=> The added property is removed

The fix in the onchange of models.py needs to be more specific, and
should be used only when the definition record is changed.

Task-2965523

X-original-commit: 909ee004183068d9ffa94abe0d1472a8f0534f34
Part-of: odoo/odoo#101487
2022-09-28 19:31:52 +02:00
std-odoo 3503dd904e [IMP] base: remove code redundacy in the properties fields
Purpose
=======
Remove the code redundacy between
convert_to_column and convert_to_cache.

Task-2965523

X-original-commit: bbd307d7939319393e3b1782c7200f0010c8c018
Part-of: odoo/odoo#101487
2022-09-28 19:31:52 +02:00
std-odoo 1b4c5e92ff [IMP] base: log a message each time a definition is modified
Purpose
=======
Log a message each time a user change a properties definition
by writing on the record properties values.

Task-2965523

X-original-commit: 6fa6fcd13e248d4bdf1febb0d8399cfe634037f5
Part-of: odoo/odoo#101487
2022-09-28 19:31:52 +02:00
std-odoo 76a7247b37 [FIX] web: allow to close a popover when it's inside an other popover
Bug
===
When a popover is inside an other popover (e.g. tags color popover
inside the properties definition popover), when clicking on the other
popover, the first one is never closed.

Task-2965523

X-original-commit: d782dbf5cfbeb31f98ca39935db4f6ab046a9f43
Part-of: odoo/odoo#101487
2022-09-28 19:31:52 +02:00
std-odoo a6e7a560ef [IMP] base, web: improve the properties behavior when a record is not accessible
Purpose
=======
Improve the behavior / visual of the properties field when the user does
not have access to some relational properties (many2many, many2one).

When the user does not have access to one many2many value,
show the others record in the list.

Fix a traceback when the model is not set on the definition.

Task-2965523

X-original-commit: cb8b751a335b01192aab185cd0230fa0f036b974
Part-of: odoo/odoo#101487
2022-09-28 19:31:51 +02:00
std-odoo 1260496c9d [IMP] web: improve the usability of the properties component
Purpose
=======
Allow to display an avatar image for the relational properties
(many2one and many2many). This is hardcoded for res.users and res.partner,
because we don't want an option in the property definition, and we can't
read ir.model because of access right...

Automatically select the default property label when we create a new
property, so the user can just enter the new property name without
removing manually the default label.

Hide the up / down arrow used to move the property, if it's already
the first or the last property in the list.

Close the popover when pressing enter in the label

Fix a traceback when we try to delete a property after changing the type.

Fix a traceback with Falsy default datetime.

Task-2965523

X-original-commit: 316f5462d438306899c53eb625d1d573f1a93d8d
Part-of: odoo/odoo#101487
2022-09-28 19:31:51 +02:00
std-odoo f5c7555d1b [IMP] web, base: shorten generated property names
Purpose
=======
Shorten the property name to take less space in database (while keeping
a very low probability of collision).

E.G.: "aa34746a6851ee4ea1f8d95746e45788" -> "aa34746a6851ee4e"

Automatically generate property name in python if they are missing.

Task-2965523

X-original-commit: d597083ff5e0a4abde67a450a61e04e6bf119c26
Part-of: odoo/odoo#101487
2022-09-28 19:31:51 +02:00
std-odoo 9e2a3ff662 [IMP] web: clean the code about property attributes reset
Purpose
=======
When changing the type or the model of a property, the name is
re-generated, so the others record values are reset. If we change back
to the original model / type, the original property name is restored.

This is a super important behavior of the properties component and
it should be fully tested.

Reset the model and model description when changing the type.

Now that the form view is always in edit mode, even if we changed the
model / type of a properties, then save, we are able to restore the old
properties as long as we don't refresh the page.

Task-2965523

X-original-commit: 54ae82974b836a0badab3c4c767916a1daf88f76
Part-of: odoo/odoo#101487
2022-09-28 19:31:50 +02:00
std-odoo 3c356808c0 [IMP] web: remove the properties formatters from legacy
Purpose
=======
Move the the properties formatters from legacy
to the new formatters file.

Task-2965523

X-original-commit: 6e8b49ba8a213bc2dd600fd91b7acd4a38147926
Part-of: odoo/odoo#101487
2022-09-28 19:31:50 +02:00
std-odoo a631a333b0 [FIX] web: fix the properties field test about many2many
Purpose
=======
The many2many properties have "res.users" as model, but the model and
records were missing in the test data.

Task-2965523

X-original-commit: 974999d32e14fcfca94b327fb8d6efa06d6bf06e
Part-of: odoo/odoo#101487
2022-09-28 19:31:50 +02:00
std-odoo 7a135ff585 [IMP] base: prefetch the properties definition
Purpose
=======
Most of the time we will need to read some field on the definition
record when we read the record itself (e.g. fetching some project
information on a task).

Because of this, it makes sense to prefetch by default the properties
definition, and it reduces the number of queries as well.

Task-2965523

X-original-commit: 1295e76f0dc3f3162a1b81a58ed1dc73d0fce3e7
Part-of: odoo/odoo#101487
2022-09-28 19:31:50 +02:00
std-odoo 17335f13fd [IMP] crm: add a properties field on lead
Purpose
=======
To be able to customize the working flow on the lead, based on their
team, we add a properties field on leads, whose definition is stored
on their team.

Include the properties value in the merge message to keep the history
of the properties value if they have been overwritten during the merge
process.

Task-2965523

X-original-commit: 4722cc4b1fb027b7b9d731c3b206656588071360
Part-of: odoo/odoo#101487
2022-09-28 19:31:49 +02:00
std-odoo ce29b305b9 [IMP] project: add a properties field on task
Purpose
=======
To be able to customize the working flow on the task, based on their
project, we add a properties field on tasks, whose definition is stored
on their project.

Task-2965523

X-original-commit: 2f244769cbb1512875ae197aa8adc3efd34fd54b
Part-of: odoo/odoo#101487
2022-09-28 19:31:49 +02:00
Benoit SociasandAntoine 1139ad7aff [IMP] web_editor, website, website_sale: hide block in desktop display
Since [1] it is possible to request that some blocks are not displayed
on mobile devices.
This commit adds a similar option to prevent blocks from being displayed
on desktops (i.e. on non-mobile devices).

[1]: https://github.com/odoo/odoo/commit/9463f0f889f9dd8da6077895c125da4998a933c0

task-2900730

closes odoo/odoo#101483

X-original-commit: 3103e0553011b5c1f4078972d7a88fa3fd4068b2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Antoine (anso) <anso@odoo.com>
2022-09-28 19:31:39 +02:00
maximilien(malb) c6fa784c43 [FIX] account: Holes in sequences warning
The warning should be displayed only on sales journal
Also added the fact that the warning now depends on the lock date, if there is a lock date the warning is displayed for entries post lock date, otherwise it's for all the entries

Same for the color of the name of the entry, it's now red only if it's post lock date

closes odoo/odoo#101442

Task-id: 2993833
X-original-commit: c668d777a5984d1cdcfd45a90ec39e1a5a2e0a55
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-09-28 17:55:09 +02:00