Commit Graph
147792 Commits
Author SHA1 Message Date
Brice bib Bartoletti 65a89b4d57 [FIX] account: remove readonly on auto_post
The aim of this commit is to allow user to post a reversed entry even
when the date for the reversed has been set in the future.

before this commit:
if the move is generated using the reverse entry button and a date in
the future, the reverse entry is created with auto_post True and is
readonly in the view resulting in the user being unable to post the
move himself.

after this commit:
auto_post can be manually set to false and the user can post the move
himself.

closes odoo/odoo#83029

Task: #2522640
X-original-commit: 40b7976de1fe1cae71eb1063188eacb9a8a8fb70
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
2022-01-19 13:15:00 +00:00
Yolann Sabaux 0b78709d3a [FIX] website_blog: search query not consistent
steps to reproduce:
- install blog
- create more than 12 articles with at least on word  (the one we will search for)
- Go to the "blog" menu of the website
- Go in the search field
- Search for the word in the created articles
-> Odoo removes the search criteria on the blog (Website) + number of results is inconsistent

OPW-2720355

closes odoo/odoo#83031

X-original-commit: bc2ed4a5f0997929930e3f279e5e1347818f8880
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-19 12:23:07 +00:00
Nicolas Lempereur 96ec641217 [FIX] web_editor: no !important bg-color
The tool to change background color in mass mailing will currently
set the CSS property as !important.

On outlook software (or windows mail app) this seems to fail:

- !important on inline CSS should not be used

In this fix we remove !important when inlining CSS.

opw-2641343

note: this forward-port is only taking half of 14.0 d7e5101603 since the
issue of targetting DIV elements does not apply here (the <div/> with
the background color are transformed in table in convert_inline.js).

closes odoo/odoo#82924

X-original-commit: fb675251ce8b13d36dfac7a50e9b1cea4759cc02
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-01-19 10:30:52 +00:00
Josse Colpaert 6789b8f977 [FIX] l10n_ar, l10n_cl, l10n_pe, l10n_ec: only change invoice demo data when the company has the right country
Before when you installed one localization e.g. PE, but then you would
install another one with a demo company, then that demo company's demo invoices
might have adapted to the structure of PE, while it might be for another
country.

In the meantime we check that the necessary latam_document_numbers are set.

closes odoo/odoo#82998

X-original-commit: bef38eaee0e389554d35fede53a1224b72271d7f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-01-18 16:17:43 +00:00
stefanorigano (SRI) a2dcdf35cb [FIX] mail, web: activities, 'dl-horizontal' class is now discontinued
Prior to this commit the 'o_Activity_details' element was using a
discontinued bootstrap class, causing the layout to brake.

task#2731819.

closes odoo/odoo#82893

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-18 16:17:39 +00:00
Adrien Widart 87dc2bc614 [FIX] stock_account, sale_stock: reverse AML using the returned SM value
When reversing an invoice linked to a sale order, the value of the new
anglo saxon AML should be based on the value of the returned product

To reproduce the issue:
(Need account_accountant,purchase)
1. Create a product category PC:
    - Costing Method: FIFO
    - Inventory Valuation: Automated
2. Create a product P:
    - Type: Storable
    - Product Category: PC
3. For C in [10, 20, 30]:
    - Create a purchase order with 1 x P at cost C
    - Receive P
4. Create a SO with 3 x P
5. Deliver the products one by one
6. Create and Post the invoice INV linked to SO
7. Return the second delivery
8. Add a credit note to INV01:
    - Credit Method: Partial Refund
9. Set the quantity to 1
10. Post the new invoice INV02

Error: The anglo saxon lines are listed in the journal items, which is
correct, but their value is $30 while it should be $20 (i.e., the value
of the returned product)

When delivering the last product, its standard price is updated with the
new value ($30):
https://github.com/odoo/odoo/blob/6b96ed418cb626678f4fa5baec25a903d7a74eda/addons/stock_account/models/product.py#L305-L307
Later on, when posting the credit note, the module gets the anglo saxon
unit price (`_stock_account_get_anglo_saxon_price_unit`). However, it
does not consider that the current account move line is reversing
another one. In the reversing process, the computation of the invoiced
quantity should be based on the invoices lines that are reversing too.
Moreover, when computing the average unit price of the returned product,
the module should use the stock moves that are returning the product.
In the use case, because of the two issued noted above,
`_compute_average_price` does not find any stock valuation layer to
compute the average unit price and uses the fallback, i.e. the standard
price of the product:
https://github.com/odoo/odoo/blob/6b96ed418cb626678f4fa5baec25a903d7a74eda/addons/stock_account/models/product.py#L652-L656
That's the reason why, in the above case, the value is $30 instead of
$20.

Note: a similar use case can be reproduced with a kit

OPW-2646926
OPW-2628215

closes odoo/odoo#82978

X-original-commit: 524d0d5e8817e1c7bcc99204c4cbb90fcfb6074c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-01-18 15:25:51 +00:00
Adrien Widart 483609c479 [FIX] stock_account: base reversed anglo-saxon AML on original one
When reversing an invoice that contains some anglo-saxo AML, the new
anglo-saxo AML should have the same unit price than the original one

To reproduce the issue:
(Need account_accountant,purchase)
1. Create a product category PC:
    - Costing Method: AVCO
    - Inventory Valuation: Automated
2. Create a product P:
    - Type: Storable
    - Product Category: PC
3. Create a purchase order PO01 with 2 x P for $10
4. Confirm PO01 and process the receipt
5. Create and Post an invoice INV01 with 2 x P
    - As listed in the journal items, the anglo-saxo lines have been
generated with a value of $20
6. Create a purchase order PO02 with 2 x P for $20
    - The cost of P becomes $15
7. Confirm PO02 and process the receipt
8. Add a credit note to INV01:
    - Credit Method: Partial Refund
9. Set the quantity of P to 1
10. Post the new invoice INV02

Error: The anglo-saxo lines are listed in the journal items, which is
correct, but their value is $15 (the new cost of P) while it should be
$10

When reversing an invoice with the "partial refund" method, the
anglo-saxo lines are generated via the regular flow (as if it were a
"standard" invoice). Therefore, when getting the unit price of the line,
it uses the product's standard price. In such situation, it should use
the unit price of the original line.

OPW-2646926
OPW-2628215

X-original-commit: 87f7e78340dfe553923b2b65f61de06d5778cfbd
Part-of: odoo/odoo#82978
2022-01-18 15:25:50 +00:00
Jacky (trj) 86298440ec [FIX] point_of_sale,pos_epson_printer: htmlToImgLetterRendering in every printer
The letterRendering setting was only properly set for the `Printer` class but not for the `EpsonPrinter`.

closes odoo/odoo#82980

X-original-commit: 3bbf4bbcc0e1f81c1eddb91b54c3c863722aea46
Related: odoo/enterprise#23586
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-01-18 14:33:59 +00:00
Jeremy Kersten 93627a6e9e [FIX] project: fix portal layout
If you have some text in your task, the second column will be stacked

closes odoo/odoo#82979

X-original-commit: 60f0d908386cf98a7879c9ad6788299d81d778cb
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-18 14:33:55 +00:00
Umesh Gupta 94fd318b8e [FIX] website_slides: properly show placeholder for course description
Currently, when creating a new course from front-end, placeholder for
the course description is broken because it's split in multi line in
the xml file.

This commit fixes the issue by keeping the placeholder in a single
line in XML file and thus preventing the gap being displayed between
two sentences on front-end.

TaskID-2734524

closes odoo/odoo#82973

X-original-commit: 0db1844ddaf1f4cd46152e356dea10f3fd07169a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-18 13:40:52 +00:00
Christophe Monniez 8b295ad968 [FIX] tests: bump allowed assets generation time
As this test is always red, notably because of the qunit asset bundle, the
threshold is raised for some bundles based on runbot builds
observations.

closes odoo/odoo#82972

X-original-commit: ab8350b5432a6a6d671bcc76413815274f7daaca
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-01-18 13:40:47 +00:00
Laurent Smet 022ecb50fe [FIX] account: 0% tax not in tax report due
Steps to reproduce:

Have a 0% Tax
Make an invoice with it
Open tax report

The 0% tax is not present in the report because there is no tax lines generated for them because the resulting balance is zero.
Since the tax details is making a mapping between tax lines and base lines and the tax report is using them to compute the report, the tax report is not able to compute the tax base amount for such taxes.

Explanation:

Until now, the tax line with a zero amount wasn't generated because considered as noisy journal items.
Now we must be able to groupby on the base tax account on the tax report, we are forced to use the tax details.
Injecting dynamically the 0% tax on the tax details sub-queries is really complicated and leads to a huge performance drop.
For that reason, we start to generate the tax lines for 0% tax even the balance is zero.
However, since there is nothing creating the missing lines in the past, it should be fixed case by case if needed.

opw-2711432

closes odoo/odoo#82971

X-original-commit: 65b5ec4ad65f798b1d647978b5b42a49e760139a
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-18 13:40:43 +00:00
Arthur Gossuin (goa) 6b0ab28791 [REF] delivery: Packages and Commodities in base
Each delivery provider, requires some information about the packages
that need to be sent as well as about the commodities (for commecial
invoices). Since this is needed by each provider, and the required
values are very similar, these packages and commodities can be done one
step ahead: in the base delivery module.

These new `_get` functions return a list of custom objects containing
the most important values concerning packages and commodities, and can
be called directly from the child classes.

closes odoo/odoo#82891

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-18 13:40:37 +00:00
Samuel Degueldre f108b21e6b [REF] web: stop using component ref in navbar
This is in preparation for owl2

closes odoo/odoo#82326

Related: odoo/enterprise#23289
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-01-18 13:40:30 +00:00
Samuel Degueldre 53b7d2a632 [REF] web: stop using component ref in dialog tests
This is in preparation for owl2

Part-of: odoo/odoo#82326
2022-01-18 13:40:30 +00:00
Samuel Degueldre 8b38281b84 [REF] web: stop using component ref in popover tests
This is in preparation for owl2

Part-of: odoo/odoo#82326
2022-01-18 13:40:29 +00:00
Samuel Degueldre b773f9e492 [REF] web: stop using component ref in createControlPanel
This is in preparation for owl2

Part-of: odoo/odoo#82326
2022-01-18 13:40:29 +00:00
Alexandre Kühn 416ea42516 [IMP] mail: remove unused t-ref
closes odoo/odoo#82965

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-18 11:57:04 +00:00
Audric Onockx (auon) 081efb3d62 [FIX] sale_project : display SO stat button on task in mobile
Steps :
- In mobile, go to Task

Issue :
- "Sales Order" stat button is not displayed.

Cause :
- This button's classe are :
	- d-md-inline = displayed when size is medium+.
	- d-none = or else not displayed
- In the past, there was a field SO in the form,
	which made this button unnecessary and taking space.

Fix :
- Now that this field isn't present anymore, delete d-none part.

opw-2722535

closes odoo/odoo#82963

X-original-commit: 16f489ad6b6b9e8118bc806f220cf122e20374a8
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-18 11:56:59 +00:00
Raphael Collet 5a32587f16 [FIX] product: make cache invalidation more specific
Some aggressive cache invalidation in the middle of method write() where
the model has children models (in the _inherits sense) causes very nasty
errors that are hard to fix.

Consider two models A and B, where B inherits from A.  Also consider two
fields a1 and a2 on A, which are thus both inherited by B.  Now take a
record from model B, and update both fields as:

    record.write({'a1': ..., 'a2': ...})

As both fields appear as related fields on model B, the method write()
puts all values in cache, then it proceeds to call the inverse method of
both fields.  The inverse method of a1 is called, and this writes on the
parent record.  Now imagine that some override on A invalidates the
whole cache.  When the inverse method of a2 is called, the field's value
on B has been invalidated, and this therefore writes the value False on
the record's parent.

This patch removes and adapt such cache invalidations:
 - Since 4b1cb41cf7, the cache invalidation
   in method write() of product.product is no longer necessary.
 - The cache invalidation in method write() of product.pricelist.item
   has been removed as well, since field that needs to be recomputed no
   longer exists.

Fixes #76946, #77042

closes odoo/odoo#82958

Opw: 2657461
X-original-commit: 5a73a8a3697c0f2685471efa252e5eb1af738e83
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-01-18 11:56:55 +00:00
Antoine Vandevenne (anv) e0601745d8 [FIX] payment_buckaroo: stop crashing on invalid translatable string
closes odoo/odoo#82939

X-original-commit: 1d2fef3ae247f18ccf5c046bf02d35f66f0a0443
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-18 11:02:14 +00:00
Antoine Vandevenne (anv) 04997a86b9 [FIX] payment_buckaroo: prevent creating new session for returning users
Before this commit, users returning from Buckaroo to Odoo after payment
could see their session renewed, depending on their browser's
implementation of the `SameSite` cookie attribute. This prevented Odoo
from retrieving the transaction from the users' session.

This commit flags the return route of Buckaroo with
`save_session=False`, hence allowing all users to immediately
post-process their transactions when they return to Odoo.

closes odoo/odoo#82938

X-original-commit: b309d3a99f8ff4a43a21c4772c344ed3250e319f
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-18 11:02:10 +00:00
Florent de Labarre 7088851cad [FIX] sale_purchase: copied purchase is linked with the SO
- create an SO with dropshipping, confirm. It create a PO 1
- copy PO 1
--> Issue PO 2 is linked with the SO

closes odoo/odoo#82902

X-original-commit: d56f94d7db59f1228ec90ab0e8ab1e89f3a663e7
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-18 11:02:06 +00:00
Arthur Gossuin (goa) 5e849006db [IMP] l10n_in: always generate commercial invoice
The commercial invoice is usually only needed when the country of the
sender is different from the country of the recipient, however, for india,
commercial invoice is mandatory, even if the goods dont leave the country:
https://cleartax.in/s/commercial-invoice/#commercial

closes odoo/odoo#82084

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-18 11:02:02 +00:00
Arthur Gossuin (goa) a8ac9c674e [IMP] delivery: add bool function for CI
Usually we want to create commercial invoices in case the warehouse is in a
different country than the recipient. However, some countries like India
need those documents for internal shipping as well.

The added function can easily be overriden in a dedicated module for the
countries that require such a commercial invoice.

Part-of: odoo/odoo#82084
2022-01-18 11:02:02 +00:00
Martin Trigaux d9091ed043 [FIX] point_of_sale,base,: skip store_fname
The store_fname is calculated based on the checksum, as for file_size

and checksum, skip during create/write
Avoid replacing in place the attachments in base as this breaks some
tests reusing the vals_list content (e.g. test_complete_me

Set datas in the copy to keep the content when duplicating a record
(e.g. test_14_duplicated_css_assets fails without this)
running twice because of @warmup share the same self.vals)

closes odoo/odoo#82919

X-original-commit: 611e6794376b0d60291dec085485bb2fb4e31a33
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-01-18 10:09:59 +00:00
Adrien Widart cafd488883 [FIX] stock: convert product description
In some cases, the SM description is incorrect

To reproduce the issue:
1. Create a product P
2. Create a receipt with 1 x P

Error: The description of the SM is incorrect: `<p><br></p>`. It should
be the name of P

Another example:
1. Create a product P:
    - Internal Notes: "Lorem Ipsum"
2. Create a receipt with 1 x P

Error: The description of the SM is incorrect: `<p>Lorem ipsum<br></p>`.
It should be "Lorem Ipsum"

Since [1], `product_template.description` is a HTML field.

[1] bea5790713

OPW-2732208

closes odoo/odoo#82917

X-original-commit: 73f05114307b6ec6590da22903751ab79e7efa90
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-01-18 10:09:55 +00:00
Florian Damhaut d7c70ade0d [FIX] calendar: correct errors for default attendee
Step to reproduce:
- Create a lead
- go on the smart button meeting
- create a new meeting and edit it
- save

Current behaviour:
- Validation Error
- It seems the default_get apply command in onchange instead of passing the value which lead to missformed argument for meeting

Behaviour after PR:
- Do not send readonly attendee in calendar.event form view

opw-2724372

closes odoo/odoo#82794

X-original-commit: fba25d6982d149a9d5083f993dea7c2091736c58
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-01-18 09:14:47 +00:00
Laurent Smet 807ca26d0a [FIX] l10n_be_edi: Fix wrong anchor for AdditionalDocumentReference (E-FFF EDI)
AdditionalDocumentReference is currently injected right after DocumentCurrencyCode.
However, in 15.0, OrderReference is implemented and then, AdditionalDocumentReference is no longer injected at the right place.
To fix this, we inject now this field just before AccountingSupplierReference that must be always there and Signature is not implemented.

For more details, see:
http://www.datypic.com/sc/ubl20/e-ns19_Invoice.html

closes odoo/odoo#82897

X-original-commit: ce4d52fbbf400d911901e09d562e06984447639a
Signed-off-by: Florian Gilbert <flg@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-18 08:18:06 +00:00
Hoang Tran 4851cbc094 [FIX] sale: only reconcile with posted payment if linked transactions
While posting an invoice, if the transactions linked with the invoice
are failed due to valid reason from the payment acquirer, forcing
reconciliation on transactions' payment will raise an error because such
payment isn't posted.

closes odoo/odoo#82895

X-original-commit: 52937b441432b56994dda857d8cdee06b8128872
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-18 08:18:02 +00:00
Florian Damhaut 237b1b0d65 [FIX] payment_authorize : accept american express CVC
American Express CVC code are 4-digit numbers

Current Behaviour:
Authorize currently only accept numbers up to 999.

Behaviour after PR:
Authorize accept number up to 9999

opw-2727511

closes odoo/odoo#82770

X-original-commit: 9f7821655a2b632f8e36569c438df358c0d23d02
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2022-01-18 07:32:58 +00:00
Laurent Stukkens (LTU) d5e40ea78b [FIX] project: prevent issue on description field resize in form
Prior to this commit:

    - The selector used by the FormHtmlFieldExpanderMixin is the generic one
      '.o_xxl_form_view .oe_form_field.oe_form_field_html'. This selector, altough
      valid, could lead to an undesired behavior if another html field is present
      previously (before the description one) in the view.

After this commit:

    - The '[name="description"] is added to the selector which reduces the possible
      matches only to the one of the description field.

closes odoo/odoo#82926

X-original-commit: db8684055712ec9c5d1acadee60e54a78d87c941
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-17 17:50:33 +00:00
Antoine Dupuis (andu) 7b21821d60 [FIX] l10n_pe: demo: set l10n_latam_identification_type_id to 'RUC'
The issue:
When creating a fresh DB with demo data, the demo company and
customer are created with l10n_latam_identification_type_id set to
the default, which is 'VAT', rather than 'RUC'.

This creates a problem when we create an invoice with the demo
company and the demo customer and validate it: when the l10n_pe_edi
module sends the invoice to the OSE, the OSE responds with the
following error code:

'1007|El dato ingresado no cumple con el estandar - [...]
error: Error Factura (codigo: 1007): 1007
(nodo: "cbc:ID/schemeID" valor: "0")'

Some observations on how the issue occurs:
Interestingly, when you create a new company or partner using the UI,
the `l10n_latam_identification_type_id` is automatically set to 'RUC'.
This is ensured by the `ResCompany.create()` and
`ResPartner._onchange_country()` methods, see
https://github.com/odoo/odoo/blob/f84dbf63b9354a3c577589178a09c3ffb151cba3/addons/l10n_latam_base/models/res_company.py#L10 and
https://github.com/odoo/odoo/blob/f84dbf63b9354a3c577589178a09c3ffb151cba3/addons/l10n_latam_base/models/res_partner.py#L24

However, when the demo company is created, the `create()` method is
called at the first <field> element, which is `name`, and so,
`create()` does not set `l10n_latam_identification_type_id`.

And because the demo partner is created without the UI, the onchange
is not called when the partner's country is set.

The solution:
Therefore it is necessary to manually set the
`l10n_latam_identification_type_id` in the demo data.

closes odoo/odoo#82920

X-original-commit: 33e174d58e7ad2a5a965f31a23c4b8281fedef79
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2022-01-17 17:50:29 +00:00
Julien Castiaux 3d7f49b2f5 [IMP] *: Don't override HttpCase.base_url() in tests
HttpCase.base_url() was introduced with ded278b9c2 but many tests were
using the name attribute already. The tests have been adapted to use the
new method.

closes odoo/odoo#82910

Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-01-17 16:56:01 +00:00
Victor Feyens 76aec79fd7 [FIX] point_of_sale: wrong field name used in constraint
Wrongly defined in #55525

Fixes #82834

closes odoo/odoo#82907

X-original-commit: 6ece16fbb0ceaced022a2d1b3f0c5769ba827125
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-17 15:57:53 +00:00
Paolo (pgi) 9d5eb68dc6 [FIX] l10n_ch: Fix the invoice title's CSS
The title's (S)CSS selector was failing to pick up the invoice title,
because it was inside the .swiss_container_v2 while it should be out of that.

opw-2584899

closes odoo/odoo#80873

Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-17 15:57:46 +00:00
Audric Onockx (auon) acfeac68d5 [FIX] account : apply analytic rule on invoice
Steps:
- Create an Analytic Account AA
- Create an Analytic Default Rule : when Product P > AA
- Create a Quotation including P, confirm and invoice

Issue:
- AA is not set for the invoice line of P

Cause:
- AA is computed on the invoice line when the product is added,
	but it is recomputed afterward from cache, where it is None

Fix:
- Not allow it to be recomputed afterward.

opw-2714340

closes odoo/odoo#82639

X-original-commit: 34b7c834cb67e1dc1f3727f103489e084c4788bf
Signed-off-by: Onockx Audric (auon) <auon@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-17 15:00:45 +00:00
Thibault Libioulle 54c5160264 [IMP] website_sale: search tag in product snippet
This commit adds a search on tag in product snippet.

task-2675384

closes odoo/odoo#79296

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-01-17 14:07:46 +00:00
Thibault Libioulle 8011e171ff [IMP] *: add product tag model access
*: mrp,point_of_sale,purchase,sale,stock

This commit adds the product tag model access to accurate manager groups.

task-2675384

Part-of: odoo/odoo#79296
2022-01-17 14:07:46 +00:00
Thibault Libioulle 86353f9582 [IMP] website_sale: handle product tags
This commit handle product tags and adds the ability to easily define
ribbons, coupons or Dynamic Snippet for a given tag.

Purpose
=======

Product tags allow users to define a given coupon/promotion program on
chosen products templates or product variants.
Product tags allow users to easily add a common ribbon on product
templates which shares a tag.
Product tags allow users to easily define a Product Dynamic Snippet to
show product variants which uses the same tag as the current product
template.

task-2675384

Part-of: odoo/odoo#79296
2022-01-17 14:07:45 +00:00
Thibault Libioulle 5b64d252d2 [IMP] product: add product tag model
This commit adds the product tag model.

Purpose
=======

The product tags allows to easily tag given types of product
independently from their category, following their product range, their
seasonal collection, their theme, etc

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

A product template takes tags that are valid for all their variants.
In order to add granularity, product variants can also take additionnal
tags.
A field is defined on product variants to allow searching on both
product template and product variant tags.

task-2675384

Part-of: odoo/odoo#79296
2022-01-17 14:07:45 +00:00
Anh Thao Pham (pta) 244e4cae03 [FIX] mass_mailing: fix preview prepend when sending test email
- Go to Email Marketing and create a new one
- Select any template
- In Settings tab, set a Preview Text
- Send a test
The content of the received test email is a text with the html code of the email body.

When sending the test email, the body is retrieved with "render_field" method, which
does not return a Markup object but a simple string.
Then "_prepend_preview" method prepends preview (Markup) to body (str).

opw-2686316

closes odoo/odoo#82886

X-original-commit: 71258f5020a0d1c4581cf85df31be3fb3f95562a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-17 13:12:26 +00:00
Nicolas Bayet b467e4df8c [FIX] web_editor: remove image toolbar when removing image
Task-2728793

closes odoo/odoo#82881

X-original-commit: 0ff6f919e10388f7fd6d8efbfb0c8f9644b2505e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-17 12:17:31 +00:00
Nicolas Bayet 48045a069b [FIX] web_editor: change fix for scrolling powerbox
The fix to add an `overflow: hidden` in order to prevent the browser
from chaning the scroll create a glitch where the scrollbar dissapear
when it is overflow: hidden.
A new css property exists to specify exactly this behavior
(`overscroll-behavior: contain;`).

Task-2728791

closes odoo/odoo#82880

X-original-commit: 4cfa9e786d41a27d1bc850eff4fc89e1c4b32974
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-01-17 12:17:28 +00:00
Victor Feyens 515362a044 [FIX] sale_management: lines reset on template change
The removal of existing order lines on template update was unexpectedly
lost in recent code changes.

This commit brings back the old expected behavior.

closes odoo/odoo#82868

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-01-17 12:17:24 +00:00
roen-odoo a4d5999471 [FIX] sale : Show SO with archived customer
Current behavior:
When archiving a customer contact, the SO linked to this customer where not shown after clicking sales smart button in company

Steps to reproduce:
1. App "Contacts": Have a company and a contact as child of this company.
2. App "Sale": Create a Sale Order for the contact of the company and confirm it.
3. App "Contacts": Archive the contact of the company and switch to the company.
4. App "Contacts": The Smart Button for sale orders says it has one sale order but if you click on it NO sale orders will be shown.

opw-2735060

closes odoo/odoo#82796

X-original-commit: f22364c32ac1438ededd611578b64a69186d7c9c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-17 12:17:20 +00:00
Florian Charlier 9d36149ed7 [FIX] website_slides: Fix join course link
The "Join course" link with additional resources was broken

Task-2735494

closes odoo/odoo#82804

X-original-commit: f59cbca07aff6107a355009b74b336a2860dfe29
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-17 10:29:57 +00:00
wan 4f3f28ada3 [IMP] account: add index used to open the dashboard
closes odoo/odoo#82807

X-original-commit: 18f03ef60153f593346738cfc09aaf755ba8d761
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-17 09:31:52 +00:00
wan 172269ee75 [IMP] account: auto_join statements on move_id
The dashboard is using a domain `[('move_id.state', '=', self.id)]`
This impacts the performances because we are not joining explicitely on
`move_id`. We can't use the field `state` because it is re-declared on
`account.bank.statement.line`.

X-original-commit: 8b19f0f981fefc6df7c8298b57619c6b9b0a0890
Part-of: odoo/odoo#82807
2022-01-17 09:31:52 +00:00
Laurent Stukkens (LTU) dca6ffc099 [FIX] project: prevent html editor fixed size
Prior this commit, the description field of both project.project and project.task
were displayed with the resizable bar and were displayed with a calculated height
which prevented to see the whole field.

After this commit, the resizable option is set to false which displays the whole
field content without the resizable bar.

task-2735599

closes odoo/odoo#82818

X-original-commit: 8acdb9e197eb78ceefec444a245b8b7f01e81fdc
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-17 08:38:52 +00:00