Commit Graph
131951 Commits
Author SHA1 Message Date
Samuel Degueldre f615cfda89 [IMP] website, *: rework snippet anchor system
* web_editor

Previously, the user could choose their anchor names using a modal
window, anchor names also have weird rules, this was not a great user
experience.

This commit makes the anchor button generate anchors automatically based
on the first title in a section, or the snippet name if there are none.
If the anchor name is already taken, it is suffixed by a number. After
it has been generated, it is also copied to the clipboard and the user
is shown a toast to tell them the anchor has been generated and copied.
The anchor is displayed in the toast along with an edit button that will
open the same edition modal as previously, but it is now less
restrictive.

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2088270
2019-11-18 09:56:08 +00:00
qsm-odoo bf5b4b6933 [IMP] website, *: introduce inputs in the left panel UI
* web_editor, website_sale

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo c47527b794 [IMP] web_editor: allow options to add UI in the overlay top bar
-> move the move buttons next to the drag button

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
Samuel Degueldre 7623f3ecf7 [IMP] website: add quick move buttons for sections and columns
This commit adds buttons to move sections up or down and to move columns
left or right, which is more user-friendly than drag-and-drop in some
cases.

Part of https://github.com/odoo/odoo/pull/38959
maintask-2066614
task-2088265
2019-11-18 09:56:08 +00:00
qsm-odoo c213afab86 [IMP] web_editor, *: review 'background' options' UI
* website

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo 72a2f417ae [IMP] web_editor, *: introduce select & checkboxes for the left panel UI
* website, website_blog, website_form, website_sale

+ introduce default UI for snippet options
+ refactor style of icon buttons

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo ed8133c72f [IMP] web_editor, *: allow snippet options next to clone/delete buttons
* website

Now snippet options can be defined as a button which can be placed next
to the clone and delete buttons, through a new "isTopOption" method.

This commit also review the buttons and title design and take advantage
of the feature to review the way snippets options are added in their
container (that code indeed contained useless part since 13.0).

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo c611d92191 [REF] website, *: remove useless palette title option
Not relevant anymore in the new editor UI.

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:08 +00:00
qsm-odoo d9bbdf15ad [REF] website, *: remove all snippet options UI icons
* web_editor, website_blog, mass_mailing

In preparation of the new left panel UI, remove all snippet options UI
icons as we do not want them anymore to simplify the UI.

Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:07 +00:00
qsm-odoo 0cbc188a71 [FIX] web_editor: prevent focus change on recording undos
Part of https://github.com/odoo/odoo/pull/38959
task-2066614
2019-11-18 09:56:07 +00:00
Katherine Zaoral 466203311e [FIX] l10n_latam_invoice_document: manual taxes widget
Before this change the manual taxes widget in the invoice form view was
broken for Argentinian invoices, with this change now the widget is
working.

It was broke because this method is used for the report/portal and
manual taxes in widget in the form view, and for Argentinian case
report/portal invoice should not discriminate some of the taxes depending og
the responsibility of the customer/issuer and the type of document
(example: Factura A, Factura B).

Also update the method in order to match the original one in odoo
account module and add missing group_id

closes odoo/odoo#40400

X-original-commit: 6260da7604b2a831668be42bf8745c53a09e8d16
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-18 09:40:26 +00:00
Andrea Grazioso (agr-odoo) 9daed92a6d [FIX] web: translate popup broken
Install accounting and activate a new language. Under
Accounting>Settings>Terms and Conditions input something, save and then
click on the near lanuage button.

A popup will appear with only the possibility to close and save but with
no text.

This is because no row is fetched from the ir.translation table, because
the domain for the search is

```
['&',
    ['res_id', '=', None],
    ['name', '=like', 'res.config.settings,%'],
    ['name', '=', 'undefined']
]
```

* wrong res.id "None" instead of the correct one (1)
* wrong name pointing to somewhat related to 'res.config.settings'
(the field name is "res.company,invoice_terms")
* another wrong condition on name equal "undefined"

The domain is malformed because in
addons/web/static/src/js/views/basic/basic_controller.js
record.res_id is unset while record.res_ids is it. Rewriting res_id to
make sure the id is there fix the issue

Thanks to mart-e

opw-2091779

closes odoo/odoo#40394

X-original-commit: 20e84558de476c17fed73f7ea5a11989401bffaf
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-18 07:58:38 +00:00
Katherine Zaoral 91f503cd99 [FIX] l10n_ar: Fix ImportError: No module named 'stdnum.ar.cbu'
Since stdnum.ar.cbu is not available in odoo saas enviroment because is
using an old version of stdnum package, we add a try exept in order to
catch this and manage the error properly which is raise an exception and
leave a message in the log telling the user that the cbu was not able to
validate.

closes odoo/odoo#40383

X-original-commit: 25d483fc3fc05fd47c72c3d96c02fed12b998b0d
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-15 21:15:01 +00:00
Nicolas Martinelli c0e5f821ce [FIX] product: fixed price in pricelist
Create a pricelist item with a fixed price, e.g. 10.20. The amount is
displayed as 10.200....01.

To avoid this, we format the float correctly.

opw-2122622

closes odoo/odoo#40391

X-original-commit: 1edcab8c8caabeb5ebfec4bc6fcba1b5506f73ca
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-18 07:17:09 +00:00
Nicolas Martinelli 9d6cc44f98 [FIX] l10n_eu_service: default tax
The field `account_id` has been removed from the tax, it is not on the
repartition line.

opw-2121720

closes odoo/odoo#40370

X-original-commit: 537dd88aced8b181f921e0daa0bf146fee9366cb
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-15 16:43:23 +00:00
Nicolas Martinelli 92aeaa47ff [FIX] mrp: date expected and date deadline
- Create Product A:
  Routes: MTO and Manufacture
  Manufacturing Lead Time: 20 days
- Create Product B:
  Routes: MTO and Buy
  Add a supplier with Delivery Lead Time: 10 days
- Create a BOM: 1 unit of B to produce 1 unit of A
- Create a SO for A, validate

A MO is created with a Deadline set at SO order date - 20 days => OK
A PO is created with order date set at SO order date - 10 days => Not
OK, it should be - 30 days.

In v13, the raw materials expected date is the order date.
In v12, this date is computed as: order date minus Manufacturing Lead
Time

However, in both versions the PO order date is computed as the raw
materials expected date minus Delivery Lead Time of the supplier.

This comes from a change in the semantic of 'Planned Date' and 'Planned
End Date'. In v13, the Manufacturing Lead Time is only taken into
account in the Deadline, while in v12 it was taken into account in the
Planned Date. However, the expected date of the raw materials still
relies on the latter, not on the Deadline.

In order to solve this, we apply the 'Manufacturing Lead Time' of the
product and the company to 'Planned Date', 'Planned End Date' and
'Deadline' when the MO is created. Note that the solution is still not
ideal in case no routing is set on the BOM since 'Planned Date' and
'Planned End Date' won't be updated later in the process.

opw-2118951

closes odoo/odoo#40360

X-original-commit: b523f991572e32e69c5f8000a21553191ca54773
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-15 15:21:51 +00:00
oco-odoo a449e2ccf6 [FIX] account: tax report: remove tags from aml when needing to delete them because of tag_name removal
Before that, when trying setting to None the tag_name of a tax report line whose tags were referenced by some move lines, a exception was raised, telling that some account.move.line objects still referenced an account.tag we were trying to delete. Removing the tags from db was legit (since we're removing the tag_name, we need to remove the tags that it generated), but first needed to remove all these tags from the account move lines linked to them.

closes odoo/odoo#40375

X-original-commit: 3eb5a3e947bb371f90c9f2357ff410816419bbb0
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-11-15 17:52:58 +00:00
Raphael Collet 83a0c46dbb [FIX] registry: init_models() using a closed cursor
When a call to init_models() fails, the post-init queue still contains
callables that refer to a soon-to-be-closed cursor.  If one calls
init_models() in another request, the post-init process will inevitably
fail because it refers to closed cursors.

closes odoo/odoo#40379

X-original-commit: 33f87ffebaa1cb38e3ce8ce44c8b8b538b49e5b9
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-11-15 18:46:13 +00:00
qsm-odoo d57e0cb1e7 [FIX] web_editor: remove destroyed editors from memory
Commit https://github.com/odoo/odoo/commit/f6bbc40fbe16ea5ab01ad03b8e1519c4e559bf6d
introduced a method to destroy all current editors to refresh them when
necessary... but forgot to empty the array that contains them.

In a 12.0 without custo, this is only slowing down the editor but in
master (or with custo) this makes the editor crash.

closes odoo/odoo#40372

X-original-commit: 2b5661937d9772b98c73f9f64aa419fec7676052
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-15 17:10:56 +00:00
Victor Feyens bddf5a6747 [FIX] stock: inventory adjustments list view
The company_id field is present twice in the view.

Fixes #40328

closes odoo/odoo#40353

X-original-commit: 8d5b25417eb890aed56c9f1365100aa061b9bd8c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-11-15 14:40:00 +00:00
Jorge Pinna Puissant 06537390a9 [FIX] account: remove label on invoices if the tax is in a group
- Create a tax of type "Fixed".
- Put some name in its 'Label on Invoices' field.
- Change the type to "group of taxes".
The view hides the field Label on Invoices, since it doesn't make sense
any more. However, it doesn't actually remove the label on invoices.
As a result in the taxes list you can still see the old label on invoice
information, this behaviour misleading.

We modify an existing onchange to avoid that unfortunate situation.

opw-2115984

closes odoo/odoo#40346

X-original-commit: 1aea26c72d451e13754e911a6bb74fff0e2578df
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-11-15 13:53:02 +00:00
Nicolas Lempereur dfc92c66a6 [FIX] web: week view ok if week start not sunday/monday
Currently, if the first week day was Saturday the calendar week view
would possibly get the wrong week.

This is because current heuristic would get date of current week from 6
(Saturday) to 12 (Sunday).

Thus if we were:

- on Friday 14th, we would have a week day ranges: 15-21 (wrong)
- on Saturday 15th, we would have a week day ranges: 15-21 (ok)
- on Sunday 16th, we would have a week day ranges: 22-28 (wrong)

So it would only get the right range when getting range from saturday.

If a week:

- start on monday, the week range would only be wrong on sunday.
- start on sunday, the week range would always be alright.

Added test without the fix fail:

- CalendarView: Saturday week start week mode
  The domain to search events in should be correct
  (domain range 14-20 instead of correct 07-13 whilst the day was 12th)

- CalendarView: Monday week start week mode
  The domain to search events in should be correct
  (domain range 16-22 instead of correct 09-15 whilst the day was 15th)

opw-2091448
closes #40244

closes odoo/odoo#40327

X-original-commit: 6c3d74846581d6c1bfc0c6e3a7104440515ddbc5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-15 11:11:49 +00:00
Adrien Horgnies abc80eff18 [FIX] l10n_lu: make 142000 Current Year Earnings and remove 999999
closes odoo/odoo#40330

X-original-commit: 397af6fe04ac7e3c6b6dde4a27eef315ff4fb2bb
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-15 11:57:30 +00:00
Samuel Degueldre 17d6ea235a [FIX] web_editor, *: fix crash when saving cropped image
*: point_of_sale

In c212cfe899 the field 'datas_fname' was
removed as it was mostly almost always a duplicate of the name or url
field. Two uses of this field were not removed in the rest of the code,
one in web_editor which caused a crash when trying to save a cropped
image. There was also one in pos_order, which I changed at the same
time, even though it isn't known to cause a bug yet, the create call is
bound to fail if it is ever triggered.

closes odoo/odoo#40329

X-original-commit: 7088d11b7f2de7ffaa5b7045b562784f7176f75d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-15 11:57:13 +00:00
Julien Castiaux a9ddc5a50e [FIX] snailmail_account: use HttpCase to contact pingen
Pingen is a service that print (like really, using a printer) pdfs
document in order to mail them (using the real post and postmen). In
order to ensure we are compatible with their API, we send to their
sandbox environment a bunch of standard documents (like an invoice).

Those PDFs documents are generated our side using wkhtmltopdf but as the
test were not started using a HttpCase, the assets were not correctly
available.

This also reverts commit 3f5a0a1ef4.

closes odoo/odoo#40323

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-15 10:45:00 +00:00
fw-bot c5570c4e7d [FIX] calendar: fix wrong date for recurring event emails
Reproduce this bug

    - Install Calendar
    - Create a recurring event starting at the date of yesterday
      (later than your actual time)
    - Set the recurrency to every day, 1 time (today)
    - Click on the today's event
    - Add attendees > Invitations > Send mail
    - Run the mail queue manually (Technical > Scheduled actions)

    The mail you sent are for the date of yesterday
    The behavior is the same for the reminders

Cause

    The mail are sent with the `_send_mail_to_attendees` method
    who pass the attendee_id to the templates.

    The `attendee_id.event_id` is always the first one.

This commit pass the correct event to the template via the context.
I replaced only the dates values in the template.

closes odoo/odoo#40320

X-original-commit: 1926c6cfea0e21842fbd71fd85629b13fce9b413
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-11-15 10:30:01 +00:00
Nans Lefebvre bf87b4a758 [FIX] website_sale_coupon: correctly update free shipping on cart
Promotion programs can be added in 3 ways, no_code_promo_program_ids,
code_promo_program_id, and through applied_coupon_ids.
So free delivery obtained by the two latter would not correctly update
the cart page, because the result of _get_free_shipping_lines would be
empty.

closes odoo/odoo#40317

Forward-port-of: https://github.com/odoo/enterprise/pull/6663
X-original-commit: bfde75dd72d1e529bfb93d2b83b22b8c2f0fcea1
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-11-15 10:12:07 +00:00
Ravi Gohil 00521bc998 [IMP] l10n_lu: improved 'Tag Name' of Tax Report's lines
- show only code in 'Tag Name' instead of showing whole
tax report line's string
- also, assigned missing tags to few report lines

closes odoo/odoo#40159

Task: 1917932
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-15 09:37:29 +00:00
Ipsita Borisagar 45f1d6367c [IMP] sale_timesheet: added testcase for project overview.
Purpose of the task is to add python tests to check the values
returned by '_qweb_prepare_qcontext' method

Task-2084995

closes odoo/odoo#39299

Closes: #39299
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-13 12:05:26 +00:00
Gert Pellin ca57ecf446 [FIX] point_of_sale: fix order naming translations
Before this fix translations of the order names missed a crusial space
that is needed to get information out of it in the front-end.

* Load Spanish-PE translation.
* Change localization preference for a user (either admin or demo) to
Spanish.
* Login to Odoo POS using the user with spanish localization.
* Go to POS, select BAR POS, select a table and place a draft order
with at least 1 order line (do not proceed to payment)
* Go back to table mgmt view and click again to the previous selected
table and the error appears.

This issue happens in any translation where pos_reference for a draft
order is not separated with white space as it happens in English. I mean
in english the pos_reference is something like "Order 00003-001-0002"
but in spanish it is "Pedido00003-001-0002" (no whitespace), so
https://github.com/odoo/odoo/blob/13.0/addons/pos_restaurant/models/pos_order.py#L143
assumes that there will always be a whitespace which is not true for
some odoo translations like spanish one.

This fix adds a variable to the translation string making it more clear
the space is part of the string. To make sure the code will also work on
languages with the words in another order `order['pos_reference'].split(' ')[1]`
is replaced by `search(r"\d{5}-\d{3}-\d{4}", order['pos_reference']).group(0)`,
we know the uid will always be formatted as nnnnn-nnn-nnnn

solves #40036

closes odoo/odoo#40302

X-original-commit: c32126da5ac55a03637d82cf520b8655be8546e6
Signed-off-by: Gert Pellin - GPE <switch87@users.noreply.github.com>
2019-11-14 18:11:55 +00:00
David Arnold 3214dd56f1 [FIX] base: specify VAT label for Colombia
Closes odoo/odoo#29548

closes odoo/odoo#40299

X-original-commit: 7bf96818aa94020d12032cff24c03a36c46a78f1
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-14 17:15:58 +00:00
Joseph Caburnay 5a4f453ad7 [FIX] point_of_sale: json is undefined. use options.json instead
closes odoo/odoo#40279

X-original-commit: 3e9c386ba6d547758da9aec7a8dfff05fac46916
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-14 14:24:05 +00:00
Jorge Pinna PuissantandNicolas Lempereur aefae068a6 [FIX] web: hours in event detail
In a view month of calendar, when seen the details of a non-all day
event.

Before this commit, the end hour was always 00h00m.
Now, the end hour is the encoded one.

opw-2093111

closes odoo/odoo#40287

X-original-commit: 92fe5f11c16ee6749c4b0834ec12e5e858b1748d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2019-11-14 15:09:13 +00:00
Jorge Pinna PuissantandNicolas Lempereur a5702a1ff1 [FIX] web: moving non-all day events
In a view month of calendar, when moving a non-all day event from a date
A to a date B.

Before this commit, the event will be changed to an all day event type.

Now, the event will be staid unchanged, only the date will be updated.

opw-2093111

X-original-commit: df001af5341bf35f36fe455d69bbb46f4b0fa00c
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2019-11-14 15:09:12 +00:00
Raphael Collet 03e44375fe [FIX] registry: dependencies of custom fields may not exist
Ignore exceptions when resolving dependencies in that case.
This reimplements a behavior from former versions.

closes odoo/odoo#40300

X-original-commit: 826c86e9ab31963e410887a30326f45bcfadf5ea
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-11-14 17:16:17 +00:00
lejeune quentin 52d4ada230 [IMP] point_of_sale: Add support of RPI 4
With this PR we can use the IoT Box with the new Raspberry Pi 4 B
using raspbian 'Buster'

With buster we remove the kiosk mode of firefox and
replace this mode with a fullscreen view of firefox.
To do that we adapt DisplayDriver to expend window with a 'call_xdotool(F11)'

We remove postgresql and patch 'odoo/odoo/http.py' for he does not return a DB.

Task id: 2089286

closes odoo/odoo#40292

X-original-commit: d20676b69f37905c7994b3c55cb1bb6dfda3460e
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-11-14 15:59:36 +00:00
Christophe Monniez de652abc5f [FIX] requirements: avoid double requirements for pillow
When installing requirements on MS Windows platform with Python 3.8, the
Pillow requirement is defined two times. This leads to a pip crash.

With this commit, the Pillow requirement is only defined once.

Fixes #40080

closes odoo/odoo#40272

X-original-commit: cce9660c2969cc2715ff29b6dfa12e1b726bce25
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-11-14 13:45:22 +00:00
Martin Trigaux 8493d17556 [FIX] account: do not use optional library
stdnum is not a mandatory dependency
It is often present as required to install the base_vat module but
having a system with account without the dependency should be
possible.

As the calc_check_digits is pretty small, it is easy to extract

Forward port of 6091be6556d to 13.0

closes odoo/odoo#40265

X-original-commit: ef245e14730e5c4858b81adfbe7e309631688663
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-14 12:57:37 +00:00
Martin Trigaux c2ba5ef3de [FIX] web: avoid domains with empty list
After loading the calendar view, making a search with an inactive
domain in the list will trigger a search "partner_ids not in []" which
returns zero result.
The code intention was to initialise the avoidValues, not to send an
empty list.

To reproduce the issue:
1. create an event shared between user 1 and 2
2. as user 2, open the Calendar menu
-> shared event is present
3. click on "week" tab (forcing a refresh)
-> shared event no longer appears

Fixes odoo/odoo#39839

closes odoo/odoo#40264

X-original-commit: 299a6dbcb53e583b177079116ada63a1255d1cfa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-14 12:57:16 +00:00
Victor Feyens 4e3e268083 [FIX] website_slides: default values for all compute fields.
closes odoo/odoo#40263

X-original-commit: 2cab75b41763fed0b86d919e005d9a65cd3b85ac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-14 12:56:57 +00:00
Jorge Pinna PuissantandRaphaël Collet 578deee45d [FIX] fields: check if the inverse must change
Before this commit, when modifying a Many2one in a form view to add a
new record,  it will create the new record, and calculate the inverse
and write it in all the records of the list. This will call the write
method in all records even if they weren't changed.

Now, the inverse is set to be modified only if it's different from the
current value.

opw-2091842

closes odoo/odoo#40258

X-original-commit: 417cee7f0fdb7ed7eb424178efb656b967fa0a5e
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Raphaël Collet <rco@odoo.com>
2019-11-14 12:13:06 +00:00
Odoo's Mergebot 7352f0dea6 [MERGE] base/mail: fix multiple issues in email address handling after #35929
[FIX] tools: correctly format emails when having an encoding issue
[IMP] tools: restore P2 formataddr default behavior
[FIX] ir.mail.server: squash redundant CRs (bpo-34424)

closes odoo/odoo#39516

Task: 2003936
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-11-14 15:14:12 +01:00
Julien Castiaux 7bf2dd4339 [FIX] ir.mail.server: squash redundant CRs (bpo-34424)
Problem description:
Using the chatter, send an email to someone having non-ascii characters
in their name: the body of the received email looks like it contains
a mix of the original body and headers.

Python encodes the name into either base64 or quoted-printable but
leaves some redundant carriage returns at the end of the header. Those
redundant carriage returns are not RFC conformant but are interpreted
as newlines by some email clients, thus are read like a headers/body
separator and the next headers are considered part of the body,
corrupting the email structure.

This problem is internal to Python and has been fixed in 3.8, cfr
bpo-34424 [1], and later backported to 3.7.4. As we also support 3.6
and earlier 3.7 and it is not possible to easily monkey-patch the
function, we fixed it by squashing duplicate carriage returns.
(There is no case where a series of bare CRs can occur in a normal
RFC5322 email message)

Task: 2003936

[1]: https://bugs.python.org/issue34424
2019-11-14 12:29:36 +00:00
Simon Lejeune 29d8fc091a [FIX] stock: picking: immediate and state
Issue: create an immediate transfer, add a move and a done quantity, the
picking is in waiting state instead of ready.

Due to rev[0], the moves added in an immediate transfer have an initial
demand. After auto-confirming them, their state were 'confirmed' and not
'assigned'.

Solution: we force the state to assigned

[0] 8303b1a69e

closes odoo/odoo#39492

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-11-13 15:40:40 +00:00
Simon Lejeune 4d653af6e9 [REF] stock: planned transfer: additional moves
Before this patch, move added in a planned transfer once it is ready are
directly marked as assigned and the reservation is disabled on them.

People found it hard to understand why the check availability button did
not appear, plus the push rules were not applied.

Now we chose to use the autoconfirm mechanism on the added move and we
don't reserve them, so the check availability button reappear.

task-2081844
2019-11-13 15:40:40 +00:00
Martin Trigaux 314e3eed7a [FIX] point_of_sale: properly translate error message
Do not insert variable inside a translated message, it will not be
translated.

Fixes odoo/odoo#40178

closes odoo/odoo#40255

X-original-commit: 4b7782e8f259480550d10479f43c95441306e48e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-14 11:29:02 +00:00
qsm-odoo abb3fabd7e [FIX] website: restore blog & event cover properties options editing
Changing the filter color and its intensity was not working anymore
because of failed JS refactoring when the logic was shared for both
blog posts and events in website.

closes odoo/odoo#40227

X-original-commit: 3296468beded14d4ef52d221ef8683941f12291c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-13 17:46:10 +00:00
Yannick Tivisse 3f5a0a1ef4 [FIX] snailmail_account: Make the external test work
Somehow, the fact that this test has been converted (partially)
to a SavepointCase makes the assets to be rollbacked after generation.

Notify the registry to be in "test" mode, where one cursor serves several
requests, solves the issue (no 404 when getting the assets, and no
registry reloading).

closes odoo/odoo#40243

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-14 08:58:24 +00:00
Julien Castiaux 7b65a63c97 [IMP] tools: restore P2 formataddr default behavior
Python 2 `email.tools.formataddr` doesn't encode not RFC-2822 compliant
realname to base64 or quoted-printable. This is the wanted behavior to
output formatted email addresses on screen.

Python 3 `email.tools.formataddr` does encode the realname to be
RFC-2822 compliant. This is the wanted behavior when connecting to a
smtp server to send emails.

That method has been deprecated by pep-594 as the new python email API
is capable of automatically formatting email address in a RFC compliant
way. As the method was still in use in a lot of modules as the
preferred way to format email addresses, a refined P3-like
implementation as been included in the tool suite.

This commit changes the default behavior so it mimics P2 implementation
with an easy way to use the P3 behavior.

Task: 2003936
2019-11-12 13:48:40 +00:00
Thibault Delavallée f0ae04ab3d [FIX] tools: correctly format emails when having an encoding issue
It seems the emails &gt; &lt; are missing.

By the way one manual formataddr is replaced by an email_formatted field.
Result is the same but let us use fields doing it for us.
2019-11-12 13:48:39 +00:00