Commit Graph
143902 Commits
Author SHA1 Message Date
stefanorigano (SRI) a2ec00a231 [FIX] web: highlight '.active' dropdown entries on :focus/:hover
Previous to this commit our custom bg-color for '.active' dropdown
entries (transparent) was overriding the default :focus/:hover highlight
behavior.

This is normal in bootstrap default, 'cause the framework uses accent
colors (eg $primary) for .active' entries bg.
Since these colors are normally more catchy than the :focus/:hover
ones, we can assume that the behavior is intentional but it doesn't
match our design chooses.

This commit will reinforce :focus/:hover rules for '.active' entries too
, allowing keyboard navigation and making it clear to the user that an
'.active' entry may be eventually toggled.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) dfc0c15cfb [FIX] web: settings view, remove unnecessary gap
This gap was initially introduced to increase space between section but
was not triggered correctly and, ultimately, not strictly necessary.

task-2579123
2021-07-23 06:54:18 +00:00
stefanorigano (SRI) a2ee6b923c [FIX] web: correctly target 'o_dropdown_item' child
Partially revert 47acba560a removing rules defining '<a>' children as
exceptions. Having an element (either <a> or a <span>) wrapping the
entry content is indeed now considered the norm.

This commit will extend bootstrap 'dropdown-item' design to any
'o_dropdown_item' first-child rather than on element itself.

task-2579123
2021-07-23 06:54:18 +00:00
Mohammed Shekha 4e40979099 [IMP] web: o_form_label_empty on standalone label
Before this commit: when standalone label is rendered in form view class
o_form_label_empty is not added due to which label text is not muted.

After this commit: when standalone label is rendered, label is sometime
rendered before field widget is rendered due to which o_form_label_empty class
is not added to label, with this commit we postprocess labels so that
o_form_label_empty is added on all field labels.

Also with commit, signature widget's isSet method will return true if value is
set in signature widget, this will make label of signature widget muted if it
is empty and form view mode is readonly.

task-2523197

closes odoo/odoo#71322

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-07 08:29:28 +00:00
Goffin Simon 1e430dc614 [FIX] account: Wrong currency symbol in payment receipt report
Steps to reproduce the bug:

Enable Multi Currency > Accounting > Create Customer Invoice in USD > Pay Invoice in EUR > click on payment and print payment receipt

Bug:

The currency symbol next to "Amount Paid" was in $ instead €

opw:2506868

closes odoo/odoo#73998

X-original-commit: f08bcbf90257d632f7258251059a5390bf3eafa4
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-19 19:10:06 +00:00
Sergey Shebanin 4440484c80 [IMP] hotkey_service add Delete & Tab to list of allowed keys
closes odoo/odoo#73555

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-12 10:25:26 +00:00
Sergey Shebanin 4ed7217a9e [CLA] Sergey Shebanin 2021-07-12 10:23:42 +00:00
Xavier Morel b4bfb2a0d2 [ADD] base: missing raw preprocessing
makes raw a bit more expensive than necessary on creation

closes odoo/odoo#74132

X-original-commit: f9b12a59ea618fa598f0ffb6869f027c6a39bc2d
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-07-22 15:56:08 +00:00
Martin Trigaux 24f2812652 [I18N] l10n_de*: translate CoA in German
closes odoo/odoo#74123

X-original-commit: f8c44798d58ce86390b1eba7c21c57632909bbdc
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-22 13:59:21 +00:00
Munaf Khan 7a2e286e12 [FIX] crm_iap_lead: allow to edit 'contact_number' for failed requests
Right now, for the lead mining request, `contact_number` field is only
editable when the request is in draft state. However, like the most
other fields, this one should be editable for the failed request so
that user can decide how many contacts should be fetched before
submitting the request again.

This commit fixes the behavior by making `contact_number` field
readonly for the successfully completed mining request only.

TaskID-2605708

closes odoo/odoo#74121

X-original-commit: 479a6492f9d2a6991e880f4fc4ac425ea1a7e72a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-22 13:41:22 +00:00
Achraf (abz) dec5b354bb [FIX] mrp: Close workorder form view on button clik
This PR reverts this one https://github.com/odoo/odoo/pull/54364

because it introduces the following problem:
It is no longer possible to close the dialog when it is opened from a gantt view, because the buttons are overridden and they no longer close the window after the action.

In addition to the fact that this fix no longer makes sense at the moment

opw-2591597

closes odoo/odoo#74105

X-original-commit: ed09c16234f240fd52a5cc516465767b736fb40d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-07-22 10:53:17 +00:00
Samuel Degueldre cfe079221c [FIX] web, web_editor: restore media upload progress toast
In odoo/odoo#72675 the new services were made available in the frontend,
and calls to the legacy notification services were redirected to the new
notification service. However, some of the behaviour of the legacy
notification service was not replicated in the new one, like the ability
to pass an HTML element to use inside the notification.

While html content can be passed, it is cloned, meaning that the DOM of
the element cannot be manipulated by the caller, which is what was being
done to show progress during media upload.

Although the upload progress toast looks like a notification, it's
hardly a standard notification and adds a lot of behaviour, because
manipulating DOM directly when it is managed by owl cannot be done
safely, it has been decided to simply make it its own widget separate
from the notification service, which can manipulate its own DOM freely.

task-2607393

closes odoo/odoo#74027

Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-07-20 13:13:03 +00:00
Mohammed Shekha 33c2615359 [IMP] web: remaining_days widget editable in edit mode
Before this commit: remaining_days widget is not editable and it just shows
information based on value like, Today, Yesterday, Tommorrow etc, when we
change mode to edit it should have date/datetime picker so that user can change
value of the widget.

After this commit: remaining_days widget will display date/datetime picker in
edit mode and in readonly mode it will display delta between the value of the
field and today, it will also support edition of date/datetime value in multi
edit mode.

task-2507961

closes odoo/odoo#70578

Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-16 07:18:16 +00:00
Pierre Masereel 3e7c9c67e8 [FIX] web: hexadecimal color in 8 digits not supported
Some scss compilers are not supporting the colors written in hexadecimal
with 8 digits.

So to keep the the color and transparency, we have re-written the color
in rgba.

Issue introduced in: https://github.com/odoo/odoo/commit/a1c983250e9547c383ef677fb411b0bc589efa89

closes odoo/odoo#74112

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-22 12:00:56 +00:00
Pedro M. Baeza 9489040b7e [FIX] l10n_es: Make non deductible taxes to propagate analytic
When you are using non deductible taxes, the tax amount is handled as
an expense increase, using the same expense account than the invoice
line. But not having the analytic option, this expense increase is not
classified in the same analytic account.

Thus, a sane default for the initial chart of accounts is to set it to
True.

TT31062

closes odoo/odoo#74111

X-original-commit: 3abf349e995f5fbdc0af6288425f7383d5b89a92
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-22 11:53:06 +00:00
Nasreddin Boulif (bon) 919a441178 [FIX] payment_stripe: display clearer customer description
Issue:

  Payouts reference on Stripe are display as:
  `SUB123 - ODOO_PARTNER_456789`.

Cause:

  When making a Stripe request to create new customer, the description
  is formated as : `ODOO_PARTNER_456789` .

Solution:

  Replace customer description format as :
  `Partner: Mitchel Admin (id:456789)` .
  Inspired by: https://github.com/odoo/odoo/commit/3bc1e0175d85a70806999109e928c234e8cc2ca4

opw-2593621

closes odoo/odoo#74109

X-original-commit: 07033a07ca49923a1c5095c371302fb894363c07
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-07-22 11:05:05 +00:00
Barad Mahendra e4967653be [FIX] web: fix the display of the time in year view popover
Currently, the time in popover of the year view does not appear
with the title due to record.allday is undefined instead of false

So in this commit, check if record.allday is not exist then display
the time infront of the title instead of after the title.

Related enterprise PR: https://github.com/odoo/enterprise/pull/19134

closes odoo/odoo#72440

Closes: #72440
Taskid: 2502339
Related: odoo/enterprise#19134
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-07-21 04:44:28 +00:00
Barad Mahendra 639a3d0fcc [IMP] project,hr: generic improvement for the project
Purpose of the commit is to improve the ui of the project and task

So in this comit, project_id and tag_ids should be always visible
in fsm mode too. also re-sequence the task form view buttons and
added class for the proper xpath.

also move the common for for get_unusual_days on employee so it
can be reused.

Related enterprise PR: https://github.com/odoo/enterprise/pull/19134
Closes: #72440
TaskID: 2502339
2021-07-21 04:44:27 +00:00
Stephan Keller d8706cde99 [CLA] Signature for skeller1
closes odoo/odoo#73739

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-07-15 09:34:09 +00:00
Stephan Keller 58dd5fc2b2 [IMP] product: validate date_start and date_end for pricelist items 2021-07-15 09:31:44 +00:00
Mitali Patel 8a585c0739 [IMP] sale_(project), hr_timesheet: improve task analysis report
Purpose of the commit is to improve the task analysis report
of the project app.

So in this commit, done the below changes:
- removed the # of tasks measure
- added the following measures: Rating Value (/5), Working Hours to Assign, Working Hours to Close
- removed the # from the labels of the following measures: Days to Deadline, Working Days to Assign,Working Days to Close
- renamed 'task title' into 'task'
- added a search on tag_ids and sale_order_id
- added the following filters:
   -My Projects + My Team's Projects
   -My Tasks + My Team's Tasks (rename 'Unassigned' into 'Unassigned Tasks')
   -Starred
   -Tasks Late + Tasks in Overtime
- added the following group bys: task, customer, kanban state, assignment date, creation date, deadline, last stage update

closes odoo/odoo#72587

Taskid: 2508645
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-07-22 09:09:49 +00:00
Achraf (abz) ad7e6c19bf [FIX] web_editor: Allow internal users to copy/paste
On windows when you copy paste text in and into Odoo (for example in the description when creating a ticket) a traceback occurs.
There is an isWhitelist function which verifies that a node is indeed in the authorized items via the following instruction

`item.matches (CLIPBOARD_WHITELISTS.nodes.join (','))`

But on windows there is a comment node containing `<--StartFragment-->`

Here is the clipboard data on linux and on windows for the same copied text (Hello):

- Linux

```
  <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
  <span style=\"color: rgb(102, 102, 102); font-family: &quot;Lucida Grande&quot;, Helvetica, Verdana, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Hello</span>
```

- Windows

```
	<html>
		<body>
			<!--StartFragment--><span style="color: rgb(102, 102, 102); font-family: &quot;Lucida Grande&quot;, Helvetica, Verdana, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Hello</span><!--EndFragment-->
		</body>
	</html>
```
Except for this additional comment on Windows, the `.matches()` method does not exist.

This PR uses the `Array.includes` function on the item's `nodeName`, which should work in all cases while keeping the same behavior.

opw-2591597

closes odoo/odoo#74029

X-original-commit: 41802bc518b4bcd1c71d8659ac560cb748befd95
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-07-20 11:22:21 +00:00
Thibault Delavallée e579e86b4d [FIX] crm_iap_lead_website: correctly support industry tags
Followup of odoo/odoo@edf729c09e where reveal_id was changed to
a reveal_ids on industry model (comma separated list of IDs). This was changed
in IAP Mining but not here.

Task ID-2608702

closes odoo/odoo#74051

X-original-commit: 99d1f09a7284bfa7f1bead42cb20e8122e800544
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-20 15:43:29 +00:00
Lucas Perais (lpe) 4919e50a3d [FIX] web: core: download: error handling
Try to download a report file but knowing that the controller will raise an Exception

in the case of l10n_be: Tax Report
Remove the VAT number on the Belgian Company and export the report as xml

Before this commit, the error was not well handled, i.e. a traceback was shown

After this commit, a Redirect dialog is shown, giving the possibility to the user to go
on the company's list view and change some company's fields.

closes odoo/odoo#74021

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-22 06:38:20 +00:00
Xavier Morel 765c31088c [FIX] web: imprecise callback signatures
odoo/odoo#74003 updated a few docstrings, half of them being the
typing of callbacks to not use the TypeScript syntax /
extension. However in doing so it dropped critical parts of the
signature (namely the specific type of the return value -- or the lack
thereof).

Update this error to restore the information that the callbacks have
no return value.

closes odoo/odoo#74083

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-07-22 06:24:29 +00:00
Adrien Widart 4c31698bd6 [FIX] sale_stock: correctly enable group_auto_done_setting
The test needs the option "Lock Confirmed Sales" enabled
The current code doesn't really activate the option

closes odoo/odoo#74059

X-original-commit: eca297a01253e2bb4fb1be6205b8e1c0f9837d98
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-07-20 16:46:08 +00:00
Adrien Widart 28818c46ed [FIX] microsoft_calendar: archive cancelled recurrence occurrence
Suppose a recurrent event synced with both calendars. Suppose that the
current user is not the organizer. If one occurrence of the event is
cancelled, the user won't be able to sync the calendars.

To reproduce the event:
(Need two Microsoft accounts A01 and A02)
1. [On Microsoft, with A01] Create an event:
    - Recurrent (next 3 days for instance)
    - With A02
2. Set the address mail of current partner with A02's address
3. Sync with Microsoft
    - Note that the 3 occurrences are displayed
4. [On Microsoft, with A01] Cancel one occurrence
5. Sync calendars

Error: A Validation Error is raised: "The operation cannot be completed:
- Create/update: a mandatory field is not set [...]"

At some point, the module updates each occurrence of the event and
stores the occurrence's values:
https://github.com/odoo/odoo/blob/4ae90dd6f9e28e6fdff45c7612a3a756665e1489/addons/microsoft_calendar/models/microsoft_sync.py#L213-L220
However, the cancelled occurrence will be incorrectly stored. Because it
is cancelled, `_microsoft_to_odoo_values` will return {'active': False}:
https://github.com/odoo/odoo/blob/4ae90dd6f9e28e6fdff45c7612a3a756665e1489/addons/microsoft_calendar/models/calendar.py#L63-L65
Therefore, in the previous code, `values` will contain `(<Recurrence
ID>, None, None)`

Later, when applying the recurrence, the module detects all
already-existing occurrences and the others (i.e., those that need to be
created):
https://github.com/odoo/odoo/blob/02886f65e9026e1f7617c8b23c3d87edd358b168/addons/calendar/models/calendar_recurrence.py#L190-L192
where the ranges are tuples like `(<start of the occurrence>, <end>)`.
As a result, `ranges_to_create` will contain such a tuple `(None, None)`
which makes no sense

OPW-2571398

closes odoo/odoo#74052

X-original-commit: ccad42575ae32d7e8ffe72226cbfed2284e0326e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-07-20 15:49:01 +00:00
William Braeckman 576a33bc4f [IMP] hr_work_entry_holidays: half day outside of working hours
Fixes taking a hald day outside of working hours counting as half a day
instead of nothing.

See odoo/odoo#68977

closes odoo/odoo#74015

X-original-commit: 7ad9af5b6fd3086d280b42f6769c66d579dd7f5f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-07-20 09:41:42 +00:00
Ivan Yelizariev a5a9a9672e [IMP] base: avoid unused reading in get_bindings
`load_views` calls `get_bindings` to render Action and Print menu. Before this
update, it read all action fields, including heavy computed fields
like `search_view` (which calls fields_view_get). But in fact just few fields
are used.

This slighly improves response time and data size.

closes odoo/odoo#73983

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-19 15:59:25 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Bruno Boi bb9ff3b62d [IMP] web: reload filtered kanban column if emptied
When dragging out the last record of a filtered column, its filter is cleared and the column is reloaded.

Taskid-2454209

closes odoo/odoo#72755

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-30 12:06:28 +00:00
Bruno Boi e248773826 [FIX] web: various filtering kanban column scenarii
BEFORE
Various scenarii leads to inconsistencies on the progressbars when a filter is activated:
- when dropping in a non matching record
- when the view domain is updated (e.g. from some input in the search panel)

NOW
These scenarii works fine.

Taskid-2491196
Taskid-2454209
2021-06-30 12:06:28 +00:00
william-andre 177dbd60a2 [FIX] base: company.bank_ids is not the company of the company
This field was only used by thinking it was the banks owned by the
company, and not the banks registered for all partners by that
company.[1]
It has always been like that, since 7eab8e26d3
even though the field didn't exist on `res.company` before that
refactoring.

[1]: checked with the following regex `compan((y(_ids?)?)|ies)\.bank_ids`

closes odoo/odoo#73229

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-07-21 13:12:20 +00:00
Roopam Rathod 7aef86fa69 [FIX] account:Auto Post scheduler action threads killed by timeout.
Before this commit:

  When there is too much records to post and it's take time more than 15 minutes then server was restarted.
  So scheduler action will do the process with the same records again and again.

After this commit:

  post record in batch of 1000

opw-2451446

closes odoo/odoo#70831

X-original-commit: 819321c3a129613890ce49e3efe9a903c3218070
Signed-off-by: rrt-odoo <rrt-odoo@users.noreply.github.com>
2021-05-17 06:38:08 +00:00
Habib (ayh) e79316d229 [FIX] l10n_eu_service: set country on new taxes
Since 14.3, Taxes have a country field. Newly created taxes don't always have the correct country set, thereby making the tax unusable.

Issue identified in task 2591541

closes odoo/odoo#74060

X-original-commit: e3a78dcb62200bf43c41c558a995afedf882d64a
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Habib Ayob <h4818@users.noreply.github.com>
2021-07-20 17:13:17 +00:00
ijas ahammed 3e37cb92c8 [FIX] website: avoid traceback when clicking on stat buttons
Prior to this commit, if we go to visitors form view and clicked on
stat buttons like offline/connected or visits, a traceback was
thrown because the buttons are meant for showing stat only, they
aren't linked to real actions / methods. It used to work before, but
the recent traceback is result of more strict checks from the web-client
re-write. See the original commit[1] for more information.

This commit sets 'disabled' attribute on the buttons, and keeps the action
from being performed for display-only stat buttons.

commit[1] - https://github.com/odoo/odoo/commit/0573acae2306bf5da2005852da9323ddc59e5431

TaskID-2593552

closes odoo/odoo#73813

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 10:04:53 +00:00
Andrea Grazioso (agr-odoo) b54c199c88 [FIX] sale: fix section creation for the down payments
After FW-port https://github.com/odoo/odoo/pull/64721
Section for down payment were added multiple times because of a typo

closes odoo/odoo#74025

X-original-commit: 7bbf13d47b122d80fd16cb9db79be86c44be97b6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-07-20 10:49:20 +00:00
Andrea Grazioso (agr-odoo) 09f985aba5 [FIX] stock: allow to use already defined SN
- Define a [DEMO] prod with tracking by SN and add some SNs
- Activate "use existing lot/serial number" on the receipt picking type
- Create a purchase order for [DEMO]
- Process the receipt in the barcode app:
  * Scan the product
  * Scan the SN barcode
  * Validate

User will get an error.
It seems that Odoo is trying to create this SN instead of
matching the existing one

opw-2474347

closes odoo/odoo#73610

X-original-commit: 09a1252b8a5bc194ffccd6c2437985328d08ba08
Related: odoo/enterprise#19632
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-07-20 08:48:24 +00:00
Nicolas Lempereur 2c028ca2a6 [FIX] http_routing: geoip longitude/latitude available
In 2018 geoip2 support was added to allow the new database format that
are freely available. But for these, only a subset of properties are
available.

Since Odoo 13 (August 2019), the sign module is using geoip latitude and
longitude for logging access to sign module signatures, but this was
only working for database using the first version of GeoIP databases.

In other use case there would never be any geolocalization recorded.

With this change, latitude and longitude are available in the session if
the right module/database is installed.

opw-2426323

closes odoo/odoo#73997

X-original-commit: 2be13b57749ac2c45de60717544c3061bbb29671
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-07-19 18:49:19 +00:00
Xavier Morel 3fad7a39ea [FIX] web: a few JS docstrings
jsdoc apparently doesn't understand arrow functions to indicate
function-valued attributes. Also add some default values in the
notifications typedefs.

closes odoo/odoo#74003

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-07-20 06:50:38 +00:00
Jeremy Kersten 02df207a04 [FIX] website: configurator set custom image as public
Before this commit, overrided images was not visible if not logged in.

How to reproduce
----------------
Install a theme with configurator to have custom image of industries.
Log out
You have original image instead of industries

closes odoo/odoo#73921

X-original-commit: d1241379a7c5f999b7a82ca290dd8b5f212a0997
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-16 16:55:14 +00:00
Munaf Khan df59f75966 [IMP] fleet,website: avoid duplicate menu items
Currently, some business object related menus have the
same names with the technical menus and it creates
confusion among users.

This commit renames the following menus:

 - in fleet app, 'Models' menu is renamed to 'Vehicle Models'
 - in website app, 'Views' menu is renamed to 'Page Views'

Apart from that, to be consistent with menu item, this commit
also renames the action 'website_visitor_view_action' from
'Views' to 'Page Views'.

TaskId-2595993

closes odoo/odoo#73755

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 09:43:13 +00:00
JordiMForgeFlow a961edeff5 [FIX] sale_mrp: filter cancelled moves when computing dropship delivered qty
The current behaviour implies that the quantity delivered will never
be updated if there are related moves that have been cancelled.

After the fix, when computing the quantity delivered, it will only
consider the stock moves that are not cancelled.

closes odoo/odoo#73573

X-original-commit: 6f6366888415c5e020ffee893a78cc7a3f6925f5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-12 12:29:57 +00:00
Odoo's Mergebot 80b27a672f [MERGE] *: deprecate and replace non-owl t-raw
non-owl JS-side of #68072:

* deprecates `t-raw`
* adds a `t-out` which `t-esc` aliases and which "does the right thing"
* introduces a `Markup` function / object which is considered markup-safe by t-out (thus left unescaped)
  - unlike the python version, most of the override hooks (e.g. concatenation, formatting, ...) are not available in JS, we might eventually want to override some of the action methods (e.g. replace) but so far the needs seemed pretty limited
  - and javascript pretty strongly differentiates between a string (primitive) and a String (object), the latter being what Markup gets
  - so various constructs which can return a Markup in Python can't really afford to in JS: I tried with QWeb and e.g. jquery *really* does not deal well with non-primitive strings, as a result `_.escape` is shimmed to understand `Markup` objects but will not return markup objects when escaping strings
  - `sprintf` (the one from web.utils) was updated for Markup-awareness for convenience though
  - and `Markup` can be used as a template tag, in which case it will automatically escape the substitutions
- removed `messageIsHtml` from the non-owl notifications, replaced by the message being a markup object
- updated Dialog to work the same way (it did not even have a flag), removed explicit escaping from most of the callsites (only found one where we actually leveraged dialog titles being markup)
- modified the kanban view so HTML non-raw values automatically get wrapped in Markup

Also moved some formatting from the server to the client, either removing the need to inject markup entirely or making the use of `Markup` much cleaner than just "mark whatever the server returned as safe".

There are a few things I'm not entirely sure about e.g. whether even using markup is necessary for `formatMonetary`, doesn't the "unicode" NBSP work fine in HTML? Though we may need to keep `forceString` to ensure something like ascii-compatibility.

closes odoo/odoo#70004

Related: odoo/enterprise#18005
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-07-20 10:29:09 +02:00
Xavier Morel 22904af1f8 [FIX] website_event_exhibitor: de-traw-ify
Remove t-raw and mark website_description as markup-safe right after
fetching it.

Also update `_fetchSponsor` to use async/await, and remove seemingly
unnecessary empty div in template, and convert `<span>` to `<div>` as
the contents is arbitrary and thus could be a block.
2021-07-20 05:47:27 +00:00
Xavier Morel f7b1d02c16 [IMP] website_twitter: de-traw-ify
Not tested. I probably really need to add that replace() override
2021-07-20 05:47:27 +00:00
Xavier Morel 0691736b49 [IMP] website_slides: de-traw-ify
Replace the t-raws used for the end-of-quiz message by t-outs.

This requires marking the two subfields of `quiz/submit` as Markup,
rewrite the method in a more modern style while at it.

Also update the tour to ensure that the message is indeed inserted as
markup, reset the users' karma to a known value to ensure the
motivational message is predictable.
2021-07-20 05:47:26 +00:00
Xavier Morel 7f72555f4e [FIX] website_sale: de-traw-ify
* direct product attributes seem to not be necessary at all,
  `list_price` and `price` are just numbers
* mark `description_sale` as markup-safe at load
* mark ribbon.html as markup-safe at load
* mark embed code value as safe on rendering
2021-07-20 05:47:26 +00:00
Xavier Morel 2bd0873d44 [IMP] website_form: convert t-raw=0 to t-call 2021-07-20 05:47:24 +00:00
Xavier Morel e84a72767e [FIX] website: de-traw-ify dynamic snippets
Mark the fragments as markup-safe after fetching them.

Also make _render private (don't see any reason for it to be publicly
accessible), and avoid unnecessary intermediate enc/dec in it.
2021-07-20 05:45:52 +00:00