Commit Graph
98 Commits
Author SHA1 Message Date
Aurélien Warnon fe54b6eb21 [FIX] website_event_exhibitor: fix sponsor 'midnight' opening hours
Currently, configuring opening hours for event sponsors 'at midnight' is not
handled properly.

If you set either the start time or the end time opening hours to "00:00",
the sponsor will be considered as always open.

We fix that by correctly taking into account that configuration.

(Note: if the user configures a sponsor to be open 'until midnight', we assume
it means midnight 'the next day').

Tests have been altered to take this into account.

Task-3459777

closes odoo/odoo#132605

X-original-commit: 721b996685c8f6943832acfce52b05c8773522f9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-22 08:38:09 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
FrancoisGe e3da5f1b7d [REF] *: convert legacy dialogs
The goal of this commit is to convert a bunch of legacy dialogs into owl dialogs.

closes odoo/odoo#131278

Task-id: 3453920
Related: odoo/enterprise#45484
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-16 16:05:12 +02:00
Aurélien Warnon 62fba62067 [FIX] website_event_exhibitor: fix the "closed" sponsor modal
Following the rework of global ACLs here:
odoo/odoo@7dd1796eb7
Public users cannot access the event.sponsor.type model anymore.

This caused the sponsor "closing hours" modal to not be shown anymore, as it
raised an access error.

To fix the issue, we sudo the sponsor type access in the controller that
retrieves the sponsor data to render the template.

Task-3459726

closes odoo/odoo#131537

X-original-commit: 98c01e65277a816ec4010f3c6902953366d35cbc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-10 17:02:26 +02:00
Bastien PIERRE 65242e31e9 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:34 +02:00
Louis Wicket (wil) 7da30c7d14 [FIX] mail, *: fix grammar error in field help
This commit fixes a really old grammar error in the help message of the
message_needaction_counter field.

Before this commit: “Number of messages which requires an action”
After: “Number of messages requiring action”

The subject of “require” is “messages”, which is third-person plural, so
it can't take the -s suffix.

closes odoo/odoo#129468

X-original-commit: 0d10cfeaa56d5df23df05f436d353978043f4a71
Related: odoo/enterprise#44509
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-07-25 17:36:08 +02:00
Martin Trigaux cd2f330bec [IMP] *: remove glocal ACL
Specify explicit route for each ,, line
This is part of task 3230280 where global ir.model.access will be
forbidden.
The goal is to make access to public/portal explicit. Too often,
global access was granted with only employees in mind.

Remove ,,0,0,0,0 lines

mail:
employee already had read access to mail.group
still needed to subtypes as in ir.rule domain

mail_group: employee already had read access
pos_mercury: only needed for employees

membership:
move public access for website_membership as needed in the controllers

website_customer: employee already had read access

website_event_booth: no need for category
website_event_exhibitor: retrieved in sudo
website_event_track: not needed for location

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
Xavier Luyckx (xlu) ba87691460 [IMP] website_event, * : empty states
*: website_event_booth, website_event_exhibitor, website_event_track

Before this commit, when no events (or exhibitors, tracks,..) were
displayed for the user, only a title (eg. "No events found.") was shown
to them.

Now, it will display an illustration (color adapts to theme's color)
alongside more information:
- title
- call-out
- call-to-action for editors (add event, tracks, exhibitors..)

task-2489681

closes odoo/odoo#107638

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-02 14:29:49 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Pulinckx Pierre (PIPU) f4f0f78318 [REF] *: Replace underscore.js function by native JS
Before this commit : The library underscore.js and
underscore.string.js were used in the ODOO solution.
After this commit : Every usages of a function from
underscore.js lib has been replaced with native javascript.
The goal is to remove all usages of underscore.js and to
not use anymore this library in ODOO.
---
TaskId : 3246238

closes odoo/odoo#120437

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-05-15 09:37:48 +02:00
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Elisabeth Dickinson 80098df3dd [FIX] *: fix ribbons position and size
This commit fixes the ribbons used in `kanban` and `form` views.

The SCSS uses the square root of the parent `div.ribbon` to calculate its
diagonal width and applies that width to the child `span`.

After changing the ribbon's transform-origin, we calculate the ribbon's
position based on CSS variables of the view's top padding,the height of
the ribbon and the shadow's size (to avoid it being cropped by
overflow-hidden).

By changing the values of a few of these variables in the kanban view,
we were able to remove all the specific SCSS related to ribbons in the
modules.

Other changes were applied inside some of the modules to make this
work:

- `event`: padding corrections on the kanban's cards;
- `hr_holidays: replaced `margin:0` in the SCSS with negative margin
utility classes on the element to achieve the same visual result;
- `discuss`: moved the ribbon to the parent element;
- this was also done to `discuss`, `survey` and `helpdesk`;
- `crm_team_view` in `sales_team`: the ribbon's height made it overflow
from the kanban's card. We fixed this by changing the value of one of
the CSS variables in the view's SCSS file;
- the same thing was done in `survey` and `appointment`;
- `website_event_exhibitor` had some SCSS that wasn't being used because
it uses `.o_ribbon` instead of `.ribbon`

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:21 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Pulinckx Pierre (PIPU) 608e90e998 [REF] *: Replace underscore functions by native JS
Replace _.map(), _.flatten(), _.delay(), _.contains(), _.pluck(), _.isUndefined(), _.isEmpty(), _.isString(), _.isEqual(), _.isBoolean(), _.memoize(), _.invoke(), _.bind(), _.escape(), _.debounce(),
_.str.sprintf(), _.str.repeat(), _.str.startswith(), _.str.trim(),
_.str.escapeHTML(), _.str.escapeRegExp(), _.str.startsWith(), _.str.include()

closes odoo/odoo#118012

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-04-20 11:57:29 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Benoit Socias 02ed9f5e66 [FIX] website, *: avoid using unescaped query parameters
*: google_recaptcha, web_editor, website_blog, website_event_booth,
   website_event_exhibitor, website_event_track, website_forum,
   website_jitsi, website_sale_comparison, website_slides,
   website_livechat, website_twitter

This commit fixes improperly escaped query parameters across javascripts
of website-related modules.

See https://github.com/odoo/enterprise/pull/31711

closes odoo/odoo#118599

X-original-commit: 89be076aa51b097ada48d0046006be4d9692ac1e
Related: odoo/enterprise#39783
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-04-18 11:33:46 +02:00
Pulinckx Pierre (PIPU) 29d55e4403 [REF] *: Replace underscore functions by native JS
Replace _.last, _find, _.extend, _.some, _.every

Taskid 3246238

closes odoo/odoo#117319

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-04-05 12:50:43 +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
Louis Wicket (wil) 9afe7c74c9 [IMP] *: remove "French spacing" 👺
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Yannick Tivisse 7bce5f3f95 [MOV] resource: Split files according to coding guidelines 2023-02-03 10:25:00 +01:00
Martin Trigaux 776689b0f4 [I18N] *: export saas-16.1 source terms
closes odoo/odoo#110752

X-original-commit: 56b2b52287a8f2192d80ea417c7efac80a87c0a9
Related: odoo/enterprise#36173
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-24 10:20:30 +01:00
Jorge Pinna Puissant 4f24e34b39 [IMP] test_lint, *: eslint remove caughtErrorsIgnorePattern from no-unused-vars
Unused catch block arguments are now forbidden even when prefixed with an
underscore:  if the argument on the catch block is not needed, the use of the
optional catch binding is enforced.

Part-of: odoo/odoo#105433
2022-11-09 16:08:07 +01:00
qsm-odoo eed3f1bc59 [FIX] website, *: hide page options for non-designer users
*: website_blog, website_crm_partner_assign, website_customer,
   website_event, website_event_exhibitor, website_event_meet,
   website_event_track, website_forum, website_hr_recruitment,
   website_membership, website_sale, website_sale_loyalty,
   website_sale_slides, website_slides, website_slides_forum

With commit [1], the "customize_show" options were moved in edit mode.
They were wrongly displayed for non-designer users. Trying to use those
would throw a warning at the user.

[1]: https://github.com/odoo/odoo/commit/17a8a37e9bfc5b787d9666597d43e63f0064919f

closes odoo/odoo#103142

X-original-commit: f2ca62a4a9ccb6713a39c100fc87c112619eac41
Related: odoo/enterprise#32768
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-12 10:35:05 +02:00
Noe Antoine b947bab7f3 [FIX] website_event_{*}: harmonize spaces over online screens
*: exhibitor, meet, track

Before, there was a weird bar above left column of the track screen,
of a different color than the one over the content column. The side
column titles were not centered and aligned with content (for small
screens) and background color was used strangely as well as the
borders.

Harmonize the small space above meeting / exhibition / tracks
online screens. Add a small space above both columns, in small screens
as well (creating space between the blocks, having different purposes)
above online screens of meetings, ehibitors and tracks. Remove css that
can be removed and replace it with bootstrap standard classes.

The spaces uses the website background color. The side column title are
centered vertically and match the titles in the main column when the
screen is small.

Task-3006773

closes odoo/odoo#102721

X-original-commit: 65e8e1b8c501cccecc675437429c9ba3f415a09e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-08 12:31:47 +02:00
Martin Trigaux fde3f4d4b9 [I18N] *: export 16.0 source terms
closes odoo/odoo#102163

X-original-commit: 011d7aac5aacedb3ab373f247471ba69d67f50f3
Related: odoo/enterprise#32288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-06 14:56:52 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Jérémy Hennecart (jeh) 8285c2a6d1 [IMP] website_event(_*): refont frontend based on colors chosen
This commit removed static background color and the like in all event
modules. Since it's possible to configure colors from the website_editor,
we should used these ones in the frontend.

When an element is superposed on the background we used the later with a
mix of the primary color to have a demarcation and a better visibility
based on the colors chosen.

task-2845417

Part-of: odoo/odoo#91883
2022-09-06 22:31:03 +02:00
Romain Derie 44ae3f38da [IMP] *: bypass sanitize for full editor users on frontend fields
The previous commit allows the sanitizer to be bypassed by some users if
those users are part of one of the `base.group_sanitize_override` group
and if the HTML field is declared as `sanitize_overridable`.

This commit flag frontend HTML fields as `sanitize_overridable`.
See the main commit of this PR for more details.
It also gives the `base.group_sanitize_override` group to the "Editor &
Designer" group.

Part-of: odoo/odoo#97398
2022-08-24 23:03:23 +02:00
Pierre-Yves Dufays 29bf004bc1 [IMP] website_event{|track|exhibitor}: improve UI of event app
Improve UI of event app.

Detailed changes:

1) change the wording of the selection item "sponsor" of
event_sponsor.exhibitor_type from "sponsor" to "Footer Logo Only"
2) event name placeholder changed to (quote added):
e.g. "Conference for Architects"
3) in the track page and exhibitor page, if the description is empty:
- for external user: hide the empty description zone for external user
- for internal user: display an alert (info) inviting the user to complete it
with a link that triggers the edit mode.
3 bis) in the track page and exhibitor page, the page and the menu aside
are glued to the top. Add some space there.
4) display unpublished tag on the side menu for unpublished tracks

Some other changes:
- When some content are empty, there were some awkward horizontal lines
separating nothing, we have decided to remove them
- Fix track layout and improve mobile layout

Task-2692907

closes odoo/odoo#83488

Related: odoo/enterprise#23798
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-08-04 15:15:48 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli fe4f1efb70 [REF] *: BS5: Restore BS4 behaviour
- new prefix `bs-` for the root CSS variables
As some website snippet relay on these values we need to restore the old
behaviour by setting this prefix to an empty string.

- restore negative margins disabled in BS5 by default

- restore BS4 behaviour for setting element content
  Fix some cases when we want to render more than one node on the root
  level.
  In BS4 the jQuery was using all node but in the jQuery compatibility
  layer in BS5 it takes only the first node if the jQuery Element is used
  in the function. This hack try to restore the old behaviour wrapping all
  element in a DIV element (to be single root node).
  PS: this can break some querySelector and some CSS selector if they are
  too fragile.
  e.g. of element that break before this hack:
  Popover content for PaymentPopOver XML in ShowPaymentLineWidget

- restore old value from BS4 and adapt to new value
  $table-cell-padding -> $table-cell-padding-x
  $table-cell-padding -> $table-cell-padding-y
  $table-cell-padding-sm -> $table-cell-padding-x-sm
  $table-cell-padding-sm -> $table-cell-padding-y-sm

- restore BS4 smooth-scroll behaviour

- restore `text-X` from BS4 that use text-emphasis-variant
  In BS5, to generate the text utilities `test-X` its use BS5 utilities
  (See $utilities SCSS variables). To restore the old behaviour we replace
  with the custom `text-emphasis-variant` mixin.
  See odoo/odoo@e111cfd35e

- restore border and background of table
  In `_reboot.scss`, BS5 add `border-style` to all element of a table.
  In some case we customize the table with CSS rules (e.g. `listview`),
  these rules set a size of border. The mix of all rules made that the
  border of the `td` in `tfoot` are visible and make a black line.

- reset block quote Y margin to 0
 BS5 add a spacer and we reset that by puttin margin-y 0

- In BS5, border color is linked to the text color in it. We doesn't
want that and we restore the same behavior as un BS4 by putting
border-color in grey.

- restore HR style like in BS4
  Since in BS5, the height matter we remove the padding and added into the
  margin.
  Also, we restore the color of BS4 for the HR tag

> <hr> elements now use height instead of border to better support the
> size attribute. This also enables use of padding utilities to create
> thicker dividers (e.g., <hr class="py-1">).

https://getbootstrap.com/docs/5.1/migration/#content-reboot-etc

- restore old value for grid gutter to avoid calc error
  In BS5 `$grid-gutter-width` is set in rem and in BS4 it was in px.
  So SCSS compiler generates error when it tries to calc rem and px.

- restore badge, navbar paddings like in BS4

- restore link decoration in frontend (Portal) whiteout website

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:21 +02:00
Romeo Fragomeli 3e7c13c97d [REF] *: BS5: Migrate data attributes
> Data attributes for all JavaScript plugins are now namespaced to help
> distinguish Bootstrap functionality from third parties and your own code.
> For example, we use data-bs-toggle instead of data-toggle.

https://getbootstrap.com/docs/5.1/migration/#javascript

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:21 +02:00
Benjamin Vray 92287ef450 [IMP] website_event, *: adapt customize show options in event pages
*: website_event_exhibitor, website_event_track

This commit adapts "customize show" options from website event modules
by creating new options available in edit mode.

See merge commit for more information.

task-2710582
2022-06-24 10:28:05 +02:00
Younn Olivier f260e3c144 [IMP] website, *: add edit in backend systray dropdown
*: website_blog, website_customer, website_event_exhibitor,
   website_event_track, website_hr_recruitment, website_sale,
   website_slides

See merge commit for more information.

task-2687506
2022-06-24 10:28:05 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Raphael Collet 6cf8db906f [REF] *: adapt code to new flush API
closes odoo/odoo#87527

Related: odoo/upgrade#3497
Related: odoo/enterprise#26939
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-25 18:00:47 +02:00
Adrien Schoffeniels 55168b5e51 [IMP] website_event: lower sponsor icons on empty pages
PURPOSE:

When a website_event with a submenu is created, some default pages
contain an empty space to lower the footer (see odoo/odoo#89602).
On these pages, the sponsor icons are now at the bottom of the page,
on top of the footer, instead of just below the page title.

Task-2850546

closes odoo/odoo#91045

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-12 22:13:50 +02:00
Adrien Schoffeniels 5ccdef06a7 [IMP] website_event: lower footer on event pages
PURPOSE:

This commit adds a min-height property to event pages so that
the footer does not take the entirety of the screen when a page
has little content.
To not have a strange empty space on the booth event page when no booth
is set or when the event is finished, the related error messages are
now displayed below the cover instead of inside it.
It also removes the default grey background on some templates,
so that the theme background color is used instead.

Task-2831951

closes odoo/odoo#89602

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-06 07:09:21 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
Aurélien Warnon 06003b7d01 [FIX] website_event_exhibitor: correctly apply event sponsors ordering
Currently, the event sponsor ordering on the website is non-deterministic as it
uses a non-ordered dictionary to accumulate items, which then dictates the
order of display.

We fix that issue by using a OrderedDict that will correctly retain the order.

In addition, we force the sorting of sponsors based on their
event.sponsor.type's sequence first and then based on their own sequence.

The '_order' of event.sponsor is currently 'sequence, sponsor_type_id' which
seems wrong but has to stay that way in order to avoid backend issues.
Indeed, the backend and the "handle widget" do not have the capability to sort
on multiple levels as we would need here (sponsor type sequence, then sponsor
sequence).

To completely fix this issue, we would need to:
- Store the sponsor.type's sequence field on the sponsor (related stored)
- Modify the _order to be sponsor_type_sequence, sequence
- Only allow people to sort event.sponsors within a single category at a time

Those changes would not be doable on a stable branch, hence why we use a local
sorting when displaying sponsors on the website.

Task-2818538

closes odoo/odoo#88633

X-original-commit: c32583a2160a289748616d4b0e49cba2bd5778fb
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-13 16:53:56 +02:00
Jeremy Kersten 66f886e480 [FIX] website_event_*exhibitor,(q)web: don't crash sponsor if no name
Field name on sponsor are not required. So when we display the image of a
sponsor without field-name it will use the rec_name 'name' that is not set
and so False.
It will crash during rendering of the widget image that use it.

Now we force to use a field required 'partner_name' to avoid the crash.
By default, when you confirm the sale_order from the backend, we copy
the partner name in field name.

Because we use a class avatar to have a max-width of 96, we don't need
to use a image_512, image_128 is enough in most of case.
The max-width option on widget image has no effect on rendering.

In other case where the rec_name is Falsy and we don't provide other name to
the widget, we now use a default 'name' value to avoid a crash:

closes odoo/odoo#88296

Attributeerror: 'bool' object has no attribute 'replace'
X-original-commit: b054dfc715afb225eb032a722ec58e6888b1b905
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-04-08 17:13:35 +02:00
Gorash 880954ebfc [IMP] *: remove _render from ir.ui.view and simplify report
There were inconsistencies in the calls to `_render`.
* the view context could contain information that misled developers.
Indeed, the context and value of the view are not supposed to be found
in the rendering. Thus by calling `ir.qweb` with the name of the
template, we ensure that there is no unwanted information and in
addition the cache key is that of the name of the template which saves
a query.
* the context used for rendering was modified by a method on
`ir.ui.view`, except this is not information used by this model. There
is now a `_prepare_environment` method residing on `ir.qweb`. This
method allows to modify the value dictionary as well as the context in
which the rendering will be done. This preparation of the data as well
as my security check is done only once per rendering. This also saves
some queries
* Freeze options for rendering were inconsistent. It could be that
options on which rendering depends were not part of the cache key. Thus,
depending on the user who generated the generation of the rendering
function, there was or was not information in the template. For example
for automatic branding. This is no longer possible, because it is the
context that is used. The options serving as a cache key are only
recorded for information (for the profiling system for example). A
simplification of the `ir.qweb.field` models could be made.

The report rendering and call `ir.qweb` instead of `ir.ui.view`.

Part-of: odoo/odoo#85110
2022-03-29 10:56:15 +02:00
Jérémy Hennecart (jeh) d4780b756d [IMP] website_event: display the timezone when a datetime is used
Cleanup all the places where an hour or a datetime is been used
to display with the date the corresponding timezone.
The goal is to know the timezone used where a datetime is displayed
on the event pages.

task-2458013
COM PR: odoo#78049

Part-of: odoo/odoo#78049
2022-03-23 20:18:34 +01:00
Jérémy Hennecart 6649e7c39c [IMP] *event*: replace t-esc by t-out
Replace each t-esc by t-out since it's now deprecated in templates

task-2458013
COM PR: odoo/odoo#78049
ENT PR: odoo/enterprise#21543
2022-03-23 20:18:34 +01:00
Elisabeth Dickinson 35f70e5f11 [IMP] website_event_exhibitor: add wrapper around block and replace margins 2022-03-10 12:36:26 +01:00
Vincent Schippefilt 05fc9a6733 [IMP] *: use _read_group instead of read_group
This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases

closes odoo/odoo#84908

Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-02 17:10:48 +00:00
Jorge Pinna Puissant cac3ba62e5 [IMP] test_lint, *: add caughtErrors option to no-unused-vars
All named arguments on the catch block must be used. If for some motive
the named argument on the catch block is not used, its name must begin
with '_'.

closes odoo/odoo#85569

Related: odoo/enterprise#24867
Related: odoo/design-themes#552
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-02 13:05:42 +00:00