Commit Graph
139528 Commits
Author SHA1 Message Date
William Henrotin ccdd74bfa3 [FIX] test_main_flows: use input tag
In some cases, the edit mode on the production form view is not already
rendered when hte tour try to write '1' in the qty_producing field. This
lead to a fail of the Main Flow Tour.

This commit specifically trigger the input tag to be sure the text will
be inserted in edit mode.

closes odoo/odoo#61541

X-original-commit: 426a4306c911de2a47bd804dde0d67aa19a22b67
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-11-09 13:44:43 +00:00
Raphael Collet c2150d9117 [FIX] core: use 'x_name' as _rec_name only on custom models
This fixes a very obscure bug that happens on workers serving multiple
databases.  Consider two databases A and B with the same model M, that
does not have a field 'name', but has a custom field 'x_name' only on
database A.  The bug can be reproduced with the module 'account' and its
model 'account.register.payments'.

Assume the server loads a registry for database A.  In that registry,
the model M uses 'x_name' as its _rec_name, and the field 'display_name'
on model M determines its dependencies to be the field 'x_name'.

Now assume the server load a registry for database B.  In that registry,
the model M has no _rec_name.  However, an optimization reuses the field
'display_name' for the model M on the registry of A.  The field's
attribute 'depends' is equal to the tuple ('x_name',).  When the ORM
tries to resolve the field's dependencies, it does not find the field
'x_name' on M and crashes.

In order to avoid this situation, we forbid the usage of 'x_name' as
_rec_name on non-custom models.

OPW 2349238

closes odoo/odoo#61534

X-original-commit: 731e676fa8a9f7bdc6a66056c124c3b39a0800ad
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-09 12:39:19 +00:00
Sébastien Theys dd7241c890 [FIX] mail: remove regex from mentions
That should fix all detection issues once and for all.

task-2366680

closes odoo/odoo#61528

X-original-commit: cf6961fba38ed619bf7bfb908c3aadde0f694648
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-09 10:49:34 +00:00
Didier (did) 4995c6b76e [IMP] mail: add test for channel mention and channel link
task-2366680
PR https://github.com/odoo/odoo/pull/60593

X-original-commit: 46be4866adacafdd147c799d1cc91e27a88a99d0
2020-11-09 10:49:34 +00:00
Didier (did) 4b8ea4d84d [FIX] mail: wrap to new line spaces to avoid bad mention detection
X-original-commit: dc15021752ec83d4f36127b1bf75bece1074757d
2020-11-09 10:49:33 +00:00
Didier (did) 3b48fe700f [FIX] mail: escape the mentionned channels before matching them
Escaping the match name is escaping an already escaped string from
`postMessage`. How ever we need to escape the string from
`this.mentionedPartners` and `this.mentionedChannels` since they are matched
with an escaped string.
This fix the bug when mentionning a channel with `&` in it's name.

task-2366680
PR https://github.com/odoo/odoo/pull/60593

X-original-commit: fecd2b28309b0fa4e5ecb8c7d26f6a335036e740
2020-11-09 10:49:32 +00:00
Didier (did) a3c26a1498 [FIX] mail: detect space inside channel name
task-2366680
PR https://github.com/odoo/odoo/pull/60593

X-original-commit: bbfaf1f805c90f1c9bf87e6a06481ecc88bc24b9
2020-11-09 10:49:31 +00:00
Antoine Guenet 4e252d02f8 [FIX] web_editor: properly mock createWysiwygIntance (sic) in tests
closes odoo/odoo#61525

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-09 10:18:42 +00:00
Nicolas Martinelli 63d5102a2e [FIX] sale_mrp: display of the forecast widget
Hide the forecast widget in case of kits. Indeed:
- the forecast report doesn't support kits
- the semantic for a kit forecast is far from being obvious, especially
  in case of partial deliveries, returns, returns of returns, etc.

Better hide it than displaying an incorrect information.

closes odoo/odoo#61522

X-original-commit: c1fccaee5dd676f2fe07bb5c17eb2967ee6b742e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-09 10:01:37 +00:00
Nicolas Martinelli 682650a57e [FIX] mrp: make _bom_find return type consistent
MAke sure the `_bom_find` meothd always return a `mrp.bom` recordset.

X-original-commit: adc6af4aeba7fb5ef43c30714d73e4b9401dc536
2020-11-09 10:01:36 +00:00
mir-odoo e9638fd3ae [IMP] crm,purchase: Improve the reporting menu
Pupose of the task is, to set up a dedicated 'dashboard' reporting menu
item, and make the graph view the default the other 'leads' and
'opportunities' reporting menus.

So in this commit, change the default view graph in normal report
(except dashbaord menu) and each menu should be submenu of reporting
menu Also apply default filter for lead reporting menu

TaskID: 2311392
Related Enterprise: https://github.com/odoo/enterprise/pull/12419

closes odoo/odoo#55598

Closes: #55598
Related: odoo/enterprise#12419
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-05 11:00:27 +00:00
Joren Van Onder fc0754f569 [FIX] payment_authorize: support references longer than 20 characters
We can have payment.transaction references of >20 characters. This
happens automatically if you have long sale.{order,subscription}
sequences (especially through website_payment because it adds multiple
suffixes, e.g. SO2020/1234567 could turn into
SO2020/1234567-12-1-1-1). We POST the full reference via the
x_invoice_num variable. Unfortunately Authorize specifies a maximum
length of 20 for this field [1]. So when Authorize POSTs back to
/payment/authorize/return it only specifies the first 20 characters in
x_invoice_num. E.g. when POSTing

{
...
'x_invoice_num': 'SO2020/1234567-12-1-1-1',
...
}

we receive back in /payment/authorize/return:

{
...
'x_invoice_num': 'SO2020/1234567-12-1-',
...
}

This causes _authorize_form_get_tx_from_data() to not find the
transaction which results in a ValidationError.

To fix this also pass the reference in the x_description field. It has
a more generous 255 character limit [1]. Then search using both.

We can't get rid of x_invoice_num entirely because we cannot assume
the payment_authorize.authorize_form will be updated (even more so
because it's a noupdate="1" template). By still using it in
_authorize_form_get_tx_from_data() we ensure that everything keeps
working regardless of whether or not x_description is included in the
template.

[1] p39 in https://www.authorize.net/content/dam/anet-redesign/documents/AIM_guide.pdf

opw-2373433

closes odoo/odoo#61449

X-original-commit: 3a220d3ad2999a21d54924940574ba96a9c07154
Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-05 18:40:04 +00:00
Nicolas Martinelli 5c57644ead [FIX] account: cash rounding precision
A cash rounding precision must be strictly larger than zero to follow
the restriction introduced in e270e9e0cc.

opw-2341804

closes odoo/odoo#61382

X-original-commit: 563752358d233d4fc9cf1d7e7abd0b1656dc82c1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-09 08:53:46 +00:00
Nicolas Galler bfdb071933 [IMP] web: extract logic to update debug manager action
Small refactoring to allow calling the method to update the debug
manager action independently from `current_action_updated`.  Needed for
3d80ff9998dd402ac48d280e5d6b81aaf91b6180.

opw-2365539

closes odoo/odoo#61491

X-original-commit: c4e1cfc527cf65fdad201b77e54bf7027b8dd6c2
Related: odoo/enterprise#14639
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-06 16:15:13 +00:00
Nicolas Martinelli 57d76c8539 [FIX] account: extract fpos recomputation logic from onchange
We extract the `price_unit` and `tax_ids` recomputation logic from the
`_onchange_product_id` method. This way, it can be called
programmatically.

opw-2371934

closes odoo/odoo#61477

X-original-commit: ca6f25bef45137c032bc5cafd336c3f16a97a929
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-06 13:01:54 +00:00
Nicolas Galler 53a1821d3d [FIX] mail: don't refresh dirty record on message post
Behavior prior to this commit:

When editing a lead, if we log a note, it will refresh the record and
cause the changes to be lost.  In version 13, it would only refresh the
record if `@` mentions were added.

Behavior after this commit:

The record will only refresh if it is not dirty.

Note:

It is not clear why the record would in fact ever need to refresh
as there is no visible change on the lead form when a note is logged,
whether or not followers are added (the message thread, which shows the
number of followers, refreshes regardless).  In this commit I chose the
approach which would cause the least change.  There is still a need for
a longer term solution to orchestrate the refreshes, which will take
place once the rest of the web application is converted to use Owl.

opw-2369162

closes odoo/odoo#61503

X-original-commit: 6d7058679869ba03e164993687c21b0bae12822d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-11-06 17:48:19 +00:00
Andrea Grazioso (agr-odoo) a646326ea0 [FIX] account: fix reconciliation and inalterable hash
Create and post an invoice ('Lock Posted Entries with Hash' on the
journal)
Edit also Bank journal enabling 'Lock Posted Entries with Hash'
Create and post a corresponding bank statement:
- same setting on the journal
- same partner on the line
Reconcile

Action will be blocked because the system try to
rewrite the partner on the posted line which is locked.

For Bank/Cash journals should not be visible the lock setting.

opw-2367688

closes odoo/odoo#61284

X-original-commit: d7f92cabb4bb12fe40356c9764c8e3e7c75e4f37
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-03 15:29:48 +00:00
wan 084690edc9 [FIX] account: deduce sequence reset
The order to find when to reset the sequence needs to be the following:
* find a sequence used before the date of this move
* if there isn't any, find the sequence of any move

Because we were not looking at the second step for bank statements, we
could have an issue since we were not checking the sequence relative to
the correct date.

closes odoo/odoo#61495

X-original-commit: b863b9cfedb3e7b4d1e3d409c829ffa0bfa1d9bb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-06 16:57:41 +00:00
Florent de Labarre 71fc68b851 [IMP] base : display bank in bank account
When you make a payment, if a supplier have multi bank account, the bank name is not show in the selection. With the bank name it is more simple to find the good bank account.

closes odoo/odoo#51930

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-11-06 16:35:53 +00:00
Arnold Moyaux b2017fd366 [FIX] stock: apply push rule after transparent rule
Usecase to reproduce:
- Rule from WH/A -> WH/B as automatique no step added
- Rule from WH/B -> WH/C as transfer created

Do a move that goes to WH/A and confirm it. It's destination location
is correctly set to WH/B but the internal transfer from WH/B to WH/C
is not created.

It's due to the avoid loop location that returns always true due to
code removed in commit 1d36fb428f

closes odoo/odoo#61488

X-original-commit: b2a07e4d08beff360ac1e6c95d240a15b1081855
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-06 15:14:53 +00:00
Benjamin Vray bd6749e750 [FIX] web_editor: allow single quotes in getShapeData
Before this commit, the value of data-oe-shape-data required double
quotes to be properly parsed in JSON in the getShapeData method.

After this commit, we also allow single quotes to prevent issue if
someone doesn't use double quotes in the the value of
data-oe-shape-data. Which was precisely the case in one of the themes
and this is why this commit is a fix.

task-2327741

closes odoo/odoo#61487

X-original-commit: 10ac750aaecf502500dc08966f4642a8604a685b
Related: odoo/design-themes#423
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-06 15:14:17 +00:00
Benjamin Vray 075e915431 [FIX] website: add a margin bottom on snippet buttons
Add a margin bottom on snippet buttons. So when there are 2 buttons (or
more) on the same line, we have a space between them on small devices
when displayed vertically.

task-2327741

closes odoo/odoo#61484

X-original-commit: 9db7b9bdbd86405fdfe2c0efccebea780b7ffb63
Related: odoo/design-themes#422
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-06 14:28:32 +00:00
Achraf (abz) 5ea2922800 [FIX] mail: Send mail with correct access link
Issue

    - Install "Approvals"
    - Submit new approval with you as "Request Owner"
    - Click on "View Approval Request" in your mailbox

    The link redirects to a 505 error

Cause

    The model is not the correct one and the res_id is undefined

Solution

    Specify the model and the res_id to _notify_get_action_link
    when creating the link with kwargs

opw-2358846

closes odoo/odoo#61478

X-original-commit: 075325226d6f7c2af638013f25613ddd391e506b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-11-06 13:02:18 +00:00
Antoine Guenet 1547ea1985 [IMP] note: restyle note without sheet or resizer
This change of style is a special request from FP: full width, full
height, no <sheet>, no resizer.
I did end up using a <sheet> and restyling it specially for note because
the styles that allow us to have the note next to chatter is too
intricately linked to the style of the sheet in form view to make it
safe to remove the sheet. Indeed, fully removing the sheet implied
duplicating a lot of css from community and enterprise alike. This way
is the least intrusive even though semantically unsound.

closes odoo/odoo#61405

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-06 13:34:44 +00:00
Benjamin Vray 2f3afafbe5 [IMP] website: increase padding on text and title snippets
task-2327741

closes odoo/odoo#60877

Related: odoo/design-themes#420
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-06 08:33:31 +00:00
Achraf (abz) f982d94cfb [FIX] mass_mailing: Create campaign from opportunities
Issue

    - Open any opportunity
    - Go to "Extra Information" and click on "Campaign" field
    - try to create new campaign

    Traceback is raised

Cause

    "self.ids" is empty and the "tuple(self.ids)" on the SQL query return "()"

Solution

    Initialize campaign field with default values

opw-2376082

closes odoo/odoo#61476

X-original-commit: 5797be02e32e68e0a188bfdc8b85068fb8fa5435
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-11-06 13:01:29 +00:00
Romain Derie 0081ff91e3 [FIX] web: prevent crashes from tempusdominus
The BS4 tempusdominus lib has 2 issues within Odoo:
1. On wrong string formating (eg typing "33"), the lib would trigger its own
   error "datetimepicker.error" that would be catch in our crash manager making
   it display a modal error.
   This is generally handled by catching that event and preventing it to bubble
   to the crash manager, see:
   Datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/widgets/date_picker.js#L128
   OWL datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/components/datepicker.js#L43
   Snippets options: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web_editor/static/src/js/editor/snippets.options.js#L1646
2. If there is a valid date, and an user enter an unvalid date, the lib crashed
   by throwing `Cannot read property 'format' of undefined'`.
   Datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/widgets/date_picker.js#L94 (fbbfa6ddca and 5481c429efb)
   OWL datepicker widget: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web/static/src/js/components/datepicker.js#L149
   Snippets options: https://github.com/odoo/odoo/blame/00b61c752e2cf514fdfb291ee36344e5af3b04dc/addons/web_editor/static/src/js/editor/snippets.options.js#L1617

Note that the issue was reported at https://github.com/tempusdominus/bootstrap-4/issues/223

Those errors can be seen for instance in Page Properties dialog (publish date
field) and in the form builder snippet if you add a date(time) field.

task-2335403

closes odoo/odoo#61475

X-original-commit: bcfbc3ea11814931c5d1f8ce3c44b1756bbfc439
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-11-06 13:01:05 +00:00
Swapnesh Shah 6bba1efa78 [FIX] website_crm_partner_assign: add tag if exists
Steps to reproduce the bug:

- CRM--> Configuration --> Tags
- Delete the tag "No more partner available"
- CRM --> Lead --> Automatic Assignment

Bug:

It will raise Traceback
`AttributeError: 'NoneType' object has no attribute 'id'`
as Tag is not Present.

With this Commit:

It will add Tag if it exists on database.

closes odoo/odoo#61470

X-original-commit: 631030ae179c65ae0d99603046b5a09ffe00c408
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-06 12:12:26 +00:00
wan beec09e27e [FIX] account: don't change the payment date
This line seems to have been copied from before the refactoring
https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074

It didn't work at first:
https://github.com/odoo/odoo/commit/ea3e39506a2b360545ec0cd1d3235e69ad16ea6c

It conflicted with the new constraint for matching the date with the
move name `_constrains_date_sequence` on `sequence.mixin`, and was right
to conflict.

closes odoo/odoo#61465

X-original-commit: 1aa0404966c6abc89d68a5118c2742de9e6b617b
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-06 11:24:27 +00:00
william-andre d4b4069dec [FIX] account: prevent changing date and journal of move with name
We need to ensure the name stays consitent with the journal_id and the
date when we try to change one of those fields.

X-original-commit: 634aaeeac36d2371743338536466a0bcc9ad6c69
2020-11-06 11:24:26 +00:00
Sébastien Geelen (sge) 7da9cc2f27 [FIX] web_editor: fix image remove from images wall
* on image remove was removing two images instead of one -> fixed
* reactivate the image adder helper if you manually remove the last image

----

bug report :
[QSM] Images wall snippet -> Add images -> click on one -> Delete via the trash icon button on the overlay -> Sometimes (most of the time) delete 2 images instead of the selected one

closes odoo/odoo#61462

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-06 09:58:41 +00:00
Mariska Archielli (ram) a73044a66d [FIX] mass_mailing, mass_mailing_sms : fix bugs and incoherency
Fix traceback when creating a new contact by checking the id list is not empty
Filter default reporting by name rather then by campaign (as campaign is an option)
Group by Campaign only if the option is checked to enforce coherency.
> This is unblocked with a group.
Hide the 'replied' status from sms reports as it is not relevant for sms.
Remove the preview message for sms as it is not relevant elsewhere then the object of mails.
Warn the user if he's trying to send a sms with only white-space characters.
> this causes an error because the plaintext-html conversion in mail_thread.py
> consider a white-spaces-only text as empty.
Mobile placeholder added for a better understanding of the field by the user.

Task ID : 2302578

closes odoo/odoo#61461

X-original-commit: e6496af1ea31b2c699de9e41196a9ae3a07efb7f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-06 10:00:07 +00:00
std-odoo 5680d52ff8 [IMP] mail: make the "activity_state" field searchable
Purpose
=======
Make the "activity_state" searchable on the "mail.activity" mixin.
This field is not stored as it depends on the current time.

Technical
=========
To make the search, we perform a SQL query.

The "activity_state" depends on the state of each activities on the
record. And this state also depends on the timezone of the user of
the activity. That's what made things tricky and we need to make the
conversion in SQL for performance purpose (we can not fetch all records
and compute them in python).

There's a special case, where there's less than 24 hours between the
deadline and the current time but one day of difference. In that case
the state should be "planned" and not "today". This case is handle by
the function "DATE_TRUNC" (e.g. 23h 01/01/2020 & 1h 02/02/2020).

Also for performance purpose, we compute the delay only once and we use
the function "SIGN" so we can use a switch/case instead of duplicating
3 times the expressions.

Task 2354754

closes odoo/odoo#60074

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-06 07:31:12 +00:00
Nicolas Lempereur 795c6723df [FIX] web: use latin number date domain in comparison menu
When using eg. arabic locale, the figures inside dates were replaced by
arabic figures which are not supported server side (they are almost
always sent in latin figures).

With this changeset, the we are using english locale to get date in
domains.

Without the change, added test fails with:

  Numbers in domain should not use addoneForTest locale
  Expected:...[date_field, >=, 2020-06-01], [date_field, <=, 2020-06-30]
  Result:...[date_field, >=, 3131-17-12], [date_field, <=, 3131-17-41]

opw-2370392
closes #61354

closes odoo/odoo#61443

X-original-commit: 74ea66a107cfc98cce8e52903ec21e3d752fb4fb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-11-05 17:44:49 +00:00
Antoine Guenet ad723ac0c6 [FIX] website: ensure reset of bg-image on add bg-video
closes odoo/odoo#61429

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-05 15:42:20 +00:00
Antoine Guenet b211cf9664 [FIX] web_editor: ensure dom is properly cleaned at end of save test
closes odoo/odoo#61421

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-05 14:33:02 +00:00
Laurent Smet bbde182022 [FIX] l10n_in: Fix custom taxes grouping only for indian company
closes odoo/odoo#61378

X-original-commit: cf3258f47b6ddf061e9bb2c525b2fd064cbab85b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-05 10:14:22 +00:00
Xavier Dubuc 48b25a5069 [FIX] mail: prevent load messages if already loading
task-2373952

closes odoo/odoo#61424

X-original-commit: a4c737eb1d45610f6ab70268d5134dc5ed00ba8d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-05 14:57:43 +00:00
Goffin Simon 4ea3e31816 [FIX] mail: Sending a sms on an opportunity without customer
Steps to reproduce the bug:

- Create an opportunity without a customer but with a phone number
- Send a sms
- Refesh the page

Bug:

A traceback was raised because an entry is created in mail_message_res_partner_needaction_rel
with partner_id = False

Due to https://github.com/odoo/odoo/blob/14.0/addons/sms/models/mail_thread.py#L327

A mail.notification is created from a sms even if there is no partner set on the sms

opw:2372201

closes odoo/odoo#61425

X-original-commit: 651da2fe8694ed0003a9dd0801c71f2ef26cedb9
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-05 14:58:13 +00:00
Didier (did) 0658995624 [FIX] mail: this self is unused
task-2286090

closes odoo/odoo#61418

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-05 14:14:59 +00:00
IEL e8804333fb [FIX] web: force ltr for phone numbers in reports
FYI: while letters are written right to left in languages like hebrew, arabic,
persian, the numbers (including phone numbers) are written left to right

STEPS:

* via Odoo Studio add Address block (select "doc > Customer" for field
expression)
* create a sale order for customer with rtl language
* set phone number for the customer with plus sign, e.g. +1 222 33 44 55
* print Quotation / Order

BEFORE: 222 33 44 55 1+ or similar mess

AFTER: +1 222 33 44 55

WHY:

* css is copy-pasted from ui.scss:

  https://github.com/odoo/odoo/blob/6ba81c99d0c7f8e57ae573318f5e3d1ff53fa561/addons/web/static/src/scss/ui.scss#L91-L98

* Address block already has o_force_ltr class

  https://github.com/odoo/odoo/blob/6ba81c99d0c7f8e57ae573318f5e3d1ff53fa561/odoo/addons/base/views/ir_qweb_widget_templates.xml#L35-L36

DEPLOYMENT: to fix phone in footer, you need to upgrade ``web`` module

---

opw-2368525

closes odoo/odoo#61416

X-original-commit: 6f0957466165a418762d10ddac658d642547a9cb
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-05 13:51:16 +00:00
Achraf (abz) 5dbd4d79ee [FIX] mail: Don't send negative id via rpc
Issue

    - Install live chat and website
    - In incognito mode, send a message via live chat (as public user)
    - Log in the database

    Erro: Record does not exist or has been deleted. (Record: res.partner(-1,), User: 2)

Cause

    Guest with negative id are sent to the server

Solution

    Don't send negative id

opw-2371677

closes odoo/odoo#61407

X-original-commit: 5dfd793470deed9ab459ccb2d747511213bc5bf9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-05 13:15:23 +00:00
Jérémy Hennecart 054fb95d73 [IMP] crm: remove default PLS fields
The purpose is to ease the onboarding for the default CRM settings.
Now, we do not include any field by default and tags become an option
in the choice of fields apply to the computation.

task-2196200

closes odoo/odoo#48124

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-05 11:07:11 +00:00
Nasreddin (bon) 3ec29ccd94 [FIX] event: Google & Yahoo calendar link broken
Issue

	- Install 'Event' module
	- Go to 'Event' and select any event
	- Click on "Attendees" stat button
	- Click on any attendee ( or create one if not any)
	- Confirm ( if not already confirm) registration
	- Click on "Send by email"
	- Change template to 'Event: Registration' then send
	- In the chatter, check Google or Yahoo calendar link

	Bad link.

Cause

	Wrong 'dt_format' pattern generate a broken datetime value;
	current format work with time.strftime() but not 'babel' library.

Solution

	Update 'dt_format' pattern to match with babel library since it's the
	one used in 'format_datetime' func.

 > Note that Babel uses different patterns for specifying number and date formats compared to the Python equivalents (such as time.strftime()), which have mostly been inherited from C and POSIX

ref : http://babel.pocoo.org/en/latest/dates.html#pattern-syntax

opw-2370895

closes odoo/odoo#61394

X-original-commit: ab03fa39c716f717ee78c30e41727a85234b5c9d
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-11-05 11:33:00 +00:00
Goffin Simon a5be1088c4 [FIX] fleet: Fleet Management Report
Fine tuning of https://github.com/odoo/odoo/commit/bf80334699773f080f41dc234ac170a384c75ea4

disable_linking="True" doesn't work on graph view

opw:2360528

closes odoo/odoo#61392

X-original-commit: f8651f9d380000d2bdbdafc136ca9c173f6d8742
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-05 11:24:21 +00:00
Goffin Simon 49afd2f807 [FIX] account: Impossible to import a camt file with Stmt Id > 2147483647
Steps to reproduce:

- Let's consider a camt file F with Stmt Id > 2147483647
- Import F

Bug:

An index out of range was raised because range of an integer type in postgresql must be
in [-2147483648, 2147483647]

opw:2372401

closes odoo/odoo#61391

X-original-commit: 953d3069fb77605a8d69f80124d011144595d459
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-05 11:23:54 +00:00
Richard deMeester 544bda1da7 Add newer CLA declaration
closes odoo/odoo#61389

X-original-commit: 5cc884f96bcd77997b158bd496be85d382ddb3a3
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-05 11:23:24 +00:00
Richard deMeester 404c2b2969 [FIX] stock: Production Lot On Hand api.depends
Production Lot quantities are not recalculating
mid transaction without depends.

X-original-commit: 5aec749777b4697660a8da6cd1f8e56600f5adc3
2020-11-05 11:23:23 +00:00
Alejandro Santillan d4ad15d534 [CLA] Update Vauxoo CLA
Incorporate Alejandro Santillan (R4Alex) as Vauxoo's contributor

closes odoo/odoo#61383

X-original-commit: e265a1e89288ac417b17f82d4d2a4b1a84cbfc4e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-05 10:34:59 +00:00
wan 5f5071f882 [FIX] account: filters on account.bank.statement
Task 2375107

Need to be consistant with the new states on account.bank.statement

closes odoo/odoo#61381

X-original-commit: 0719f1dd9471705c7486236adb74d5825173831b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-05 10:33:53 +00:00