Commit Graph
136859 Commits
Author SHA1 Message Date
Tiffany Chang (tic) d20467bb6a [IMP] delivery, stock: group delivery slip packages
This commit makes it so if a delivery slip contains 1 or more packages
then move lines will be split by package (and non-package) groups with a
"section line" between them. This only applies to when a stock.picking
is 'State=Done'.

In order to accomodate complexity of splitting by package + grouping by
product unless printing serial numbers/lots + template inheritance,
reoccurring parts of the template are split into their own templates and
called. Relevant inheritance has been updated to match.

Additionally, picking.shipping_weight calculation has been updated so if
a pack.weight = 0 then calculation will default to the calculated
product weight. This prevents inconsistency between the "Total Weight"
at the top of the Delivery Slip and the package sections' displayed
weights. To distinguish which value is being used, package sections that
use the total product weight rather than the pack.weight have
"(estimated)" after it.

This completes subsection 3 of overall Improve delivery slip task.

Task: 2039720
2020-07-03 11:54:08 +00:00
Tiffany Chang (tic) 0accbd6e69 [IMP] stock, delivery: aggregate delivery slip product lines
This commit makes it so move_lines with the same product+description+uom
are grouped together ONLY WHEN serial numbers/lots are not to be
printed. This is the case when the setting "Display Lots & Serial
Numbers on Delivery Slips" is not active or when there are no
lots/serial numbers assigned in the picking. This is only applicable for
stock.pickings that are 'state=Done'.

In order to implement this, some clean up of lots/serial numbers printing
was also done.

This completes subsection 2 of overall Improve Delivery Slip task.
Task: 2008609
2020-07-03 11:54:08 +00:00
Jorge Pinna Puissant 600bfa1196 [FIX] hr: activity type responsible on hr plans
fine-tuning of bf8a9af1ac549be830bec28c88eb1c565b591941

- Employees > Configuration > Activity Planning > Plans and ensure the
  activities have different responsible;
- Create a new Employee, assign a Manager (a different user then the one
  connected, you can assign Marc Demo for example);
- Click launch plan.

Before this commit, the activity type responsible is ignored and the
responsible for all activities is the connected user.

Now, the responsible for the activities are assigned taking into account
the activity type configuration.

opw-2265631

closes odoo/odoo#54054

X-original-commit: 0f4ec369dccdf25aed259ae97b5cc8973a1a8c5a
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-03 13:03:46 +00:00
Yannick Vaucher 3230ae6441 [FIX] l10n_ch - Swiss QR layout cleaning
This intend to enforce specifications and improve readability

Layout changes:

* [FIX] Amount section must be placed under the QR code
* [FIX] Don't display empty additional information
* [FIX] Rename slip sections and labels
* [IMP] Rework of the layout

    Group content like adresse by removing line spacing
    Reduce character size to follow Swiss Implementation Guidelines QR-bill v2.1
    Reduce left margin to avoid overlap of spaced ISR reference on the Receipt

* [FIX] Missing street on Receipt
* [FIX] Add thousand separators

    Official specs asks for:
    - thousand separators as blank. (using a non breaking to avoid spliting the amount)
    - decimal separators as a full stop

    > If  the  amount  isincluded  in  the  Swiss  QR  Code,  then  it  must  be  printed  after  the currency code. A blank (space) should be used as the thousands separator and a full stop «.»as  the  decimal  separator.  The  amount  must  always  include  two  decimal places (e.g. CHF 1 590.00).

QR-Code:

* [IMP] Align QR code upper and improve accuracy of size

    Add an option on reportlab to print QR Code without surounding blank space
    this is required to compute with accuracy the width of 46mm x 46mm defined
    in the specs.

* [FIX] Street and street2 issues

    Removes an extra space between street values when only one is given.
    Test the right partner street, only the company street was checked.

QRR generation

* [FIX] make it possible to generate QRR

    It must be possible to generate QRR without ISR subscription number.

Content removed as not present in the specs version 2.1:

* [RM] procedure section
* [RM] due date

Translations:

* [IMP] Add translations of the QR-bill in DE, FR and IT
* [FIX] QR-bill lang is now based on customer lang

Tests:

* [IMP] Add unit tests for Swiss reality check for the QR-bill

closes odoo/odoo#54053

X-original-commit: 4f4edd0594b29252a5d44281cc773230c09521e9
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-07-03 13:01:15 +00:00
Ravi Singh 28ed951dee [FIX] web_editor: leftover rename video type in media dialog.
this fixes is related to this PR https://github.com/odoo/odoo/pull/41561 where
are broken the behaviour of options for media dialog.
In this commit, we have changed classes names to fix the broken behavior of
options in the video tab of media dialog.

task-2154812
Closes https://github.com/odoo/odoo/pull/52135

closes odoo/odoo#54041

X-original-commit: fafbd7525c481dfed6a3df2a5cd15fbd01ab4d31
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-03 10:42:19 +00:00
Jigar Vaghela 12b4a24b97 [FIX] stock_account/sale_stock: correctly valuate the product in below use case
Below is the case of product with automated valuation:
- You bought 8 units @ 10$.
- Then you deliver 10 units of the product.
- You assumed the missing 2 should go out at a value of 10$
  but you are not sure yet as it hasn't been bought in Odoo yet.
- Afterwards, you buy missing 2 units of the same product at 12$.

In this case the product has been undervalued when delivered without stock,
the vacuum entry is the following one (this entry already takes place):

Account                         | Debit   | Credit
===================================================
Stock Valuation                 | 0.00     | 4.00
Stock Interim (Delivered)       | 4.00     | 0.00

So, on delivering product with different price,
We should create additional journal items like:
Account                         | Debit    | Credit
===================================================
Stock Interim (Delivered)       | 0.00     | 4.00
Expenses Revaluation            | 4.00     | 0.00

closes odoo/odoo#52396

Task: 2224025
Closes: #52396
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-03 11:24:55 +00:00
Mathieu Duckerts-Antoine c997700181 [FIX] web: correctly reload categories
In the search panel, the categories, i.e. fields select="one",
with attributes expand="0", and enable_counters="0" (defaults) were not
correctly updated when the domain outside of the search panel was
updated. This is no longer the case.

closes odoo/odoo#54040

X-original-commit: 99e9cac63f5034c1ba2154779fe82170dd656236
Related: odoo/enterprise#11642
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-03 10:27:40 +00:00
Mathieu Duckerts-Antoine 9aa3297b9d [FIX] web: reload search panel before view model
Problem:

Go to the application apps, select accounting in the search panel,
then filter on lunch in the search bar: the category all is displayed
as selected in the search panel (accounting is no more a valid value
since expand="0") but the application lunch does not appear in the
kanban view.

Root cause:

The kanban model is reloaded with the old domain using accounting
without waiting the search panel to be reloaded but it is only known
after the search panel has been reloaded that the accounting value is no
more valid and that all should be selected instead of accounting, thus
that the domain used by the kanban model should be updated.

Solution:

The solution to the problem is simple: first reload the search panel,
then reload the view model with the updated domain.

X-original-commit: 8589babcd0f2c15433fe1eb06d0d745e80d01c22
2020-07-03 10:27:39 +00:00
jerome hanke (jhk) 833530248b [FIX] web: lang no overlap fullscreen button on html widget
On the html widget, the lang overlapped the fullscreen button which make
it seems not translatable.

note: fw-port contains only the visual part of the fix (remaining part
is not necessary thanks to 1915fe359).

opw-2280188

closes odoo/odoo#54014

X-original-commit: 4ba258c1971703642911ebaf55afcc4f87e76101
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-07-02 18:13:11 +00:00
Florent de Labarre 378cde8bc4 [FIX] partner_autocomplete: stop comparing apples and oranges
If no country is specified on a partner, self.country_id is
res.country() and partner_country_code contains res.country(). In the
next line the code was comparing `res.country()` with `'BE'`, raising
a warning.

closes odoo/odoo#54026

X-original-commit: ef9fc11ded5eaef81ee4d844039bf41a714599f5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-07-03 07:44:22 +00:00
Nicolas Martinelli 88c328bcd0 [FIX] web: do not suggest translation for empty HTML field
- Activate more than one language
- Install sale_quotation_builder
- Create a new quotation model without website description
- Create a SO using this model, Save

The 'Please update translations of' is displayed for the website
desctiption, although it is empty: when clicking on the link, no record
is shown.

This happens because an empty HTML field always contains at least
`<p><br></p>`.

We do not consider the latter string for translation.

opw-2274203

closes odoo/odoo#54025

X-original-commit: aad4d516b6fb4b286f24bc536e5ecb67558a0c4d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-03 07:43:03 +00:00
Aaron Bohy ea7b5f059c [IMP] crm: crm.lead form view: set ids on duplicated fields
Some fields are duplicated in the crm.lead for views. Those having
their label manually generated must define a unique id, to be used
by the associated label. That way, all labels are associated with
the correct occurrence of their field.

Part of task 2261697

closes odoo/odoo#53950

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-02 13:57:37 +00:00
Aaron Bohy e17dc1a793 [IMP] web: form: labels of several occurrences of a field
Before this commit, when the same field occurred multiple times in
a form view, all occurrences were associated with the same id, and
all occurrences of the corresponding label (if any) had the same
'for' attribute. As a consequence, besides the fact that there were
warnings in the chrome console, clicking on any occurrence of the
duplicated label focuses the first occurrence of the field.

This commit generates a unique id for each pair label/field, when
possible. However, there is a case that can't be handled
automatically: when the label isn't automatically generated (field
located outside a group, or with nolabel attribute set to "1").
Typically, in this case, there is a <label> node with "for"
attribute referencing the associated field. In this situation, the
id must be defined in the arch, and used in the "for" attribute:

  <form>
    <label for="phone"/><field name="phone"/>
    <label for="phone_2"/><field name="phone" id="phone_2"/>
  </form>

Task 2261697
2020-07-02 13:57:37 +00:00
Mathieu Duckerts-Antoine 25258e314e [FIX] board: display time range descriptions
In saas-13.3, time range descriptions of a reporting view in comparison
mode were not correctly saved when adding the view to the Dashboard app.
This is no more the case (the bug has been corrected with the
introduction of the comparison menu). The present commit simply
consists in the forwart port of two (adatpted) tests of the original
commit.

closes odoo/odoo#54010

X-original-commit: 9f246a7d8f45203f7b0a9111c0ffd381b5e09052
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-03 07:09:41 +00:00
jerome hanke (jhk) f29f7c63ae [FIX] website_mass_mailing: editing the newsletter warning banner in the translation web editor
Steps to reproduce:
- install website, website_mass_mailing
- go to website, edit and add a popup window (you should see warning banner stating
that a newsletter popup is present on this window). Save.
- go to settings > languages > load a new language (fr_FR for example) and translate
the website
- go back to the website > select the new language > click the TRANSLATE button

Previous behavior:
the warning banner is not editable, also click the "Edit popup" button does nothing

Current behavior:
clicking the "Edit popup" button triggers an alert with
a quick explanatory text

opw-2280188

closes odoo/odoo#53988

X-original-commit: af57e4924dbd432f9362881dae71d2a4e4595a1f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-07-02 13:03:31 +00:00
Nicolas Martinelli b93e9780de [FIX] website_slides: slide sorting
Ensure deterministic sorting for slides with the same sequence.

opw-2283154

closes odoo/odoo#54008

X-original-commit: 46bd51dc5f7b674409beac2557cbd19ec001944b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 15:40:32 +00:00
Victor Feyens ad6b5e35f2 [IMP] *: do not translate logs
The logs should all be in the same language, s.t. one does not need to 
understand multiple languages when browsing/reading the server logs.

closes odoo/odoo#53984

Related: odoo/enterprise#11615
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-02 15:12:56 +00:00
Victor Feyens 79a7cf9be5 [IMP] base: remove old checks for deprecated methods
Those checks have been present for 3 to 4 years ([1] & [2]), spanning
over multiple major Odoo versions.

They can be safely removed for V14.

[1] https://github.com/odoo/odoo/commit/100f320217643d61432e6e93b3551f7779c338e8
[2] https://github.com/odoo/odoo/commit/7ede9bcb2de9d52994b3a6fcb84edc3f81d60284
2020-07-02 15:10:56 +00:00
Nasreddin (bon) 4890661a4a [FIX] account: wrong calculation for 'not included in price' group taxes
Issue

	- Install 'Accounting' app
	- Create tax A and tax B for 5%, make sure they are NOT included in price
	- Create a tax C as a group that includes Tax A and B
	- Go to any bank journal and create a statement line for 100 dlls
	- Click Reconcile
	- Select Manual Operations
	- Select any account
	- Add Tax C
	- Check on 'Tax Included in Price'

	Wrong calculation.

Cause

	Not considering forced 'Tax Included in Price'
	('force_price_include'),when cumulating tax included
	amount.

opw-2280714

closes odoo/odoo#54003

X-original-commit: 523e407e164d96ead0ce836e3dc1a6bb8f258af9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-07-02 14:25:39 +00:00
Raphael Collet ee46de8b14 [FIX] test_new_api: make test work in post-install
closes odoo/odoo#54004

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-07-02 13:17:25 +00:00
Nicolas Martinelli 1c3e8d4077 [FIX] point_of_sale: do not block if no COA
In case the COA is imported in the system, the `chart_template_id` of
the company remains empty while the accounting is usable. However, in
this case it's impossible to open a POS session.

We leave the warning in the POS config but avoid blocking the user.

opw-2286640

closes odoo/odoo#53999

X-original-commit: c73b241c5e8c269e1ebc4f517cc270d90b2e44ca
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 14:18:11 +00:00
Nicolas Martinelli 59ea838ecf [FIX] sale: long product description
- Create a product with a very long product description
- Add in a SO and print the quotation

The description overlaps with the table header on the second page.

This is a known issue of wkhtmltopdf (see issues 1770 and 1524 for
example), and there is no known workaround. It can be avoided by
preventing the repetition of the header.

closes odoo/odoo#53990

X-original-commit: f54c73f9a42476e1f0d2de1904644f317ee1dffb
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 13:34:14 +00:00
Andrea Grazioso (agr-odoo) a100c4c336 [FIX] l10n_cl: Correct document type domain
Create an invoice, fill document type
"(61) Nota de Crédito Electrònica". Save.
Action will be blocked by a warning: document type is invalid.

Some options in the document type should not be shown as they can not be
used in the customer invoices and customer credit note.

opw-2286623

closes odoo/odoo#53987

X-original-commit: 3b9738a394c4944b0c859f68f561e50d14b92942
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 13:03:08 +00:00
Antoine Prieels 2761a2a127 [FIX] hw_drivers: Error on distant_display refresh
Trying to call display_refresh or update_url when no screen was
connected to the IoT Box and the default distant_display was created
resulted in an error.

closes odoo/odoo#53975

X-original-commit: 77768b93bc64d47abdbd4abd48c386acb293815e
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-07-02 11:52:36 +00:00
Laurent Smet 2cb73e920b [FIX] account_check_printing: Fix traceback when printing check
'payment_state'='sent' has been replaced by the 'is_move_sent' field.

closes odoo/odoo#53964

X-original-commit: 948be4230650858a9fc08ae22e32ff82bfadfd3e
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-07-02 10:11:45 +00:00
lejeune quentin b9fad2c315 [FIX] point_of_sale: Change build version of IoT Box
Update the version for the new build of IoT Box

closes odoo/odoo#53957

X-original-commit: b75e961c383cfa211508d5e53b6a5a544259719a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-07-02 09:04:38 +00:00
oco-odoo f45131b995 [FIX] l10n_ch: fix tests
closes odoo/odoo#53809

X-original-commit: 157ffe55acd077d7c62007e35c1b145411734a2c
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-29 13:30:19 +00:00
Laurent Smet 350e0ff6e6 [FIX] account: Allow to unreconcile with 'Billing' access rights.
- Make sure to have 'Billing' access rights
- Create an invoice
- Fully paid this invoice
- Try to unreconcile the newly created payment
=> You should have the access rights to do that

closes odoo/odoo#53785

X-original-commit: 5b2f9bac2a430b77637c28f4ee54ae66789ea116
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-29 08:50:20 +00:00
Antoine Prieels 17e198db3a [FIX] hw_drivers: Synchronize time before starting Odoo
Some features need the time to be synchronized before starting:
- A certificate might be considered valid and therefore not renewed if
the time is not synced.
- If the time is not correct when the pairing code is retrieved, it
will disappear as soon as the time is synced because more than 5
minutes will have "passed" since the code was retrieved.

We then make sure that the time is synced, or that the box is not
connected to the internet (because in this case the time will never be
synced and those features cannot work with a connection anyway).

closes odoo/odoo#53953

X-original-commit: b9b02dba67cd0a91b8c49a5f57fb2f7eb4bdd690
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-07-02 08:21:47 +00:00
svs-odoo a86e90af53 [FIX] purchase: readonly on PO line state
As the `purchase.order.line` `state` field is invisible but editable in
the RFQ form, when the user will create a new line, this new line's
state will be save with an empty value instead of taking the RFQ state.

closes odoo/odoo#53952

X-original-commit: bd2172e2a0f2b1e0e4de48f25381677f5ac24820
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-07-02 08:21:23 +00:00
jev 19a504b627 [FIX] product: deterministic seller selection
Before this fix, the search on the supplierinfo had
an undeterministic result.

When testing odoo/addons/purchase_stock/tests/test_reordering_rule.py:66
`def test_procure_not_default_partner`, it may fail at line 120.
It sets 2 suppliers:
- Firstly, the `default_vendor` (let's assume id=120)
- Then, the `secondary_vendor` (let's assume id=121)

It then runs a procurement without setting the supplier and assert
that the partner of the resulting PO line should be `default_vendor`.

The return of
odoo/addons/product/models/product.py:574
`def _prepare_sellers` depends on Postgres when the supplierinfo
sequence, min_qty and price are the same for multiple records.

By adding the `id` to the `.sorted`, the result will order correctly in that
case.

opws-2272627
    -2282081
    -2287079
And PS-BE via CSC reported more cases without opw.

closes odoo/odoo#53951

X-original-commit: a733feb8e022084148685599840fe542ee9dafd1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-02 08:11:07 +00:00
Jorge Pinna Puissant 4b8d716188 [FIX] website_sale: avoid archiving loyalty program products
A product can't be archived if it's used in a pos loyalty program.

opw-2276745

closes odoo/odoo#53948

X-original-commit: 3af9b65638a9725fbeb6597b77328d8f6be5b2ec
Related: odoo/enterprise#11590
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-02 07:52:21 +00:00
Benjamin Vray df50a215f4 [FIX] website: fix preview of header vs table of content navbar in edit
Part of #52708
task-2269822

closes odoo/odoo#53932

X-original-commit: b7800eea785c6aa945947de12fffd83ef35e7a61
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-02 07:47:45 +00:00
Benjamin Vray 745db8c69e [FIX] website: adapt table of content snippet to new color system
Part of #52708
task-2269822

X-original-commit: 6e23649970110f6c08bd8654bc6d1f588579017c
2020-07-02 07:47:41 +00:00
Laurent Smet b30b26de6b [FIX] purchase: Fix "ProgrammingError: can't adapt type 'res.company'"
An id should be passed instead of a record.

closes odoo/odoo#53859

X-original-commit: 061fbd2c1b790d4e87e1f099eb36ab1313fc8ae5
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-30 10:36:04 +00:00
Victor Feyens 07e4b9e02e [IMP] base: better translation of view validation messages
* Use of new _ signature (and placeholders)
* Ensure all error messages are translated
* No translation for warning logs
* Improved/fixed validation messages

closes odoo/odoo#53804

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-02 09:14:33 +00:00
Jorge Pinna Puissant efe51fa56a [FIX] account: negative credit note product qty in invoice report
- Create an invoice with a Product X and Post it;
- Generate a Credit Note from the invoice;
- Reporting > Invoices;
- use Pivot Table View;
- Enable 'Product Quantity' in Measures;
- Filter by 'Invoice #';
- Expand Pivot Table by 'Product'.

Before this commit, the products in the credit note had a positive sign,
contrary to the untax total that has a negative sign. The issue with
this, is when the quantities of the credit notes is added with the
quantities of the invoices the total is not coherent with the actual
sell products.

Now, the product quantity that comes from a credit note has a negative
sign. This was already the behaviour in version 11 and 12.

opw-2283833

closes odoo/odoo#53931

X-original-commit: 917b2076b77ba3f682b342989c41b7f7d0670ca2
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-01 17:24:19 +00:00
Simon Lejeune 058698e104 [FIX] stock: move line: write
Write is overridden on reserved move lines to make sure the quants are
correctly updated. It is divided in two parts: if you update the reserved
quantity and if you update a characteristic. If somehow both are updated
in the same call (which doesn't happen in the standard interface), then
the quants are unreserved two times, which is wrong.

This issue showcased by [0] and on databases where the reserved
quantities are made editable by customization.

We grouped the two update in one, such as the TODO indicated us since a
long, long time.
We removed `result_packaged_id` from the trigger because it should not
impact the reservation whatsoever.
We needed to remove a tricky logic in the stock move's backordering part
but it was fishy anyway.

[0] eac8c06e2233

closes odoo/odoo#53928

X-original-commit: 507101434f9221f2cfa6de66e1952676fff322fd
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-01 16:09:31 +00:00
qdp-odoo 476028c14a [IMP] account, usability: added group_id in the account tree view
as per requested on #52948

closes odoo/odoo#53941

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-07-02 07:00:04 +00:00
Samuel Degueldre 2387699233 [FIX] website_mass_mailing: fix input disappearing when duplicating
Previously, duplicating a block inside of the newsletter popup would
cause the subscribe input and button to disappear. Actually, it
disappears when you use most options of the left panel, because
selecting an option refreshes the public widgets, which destroys them
and starts them again, but for some reason, the subscribe widget's
destroy method makes it d-none, but only removes that class if the
subscribe input is not inside of a modal.

This commit fixes that by not using d-none on the subscribe input group
at all. We keep the d-none removals for databases which may have the
button saved in a disabled state.

task-2244780

closes odoo/odoo#53927

X-original-commit: 5562e7dbf5205c9b3ea0ef2d5283f3ccc5fbc30e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-01 16:09:07 +00:00
Julien Mougenot 9a1e1e6c3b [IMP] doc: added doc for static templates inheritance
closes odoo/odoo#53923

X-original-commit: b22e71097c0382f5153825792c5283380f22a821
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-07-01 15:39:26 +00:00
Mathieu Duckerts-Antoine 913b926b7b [REF] doc: remove link to js API
The page with the documentation on all js docstrings is regularly
broken. We remove here the link referencing it.

closes odoo/odoo#53911

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-01 14:43:30 +00:00
Odoo's Mergebot 429765a3c3 [IMP] *: Uniformize barcode screens UI on mobile
The main goal of this task is to apply the same style used by
event_barcode.
A new button "tap to scan" is now available in some barcode
screens to use the phone camera.

Task ID: 2210396

closes odoo/odoo#50118

Related: odoo/enterprise#9616
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-07-01 13:49:53 +02:00
Romain Estievenart bd09d2acfb [IMP] hr_attendance, barcodes: extract barcode.png to barcodes
It's now possible to use this image in all modules that depend on
barcodes.

Task ID: 2210396
2020-07-01 09:28:45 +00:00
Romain Estievenart ccc243823e [IMP] pos_hr: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode

Task ID: 2210396
2020-07-01 09:28:39 +00:00
Romain Estievenart 80bdbfda62 [IMP] hr_attendance: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode.

Task ID: 2210396
2020-07-01 09:28:37 +00:00
Xavier Morel 3e39dcba52 [REM] sale_crm: long-dead code
odoo/odoo#42015 removed code supporting the sales/CRM dashboards which
hadn't been a thing for two years at that point.

This is doubly dead code as it's an override for the dead code which
has already been removed for a feature which hasn't existed since
2017.

Issue 2285940

closes odoo/odoo#53891

X-original-commit: 1d73a1a7c52fcc3a3ab29446b9ca3b6e4d95b451
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-01 07:02:59 +00:00
Goffin Simon 7fd7422647 [FIX] hr_attendance: All internal can modifiy hr.attendance
Steps to reproduce:

- Let's consider a user U with no access to hr.attendance
- Let's consider that U has made some check in and check out
- Log with U
- Go to your profile and on Last month

Bug:

U can modifiy manually his attendances.

opw:2279682

closes odoo/odoo#53878

X-original-commit: 53a4a95270622f3aa08136470fb627d51ed4b365
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-30 14:24:35 +00:00
Anh Thao Pham (pta) 359202aa18 [FIX] point_of_sale: fix closing with multiple taxes and fiscal position
- Install Accounting, Point of Sale
- Go to Accounting > Configuration > Taxes
- Create 2 taxes (e.g. Tax 15% and Tax 21%)
- Go to Accounting > Configuration > Fiscal Positions
- Create a new Fiscal Postion with the following line for Tax Mapping:
  * Tax on Product: Tax 21%
  * Tax to Apply: Tax 15%
- Go to Point of Sale > Products > Products
- Create a new Product (e.g. Test Product) with "Tax 15%" and "Tax 21%" in Customer Taxes
(Make sure that the Tax 15% is the same than the one for the "Tax to Apply" in the Fiscal Position)
- Go to Point of Sale and configure a POS:
  * Activate "Fiscal Position per Order" and choose the created Fiscal Position
  * Add Bank as Payment Method
- Start a POS session
- Search "Test Product" and add it
- Click on Tax button and select the created Fiscal Position
- Proceed to payment
- Choose Bank and validate
- Exit the POS session
- Click on "CLOSE" and "VALIDATE CLOSING & POST ENTRIES"
An error message appeared with the following message: "Cannot create unbalanced journal entry"

When closing and posting entries, an account move and account move lines are created from the session orders.
For each order lines, taxes are computed from taxes on product and fiscal position of the order.
In this case, the product has 2 taxes applied (Tax 15% and Tax 21%).
Due to the chosen Fiscal Position, the Tax 15% is applied instead of Tax 21%.
For the order line, Tax 15% is applied 2 times.
But during the account move lines generation, the original Tax 15% and the converted Tax 15% are merged together,
because they represent the same tax (same model id).
So the Tax 15% is only applied once, which results on unbalanced amounts during reconciliation.

In Sales, for the same case, the tax is only applied once.
To stay consistent with Sales behavior, the tax will also be applied once in Point of Sale.

opw-2278826

closes odoo/odoo#53880

X-original-commit: 17a9feff69ec772bf3427dda886ae122fd6c7c2c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-30 14:48:05 +00:00
Benjamin Vray 0f2cab4aeb [IMP] website: add a z-index on the header for shadow option
We need a z-index on the header to make the shadow option work properly
We also needed to increase the z-index of the popup snippet so that it
goes above the header when it is displayed.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

closes odoo/odoo#49142

Related: odoo/design-themes#238
Related: odoo/upgrade#1432
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-30 14:19:17 +00:00