Commit Graph
144070 Commits
Author SHA1 Message Date
Nicolas Lempereur 7ea7e79541 [FIX] website: special character ok in menu label
Edit a website menu label with:

    & < > " ` '

This is what is shown after saving:

   &amp; &lt; &gt; &quot; &#x60; &#x27;

This is happening since ea4dbcd240: characters &, <, >, ", `, and ' are
now always escaped. Before that commit, only < and > where escaped and
only when an image was inside the label.

With this change, we unescape the label when we are editing a menu.

opw-2609413

closes odoo/odoo#74558

X-original-commit: ab77054987287444c5f6141b047a63bab4b67baa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-08-02 11:35:51 +00:00
Antoine Vandevenne (anv) b0874bc234 [FIX] payment_authorize: flag tokens as verified
task-2612977

closes odoo/odoo#74568

Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-08-02 12:38:29 +00:00
Guillaume (guva) bc065bda55 [FIX] point_of_sale : enable translated terms
Step to reproduce:

- Change the language to any language other than english
- Go to PoS and open a session
- Click on "Client" and select a client
- The button 'Select Customer', 'Deselect Customer' and 'Change Customer'
  are not translated.

Cause of the issue

- The term 'Change Customer' was missing in pos.pot
- Translation was not enabled in JS file

This fix complete the one "done" in commit 00e177b

opw-2596436

closes odoo/odoo#74565

X-original-commit: da5b236f7375d35309a59d8e548309d5381a81cb
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-02 12:27:36 +00:00
Víctor Martínez 045ed49d15 [IMP] delivery: Hook allowing to retrieve dict to be used in _get_price_from_picking() function.
Hook to be overridden when we need to add some field to product and use it in variable factor from price rules.

closes odoo/odoo#74561

X-original-commit: 6ec768d084da6bd7344c45750a2a5037ec366143
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-02 12:09:43 +00:00
Pierre Masereel 8610a4bf38 [REF] point_of_sale: create template for receipt order lines
We are getting the order lines out of the main receipt template, to be
able to override it the sweden localissation module, and so having lines
separated depending on the type of products.

closes odoo/odoo#74554

Related: odoo/enterprise#20004
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-08-02 11:23:17 +00:00
Ivan Yelizariev 7ae05faf59 [FIX] web: report controller: use context lang
lang from context arg was ignored for 7 years [1], but it's not needed anymore.
At least, this leads to unexpected result in iframe report (e.g. forecasted
report), which would have an ugly fix [2] otherwise

[1] https://github.com/odoo/odoo/commit/fc8592adf2f26bf35007d6cc625fb2005cd65b5d
[2] https://github.com/odoo/odoo/pull/71539

closes odoo/odoo#72911

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-06-29 10:42:33 +00:00
Antoine Vandevenne (anv) 023e2e636c [FIX] payment_stripe: never assign one currency unit to validation txs
Before this commit, the payment function `_get_validation_amount` was
overridden by Stripe to specify a validation amount of one currency unit
while that amount was in fact never passed to Stripe in the validation
flow. The amount stored on the transaction was therefore incorrect.

This commits removes the override to let the default amount of 0 being
set on validation transactions.

task-2612977

closes odoo/odoo#74543

Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-08-02 11:48:21 +00:00
Antoine Vandevenne (anv) 4f744fddc7 [FIX] payment_stripe: always answer with empty string to webhook events
Prior to this commit, not all operations of the Stripe webhook were
encapsulated in a try/except clause. If a `ValidationError` was raised
outside of that clause, it was returned as-is to Stripe.

This commit encapsulates the whole webhook event processing with a
try/except clause to make sure that only an empty string is returned to
Stripe, hence properly acknowledging events.

task-2612977
2021-08-02 08:32:41 +00:00
Aaron Bohy ff6e89052d [REF] web,*: regroup custom hooks in core/utils/hooks
*base_automation,iap,im_livechat,point_of_sale

This commit introduces a new file in core/utils: hooks.js
This file contains custom hooks (useEffect, useService, useBus...).

The useHotkey hook is tightly related to hotkeys, so it has been
moved to core/hotkeys.

closes odoo/odoo#74535

Related: odoo/enterprise#20003
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-02 11:13:52 +00:00
Samuel Degueldre 5ffdd92034 [FIX] web: make polling restart correctly when server is killed
Previously, when killing the server, the longpolling bus stopped but
didn't start polling again after a few seconds, this was caused by the
fact that ConnectionLostError wasn't treated like a legacy error and
remapped to an object with a message, meaning it didn't trigger
guardedCatch callbacks.

Since ConnectionLostErrors should be handled much the same way as
RPCError when interacting with legacy code this commit simply adds
ConnectionLostError in the same places we already have RPCError during
error handling of legacy errors, but delegates behaviour to the new
lostConnectionHandler when appropriate.

closes odoo/odoo#74530

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-02 11:45:55 +00:00
OdooJeel 810db9794c [CLA] signature for jeelkhanpara
closes odoo/odoo#74531

X-original-commit: bd2d72c0a82d51652fa4b43447ade305843a4ef8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-08-02 07:53:17 +00:00
Swapnesh Shah d7b9363361 [IMP] purchase: allow to change price if not invoiced
Steps to reproduce:

- Create Bill from Purchase order
- Raise Refund for the Same Bill

Current Behavior before commit:

Field Unit Price is readonly in PO line as invoice is already created.

Expected behavior:

Price should be editable as Qty Invoiced is Zero after Refund.

With this commit, Price unit will be readonly based on `qty_invoiced`

closes odoo/odoo#74526

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-31 12:54:20 +00:00
Andrea Grazioso (agr-odoo) 410efa6012 [FIX] product_email_template: avoid traceback when referring to "object"
1. Activate 'Deliver Content by Email' in the Sales>Configuration>Settings
2. Create a mail template with Product Template for 'Applies to' and
a dynamic field (e.g. ${object.company_id.name}) in the body
3. Add this mail template on a [DEMO] product 'Automatic Email at
Invoice' field, in the Sales tab
4. Create an invoice with [DEMO], confirm it.
5. If the ID of the invoice does not exist as a product.product, you get a
traceback

The reason is that the model used for the template rendering is the
one specified on the template, but the res_id given to the composer
is the one from the invoice.

opw-2476169

closes odoo/odoo#74519

X-original-commit: 67bdd9cada7b06bc73d7bebedb7f10547e425055
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-07-30 18:30:32 +00:00
desdelinux b201ac6649 [IMP] l10n_pe: New identification types requested by the SUNAT
By Sunat regulations from 08/01/2021 two new types of identity documents
will be accepted: Temporary Residence Permit and Safe Passage.

Legal ref:

Website: https://cpe.sunat.gob.pe/node/88
Document with Catalog Update No. 8:
https://cpe.sunat.gob.pe/sites/default/files/inline-files/AjustesValidacionesCPEv20210727%20%28ultimo%29.xlsx

Replaces #74342

closes odoo/odoo#74506

X-original-commit: d7a701910520c22d963e21e3a9cc6d4122ead003
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-30 14:15:43 +00:00
Antoine Vandevenne (anv) e9ee1d2cb4 [REM] payment_ogone: remove unused Flexcheckout views
Commit 3d90d02 removed the integration with the Flexcheckout API but the
dedicated views were left behind, as it was not possible to remove them
in stable version.

This commit removes the unused views in master.

task-2494916

closes odoo/odoo#74505

Related: odoo/upgrade#2699
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-07-30 14:11:54 +00:00
Laurent Smet 17b42902ae [IMP] account: Remove 'Take money in/out' button
closes odoo/odoo#73708

Task: 2596069
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-14 12:13:13 +00:00
Ahmad Khan 71f0779d75 [CLA] signature for aims-khan
closes odoo/odoo#74470

X-original-commit: d3508a9ec22f8775e0f1df36455526df0e3b9350
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-29 18:18:03 +00:00
odoomates ba27bb3a3f [CLA] Odoo Mates
closes odoo/odoo#74464

X-original-commit: 2c969004e57a7321315d4bfda8dbcf90c76b6d29
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-29 17:29:50 +00:00
Dishon Kadoh d5d38a149f [CLA] Dishon Kadoh
closes odoo/odoo#74463

X-original-commit: 84e2ec4011ca7d277404d862e2d547df09bbe474
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-29 17:28:16 +00:00
Lucas Perais (lpe) 70353a2063 [REF] web: action_service: dialog is null when absent
Before this commit, the current dialog (in the action service's state) was either an empty object
when there was no dialog, and a filled object when the dialog was present.

After this commit, when there is no dialog, the dialog state is null.

closes odoo/odoo#74442

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-08-02 07:58:09 +00:00
Lucas Perais (lpe) 83eb9f9ebd [FIX] web: action_service: onClose callback can execute history-back
Have an action in the breadcrumb (A)

Do an action (B) that has a button which spawns a dialog with a onClose callback executing an`history-back` event.
This may be useful when the action (B) acts as a selection buffer between (A) and the dialog.
(e.g. stock_barcode: execute `stock_barcode_client_action` from a picking)

Before this commit, the history-back event just closed the dialog without going back to the action (A)
This was because the wrong condition was used to determine if the dialog was still alive or not.

After this commit, the action (A) is displayed when closing the dialog from any point.
2021-08-02 07:55:52 +00:00
Habib (ayh) b0de4f7cef [IMP] account: make account move chatter log more odoo standard
Remove the custom messages and replace with the default odoo tracking message that uses tracking_value_ids as parameters
Journal Items will log all changes of tracked fields in the chatter of the associated Entry - including one2many and many2many fields (by overriding _mail_track)

references original task 2061399
closes task 2469621

closes odoo/odoo#72023

Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-27 16:45:09 +00:00
Benjamin Vray 00025dd406 [FIX] web, web_editor: disable horizontal scroll when dragging snippet
This commit adds an option to disable horizontal scrolling in the
smoothScrollOnDrag feature options and use it when dragging and
dropping a snippet into the editor to prevent the wrapwrap from
scrolling horizontally when an element overflow the page (e.g. an
animated element).

task-2215118

closes odoo/odoo#74518

X-original-commit: fdbc109780f336c4b7dcac31585beaad682e029a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-30 18:18:35 +00:00
Benjamin Vray da22414233 [FIX] website, *: prevent bottom fixed elements from hiding buttons
*: web, website_livechat, website_sale_comparison

Before this commit, bottom fixed elements (e.g. the livechat button)
hid the buttons to go to the next step in website sale when these
buttons are located at the bottom of the page, on some screen sizes.

After this commit,

- A bottom fixed element is hidden if this element hides a button at
the bottom of the page.

- Bottom fixed elements are hidden if a modal is open
to prevent it to hide buttons or any important part of the modal.

task-2501400

closes odoo/odoo#74515

X-original-commit: a851db9495fe9d8c1951f218a71e4d4a427cf96d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-30 17:24:48 +00:00
Odoo's Mergebot 0d9e21dfe7 [IMP] website: configurator organizes links in menu and footer
The configurator takes care of the organization of the links to the different
pages. Some links are put in the menu and some are put in the footer. The order
is predefined. If too many links are present in the menu then a sub-menu 'Company'
is created and some links are put in it. For the 'News' and 'Succes Stories' features
a website specific blog is created.

Links have the following order in the menu and are present only if their corresponding
website.configurator.feature has been selected in the configurator excepted for the 'Home'
and 'Contact us' links which are default links:
- 'Home'
- 'Shop'
- 'Event'
- 'Courses'
- 'Services'
- 'Pricing'
- 'Company': if more than 8 links in menu and more than 1 item in this submenu
             otherwise the three following links are in the top menu.
  - 'News'
  - 'Success Stories'
  - 'About us'
- 'Appointment'
- 'Contact us'

Links in footer:
- 'Privacy Policy'
- 'Help': if website_helpdesk installed. This is not a website.configurator.feature.
- 'Forum'

Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930
Upgrade: https://github.com/odoo/upgrade/pull/2682
task-2518565

closes odoo/odoo#71993

Related: odoo/enterprise#18930
Related: odoo/upgrade#2700
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-31 04:14:42 +02:00
Romain Derie 7329b5dc78 [ADD] test_website_modules: new website test module
The goal of this module is to be able to write tests that run and test the
`website` module business code with all the website modules installed (like
website_blog, website_sale etc).

This is, among other things, useful to test the configurator behavior.
Testing the configurator inside the `website` module would require the tour to
install modules, which is against our testing suite policy.
Such tests end up in `@standalone` testing suite, run only in nightly, meaning
anyone can break stuff without knowing. Such tests are way, way less efficient.

Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930

task-2518565
2021-07-30 22:03:18 +00:00
Benjamin Frantzen (bfr) 3416c596d9 [IMP] account: auto_install l10n_it_edi_sdicoop if main company is Italian
Task ID: 2613031

closes odoo/odoo#74508

X-original-commit: a7a4552b6cd9d1992d854c7f79e12ea172f98d81
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-07-30 15:06:19 +00:00
Sébastien Theys 810d5fd8aa [IMP] mail, im_livechat: add new UI for inviting members on channels
Opportunity is taken to clean the various follow/join/invite methods into only
one `add_members` method.

Part of task-2360169

closes odoo/odoo#74425

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-07-30 15:52:33 +00:00
xO-Tx eb1262960f [IMP] web_editor: allow adding a shape-on-image via custom URL (themes)
The goal of this commit is to add a "Python version" of the
shape-on-image feature using a controller.

Since the whole logic to apply shapes on image is JS-based, we need
to use this URL (just like for background shapes) when we want to add
a shape by default on images in themes. When the configurator replaces a
snippet image (which the theme defines to have a shape), the shape
option should still be applied on the new image.

On the JS side, loadImageInfo() is overridden in order to mark
images (with theme default shapes) with corresponding attachment
data (original-id, original-src, mimetype).

Here is an example of the minimum xpath required to add a shape on a
snippet image in a theme:

```
<template id="s_image_text" inherit_id="website.s_image_text">
    <xpath expr="//img" position="attributes">
        <attribute name="src">/web_editor/image_shape/website.s_image_text_default_image/web_editor/solid/blob_1_solid_rd.svg?c2=o-color-1</attribute>
        <attribute name="data-shape">web_editor/solid/blob_1_solid_rd</attribute>
        <attribute name="data-original-mimetype">image/jpeg</attribute>
        <attribute name="data-file-name">s_image_text.svg</attribute>
        <attribute name="data-shape-colors">;o-color-1;;;</attribute>
    </xpath>
</template>
```

task-2593454

closes odoo/odoo#73938

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-30 17:35:19 +00:00
15aae7ea34 [IMP] website: organize links in menu & footer on configurator apply
The configurator takes care of the organization of the links to the different
pages. Some links are put in the menu and some are put in the footer. The order
is predefined. If too many links are present in the menu then a sub-menu 'Company'
is created and some links are put in it. For the 'News' and 'Succes Stories' features
a website specific blog is created.

Links have the following order in the menu and are present only if their corresponding
website.configurator.feature has been selected in the configurator excepted for the 'Home'
and 'Contact us' links which are default links:
- 'Home'
- 'Shop'
- 'Event'
- 'Courses'
- 'Services'
- 'Pricing'
- 'Company': if more than 8 links in menu and more than 1 item in this submenu
             otherwise the three following links are in the top menu.
  - 'News'
  - 'Success Stories'
  - 'About us'
- 'Appointment'
- 'Contact us'

Links in footer:
- 'Privacy Policy'
- 'Help': if website_helpdesk installed. This is not a website.configurator.feature.
- 'Forum'

Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930

task-2518565

Co-authored-by: Sébastien Mottet (oms) <oms@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
2021-07-30 13:51:33 +00:00
Romain Derie 59098dbc60 [FIX] website: avoid commit, reset env, reload registry for no reason
Before this commit, if the configurator was applied without a module to install
it would still go through `_button_immediate_function()` which does

```
self._cr.commit()
api.Environment.reset()
modules.registry.Registry.new(self._cr.dbname, update_module=True)
```

for no reason, even if `self` is an empty module recordset.

This code is taking ~5 seconds.

This flow will occur when you either:
- Create a new website when selecting only page feature
- Create a new website when some modules feature are already installed

Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930

task-2518565
2021-07-30 13:51:25 +00:00
Romain Derie 460d5ecb92 [IMP] website: add tests for all snippets (drag and drop)
Image gallery snippet when dropped is throwing a traceback.
This lead to the editor not usable anymore, as any JS error will prevent any
further action (no JS will work anymore).

This introduce a test that will drag and drop every snippet in a page and click
on it to load its settings in the right panel.

Note that it will remove the snippet before drag & dropping the next one, as
having too many snippet will impact the perf, even killing the browser entirely
if there is a lot.

task-2604383

closes odoo/odoo#74135

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 13:43:24 +00:00
Arthur Detroux (ard)andqsm-odoo 1c442782f8 [IMP] website, *: add visibility options on sections
*: web_editor

Provide the user with an option to hide or display a section tag
depending on the visitor's location (if geoip enabled), language,
utm_medium, utm_source and utm_campaign.

Users can use a M2M widget to select different records. These will be
used to create a CSS selector on save that will hide the section tag
depending on the various options they selected.
This CSS selectors will be applied, as well as various data attributes
when the page loads to hide the targeted tag. All of these operations
are handled client side.

The geoip country had to be added to the session for the feature to work
with countries.

Part of https://github.com/odoo/odoo/pull/67140
task-2381049

closes odoo/odoo#67140

Related: odoo/enterprise#19907
Related: odoo/upgrade#2658
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-07-30 14:03:42 +00:00
Arthur Detroux (ard) 3a23891fa1 [IMP] website_forum: change welcome message sanitization
This commit changes the sanitization of the welcome_message to be on par
with other modules that take advantage of web_editor.

Part of https://github.com/odoo/odoo/pull/67140
task-2381049
2021-07-30 12:52:30 +00:00
qsm-odoo f14bbf1bdc [REF] web, *: move cookie utils out of legacy core utils
*: im_livechat

Cookie utils will be required on the frontend side but before the lazy
loading. This commit splits them out of default utils to achieve that.

Note: kept as "legacy" utils anyway, we'll handle that when the time is
right...

Part of https://github.com/odoo/odoo/pull/67140
task-2381049
2021-07-30 12:52:30 +00:00
sofiagvaladze 08ed9a0ebb [IMP] hr_recruitment: UX improvements
Multi-Application Management and UX improvements.

Improve in Recruitment app Job Positions Kanban view;
It is more intuitive if list is applications default view; improve the applications form;

Task - 2404610

closes odoo/odoo#63946

Related: odoo/enterprise#15750
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-30 13:15:02 +00:00
Samuel Degueldre 4629caa530 [FIX] web: remove expensive @extend rules
These rules cause the scss compilation to increase dramatically in both
time and volume of the compiled file (for assets backend with no modules

closes odoo/odoo#74480

Installed: 1s -> 3s, 900kB -> 1.5MB)
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-30 11:10:07 +00:00
Samuel Degueldre c59c92c7ec [FIX] base: avoid compiling css assets twice while in debug=assets 2021-07-30 09:52:27 +00:00
Xavier-Do e27340066b [IMP] core: enforce explicit license in all manifest
The license was missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.

The missing licenses were add in all version starting from
12.0 in repos odoo, enterprise and design-themes.

Starting from this commit, when a license is not defined,
a warning will be triggered.

closes odoo/odoo#74347

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-30 12:34:11 +00:00
Pratima Gupta e470cf945f [IMP] purchase_stock, mrp: improved the log note of replenishment report
mrp - when a MO is generated from replenishment report, a log note is added
to chatter with the link of replenishment report, as this report got deleted
when to to qty is 0.0 then link dost not work. Hence added the simple text
for Relenishment report.

purchase_stock - When click on the order once button of replenishment report,
if vendor is not added on product then, added a new wizard with functionality
to directly jump on the edit product.

Added log note to the PO if po lines are generated through the Replenishment
report.

TaskId - 2427738

[IMP] stock: split method to create new or unlink unused OP

As, server action was added to the Replenishment menu, unless
until user clicks on the menu, new order point will not get
generate. Hence splitted the method and added to auto vaccum for
this.

TaskId - 2427738

closes odoo/odoo#66130

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-30 12:20:39 +00:00
Arnold Moyaux d21ab73d79 [FIX] stock: prevent to copy reservation on stock.move.line
Usecase:
- Product A 10 units in stock
- Do a planned transfer of 7 units to customer
- Reserve
- Do an rpc or execute code to call copy on the stock.move.line

It will result with 2 sml that have 14 units reserve and 7 units
reserved on stock.quant

It's the same result if you create twice the stock.move.line without
updating the stock.quant at the same time. However in stable we
try to only use _update_reserved_quantity on stock.move or some
override in create/write method for 'done' stock.move.line in unlock
cases.

So we never use the copy in stable and define the basic behavior as
'we don't copy the reservation' could prevent some usecase where
the update on the stock.quant is forgotten after.

closes odoo/odoo#74489

X-original-commit: e5041ee1d9b5036cab55f4332977aeb818a3b1e1
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-30 11:35:05 +00:00
Simon Genin (ges) 7719f39e68 [FIX] web: fix readonly mode for url widget
The readonly would not clear the old content when new content was put
through an onchange.

closes odoo/odoo#74476

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-30 10:26:06 +00:00
Odoo's Mergebot bbf8255bbb [MERGE] event_*: refactor and improve badge reporting
PURPOSE

Rework the existing badge report to ease its override and make it look better
and introduce a new ticket report that contains more detailed information.

SPECS

Improve the existing badge report
Change the event badge report to create a proper action report so that it
shows accordingly on form (and other) views.
Remove the duplicate template for event badges and unify into one template
The "event badges" report can be printed from 2 different sources, from the
event.event itself as a preview and from the event.registration as an actual
badge for a specific attendee.
Improve the general layout of the report and remove unnecessary fields.
Introduce a new badge report with the A4 format.

This report is meant to be printed for the attendee and contains more
detailed information that the existing "badge report", which is only meant to
be folded and used as a badge.

We also introduce a new field that allows easily customizing these reports by
adding "extra instructions".

See underlying commits for more details.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-2120259

closes odoo/odoo#72935

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-30 14:50:25 +02:00
Benjamin Vray 81f0f0840c [IMP] website_sale, *: review prices to be more realistic
*: product, purchase, purchase_stock, sale, sale_stock, web

PR-69971

task-2501400

closes odoo/odoo#69971

Related: odoo/enterprise#19974
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 10:39:44 +00:00
Benjamin Vray 6aa85001cb [IMP] website_sale: add a website description for customizable desk
PR-69971

task-2501400
2021-07-30 10:39:44 +00:00
Benjamin Vray 6ba77a583f [IMP] website_sale: add options in the sort by in the shop page
PR-69971

task-2501400
2021-07-30 10:39:43 +00:00
Benjamin Vray 43738af29a [IMP] website_sale: add an image for warranty product
PR-69971

task-2501400
2021-07-30 10:39:43 +00:00
Jeremy Kersten efe897f6ab [FIX] website_sale: fix tour when redirect to backend is too slow
We increase the time (if we can call this a fix) while the switch from frontend
to backend become faster. It seems to be a problem of (useless?) regeneration of
assets + a slow refactoring of scss in backend which use extend that is slow...

closes odoo/odoo#74477

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-30 09:21:23 +00:00
Aurélien Warnon eb06e10f56 [IMP] event_sale: slightly improve event.registration form view
This commit simply makes the "Sale Order" stat button on the Event form only
visible when there is actually a sale order to access.

Task-26779
2021-07-30 09:02:55 +00:00
Aurélien Warnon 8bae36bc1a [FIX] event: fix savepoint issue with event mail scheduler
This commit removes a savepoint call when running the event mail scheduler.

Indeed, this save point registration was colliding with the fact that we commit
the assets bundle during the reporting process, see 'commit_assetsbundle'
context key.

Since the transaction was commit during the report generation, when reaching
the end of the savepoint block, the system was trying to release a savepoint
that was no longer existing.

Indeed, committing removes all savepoints, since (quoting the Postgres doc)
"Savepoints can only be established when inside a transaction block.", which
makes total sense.

This was leading to a:
bad query: RELEASE SAVEPOINT "669516d2915811eba8d2b4d5bde7cdcc"
Aborting the whole event mail scheduler process.

As it's rather unclear why this savepoint was introduced in the first place,
we attempt to remove it. This change is done in a singular commit to be easily
revertable if ever necessary.

Task-26779
2021-07-30 09:02:54 +00:00