Commit Graph
133892 Commits
Author SHA1 Message Date
Andrea Grazioso (agr-odoo) ed17f560fa [FIX] product: recover a uom even when the default one is deleted
Delete the uom 'kg'(kilos, kilograms), open a product form view

Traceback will popup because the hardcoded xmlid cannot find the value
in the database since has been deleted. Adding a fallback fix the issue

opw-2194659

closes odoo/odoo#45265

X-original-commit: 62baf8ba12cdf4521c6d0d0fea61ff1aa2e3f4d8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-13 08:57:59 +00:00
Goffin Simon ea2d316687 [FIX] crm: Creating a lead in multi company from My pipeline
Steps to reproduce the bug:

- Let's consider two companies C1 and C2
- Let's consider a sales team ST in C1
- Let's consider that the partner of your current user is in ST
- Log your user in C2
- Go to CRM > Sales > My pipeline
- Create a lead

Bug:

An access error was raised.

opw:2191517

closes odoo/odoo#45234

X-original-commit: 42cdf368bdec41918b9f4b131b838cb1c76928b4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-12 16:17:32 +00:00
Jérémy Hennecart 20fff84b9d [IMP] crm(_iap_lead)(_enrich): improve default config
Improve the default configuration on CRM for predictive lead
in order to ease the onboarding.
Modify text and install crm_iap_lead(_enrich) automatically if
CRM and IAP are installed.

task-2131056

closes odoo/odoo#44262

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-13 08:00:22 +00:00
Joren Van Onder aee95865bb [IMP] payment_authorize: log API responses
Makes debugging possible without having to run the db locally and
manually adding _loggers everywhere.

Parts of the error are logged already, leading to messages like:

...payment_authorize.models.payment: The transaction was unsuccessful

Unfortunately they don't show the reason. The entire response is
something like:

{'messages': {'message': [{'code': 'E00027',
                           'text': 'The transaction was unsuccessful.'}],
              'resultCode': 'Error'},
 'transactionResponse': {'SupplementalDataQualificationIndicator': 0,
                         'accountNumber': '',
                         'accountType': '',
                         'authCode': '',
                         'avsResultCode': 'P',
                         'cavvResultCode': '',
                         'cvvResultCode': '',
                         'errors': [{'errorCode': '5',
                                     'errorText': 'A valid amount is '
                                                  'required.'}],
                         'refTransID': '',
                         'responseCode': '3',
                         'testRequest': '0',
                         'transHash': '',
                         'transHashSha2': '',
                         'transId': '0'}}

Since we log the full request above, let's also log the full response.

PS. this was present before but was lost with 26f3d8465d.

opw-2188889

closes odoo/odoo#45259

X-original-commit: d269bba3b9f4f4fa567a2a7084396bdf08422fa4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-13 08:16:01 +00:00
Jérémy Hennecart d6db3bc5ef [FIX] crm: remove uid domain on activities report
Remove the domain that was limiting the reporting view. The goal
of this reporting view is to allow managers to check what all
salespersons are doing.

task-2192589

closes odoo/odoo#45239

X-original-commit: 4901fb037510cdabb7404f335872732797331b05
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-12 17:02:56 +00:00
wan 4d311c09a2 [FIX] account: writeoff_account_id not required if no difference
opw-2152644
Do not set the field writeoff_account_id as required if the
payment_difference is zero because there is no writeoff in that case and
the field is invisible.

closes odoo/odoo#45257

X-original-commit: b0939529de5cd4273e64cfe729f1b5f532bbd859
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-13 08:01:10 +00:00
Nicolas Martinelli efbf412083 [FIX] stock: user-default picking return
- Activate Developer mode
- Go to Settings / Technical / Actions / User-defined Defaults
- Create the following:
  Field: To Refund (update SO/PO) (stock.return.picking.line)
  Default Value (JSON format): true
- Create a SO with a product invoiced based on delivered quantity
- Validate the SO, validate the picking
- Return the picking

The field 'To Refund (update SO/PO)' is is not, while it should be.

This is because we don't explicitly call the `default_get`, therefore
only rely on the default value of the field.

opw-2172513

closes odoo/odoo#45235

X-original-commit: 70d6f25b83f962d91243edaa0ff8e9a78b2e18ac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 16:32:12 +00:00
jev-odoo 08f6dc2495 [FIX] point_of_sale: factorization of _create_account_move
This factorization is needed for support purpose.
I.E.: This will allow to post an account move to balance
unbalanced journal entries.

Basically, it divides the function into sections
that were already present in comments.

closes odoo/odoo#45231

X-original-commit: 26e012015a6803af6c2a5480984f1c02e0244e83
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 16:12:38 +00:00
jvm-odoo bf14a04010 [FIX] web: fix translation dialog should use only active languages
Issue

	- Install CRM and at least 3 languages
	- Deactivate one of them
	- Go to CRM > Configuration > Activity Type
	- Edit an activity type and try to edit translation

	Traceback (Cannot read property '1' of undefined)

Cause

	This is because all the translations are fetched
	but we don't look if the language they use is active.

	So at one moment, the relatedLanguage is undefined and
	we do relatedLanguage[1]

Solution

	Filter the translation, to keep only the ones with an
	active language.

OPW-2193969

closes odoo/odoo#45215

X-original-commit: 9d1259da1bfd60362ec93996f723a4e378434dc8
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-02-12 15:07:05 +00:00
jbm-odoo 9a4da8894f [FIX] web: Avoid open too fast zoom
Picture of employees are maximazed directly which is annoying when
you move the mouse in kanban view.

Add the ability to put a waiting time before opening the zoom in
option of the field in the view (default value is 0).

closes odoo/odoo#45229

Taskid: 2191289
X-original-commit: a264b17d8fe18464df439d896ecb7dea106caa5a
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
2020-02-12 15:54:06 +00:00
jdoutreloux fdcab45992 [IMP] sale_timesheet : set the partner_id on the wizard for sale order creation.
The partner_id on the wizard for sale order creation (from project and from tasks) is now set with the one
on the project or on the task if it is set.

Some fields were moved to community (from sale_timesheet_enterprise).

Concerned fields : allow_billable (project and task),
allow_timesheet_timer (project)

This also move timesheet_product_id to community.

This field was being added in industry_fsm_sale and was required
if allow_billable and allow_timesheets were true. But those 2
other fields are already available once sale_timesheet is
installed.

The field timesheet_product_id is thus being moved to
sale_timesheet for more coherence.

Task-2157571

closes odoo/odoo#44509

Related: odoo/enterprise#8118
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-12 14:01:03 +00:00
alt-odoo 1bbe7c034c [FIX] hr_expense: add constraint on product_id in hr.expense model
Before this commit, it was possible to delete an expense product even if it
was already set on expense notes.

closes odoo/odoo#45216

X-original-commit: d887bff9d52b649ea84d351fbf5fb2afbcebcbcd
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-02-12 15:07:58 +00:00
Adrian Torres 9b0e976b9f [IMP] base: raise warning if no field in search view
Before this commit, it was possible (and common) to create search views
without fields and only filters, the consequence was that a search for
that particular search view was not possible. (See
https://github.com/odoo/enterprise/pull/7852)

With this commit, a warning is raised if no field is defined within a
search view, preventing these "common mistakes" from happening again.

closes odoo/odoo#45058

Task-id: 2179521
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-12 13:44:07 +00:00
Adrian Torres a372561497 [FIX] crm: specify at least one field in search views
Without at least one field, performing a search in these models' search
view is outright impossible.
2020-02-12 13:44:00 +00:00
Antoine Prieels 28d8479f7d [FIX] point_of_sale: Customer display unresponsive script
The customer display sometimes displayed a warning message saying:
"A script on this page may be busy, or it may have stopped
responding. [...] Script: chrome://[...]".
We then remove the time limit for the execution of Chrome scripts.

closes odoo/odoo#45207

X-original-commit: 53fadc7f5da8e13ca60a6e89fd74000e5cd6938e
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-02-12 14:26:30 +00:00
qmo-odoo b0ec3aa1eb [REF] event: remove twitter_hashtag and its configuration on event type
This commit removes the field twitter_hashtag from event and event_type.
The justification behind this change is that it has been made obsolete
by our social marketing app and our website builder.

Task ID 2191921
Community PR odoo/odoo#44715
Upgrade PR odoo/upgrade#764

Related: odoo/upgrade#764
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-11 14:36:52 +00:00
Rushi Sathawar 90075be373 [IMP] hr_timesheet: improve the timesheet tree view.
Purpose of the task is to improve the list view of timesheet.
so the description(name) field should no longer be required in the
list view and move the Description(move) field to the right of
the task one in list view.

As field is required at python and display as _rec_name on
analytic line so if value is blank then we should fill the
value with the '/'.

task-2176065
closes #44101

Related: odoo/enterprise#8001
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-12 14:16:03 +00:00
Odoo's Mergebot bab3281476 [MERGE][IMP] website_slides: improve the frontend UI for slide_channels
PURPOSE
---------------

Add small improvements to the frontend UI for slide_channels.

SPECIFICATION
-----------------------

Current behavior before PR:

1. We can't display all uncategorized slides of a course.

2. When you upload an image or PDF, the name field is replaced by the filename even it was filled before selecting the file. This leads to rewrite the name a second time before uploading the slide.

3. There is no way for the website designer to choose if he wants to display or hide the promoted slide of a course.

Desired behavior after PR is merged:

1. Slides without a category are displayed correctly, now you have access to the link "View all" which allows the user to display all uncategorized slides with a possible pager.
You have also the possibility to create a section/category with the new button "Add a section" next to the button to upload content.

2. When you upload an image or a PDF, the name field is no more replace automatically by the filename. Now, it's replaced only if the field is empty when you select the file.

3. Now, there is a new button under the Customize tab to display or hide the promoted slide on the courses. By default, the promoted slide is displayed on the course.

task-2161391

closes odoo/odoo#42420

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-12 15:59:10 +01:00
Joren Van Onder 67e49915b5 [FIX] point_of_sale: pick default pricelist in the right company
To reproduce:

- Create a second company with the same currency as the first,
- Assign the first pricelist with that currency (based on _order) to
  the second company
- Install the POS, or create a new pos.config while in the first
  company

The above results in:
raise ValidationError("The selected pricelists must belong to no
company or the company of the point of sale")

opw-2192658

closes odoo/odoo#45199

X-original-commit: f6e73f69350b3d0fef5f24e0073f68e52da3a36d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 13:50:27 +00:00
Paul Morelle 0cc95583bf [FIX] website_forum: give a name to posts created from comments
From Odoo 13.0, the list of answers of a user displays the name of the
answer itself, and not its parent's.
Answers created directly on a question are given a name, but answers
created from a comment are not.

This commit fixes this behavior for a better consistancy: all posts
should have a displayable name.

A migration step on saas~12.5 will populate from their parent's name
the existing posts that don't have a name.

closes odoo/odoo#45193

X-original-commit: 327079e97d12bf3bfcbc74e78bcc7ebc36149d02
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-02-12 13:16:47 +00:00
Jérémy Hennecart 9d94c1db92 [IMP] website_slides: add customize button to display/hide the promoted slide
There is now a button in the Customize tab which can be used to choose to display or hide
the promoted slide of a course.

task-2161391
2020-02-12 12:55:35 +00:00
Jérémy Hennecart 68dd11b6f2 [IMP] website_slides: upload document doesn't rewrite title everytime
Before when you uploaded a document, the title was set to the filename even when the field was
set by the user before. Now, the field title is set to the filename only when it is
empty.

task-2161391
2020-02-12 12:55:35 +00:00
Jérémy Hennecart c9ace27135 [IMP] website_slides: improve the ui on a course (documentation)
Before, uncategorized slides  weren't display correctly on the slide_channel. It was impossible
to view all the slides if there were more than 4 slides uncategorized because the "View all" link wasn't
display.

Now, when there is no section/category on a course, it displays the last 4 slides with the "View all" link
which allows to be redirected to the uncategorized category (category_id=-1). This request displays all the
uncategorized slides with a pager if the limit of 12 slides per page is exceeded.
If there is at least one category created, all uncategorized slides are displayed under a section "Uncategorized".

Additionaly, there is a new button which allows to create a category directly on the course page to allow the user to
organize is course more effectively.

task-2161391
2020-02-12 12:55:35 +00:00
Lucas Lefèvre 58c4f8ffc1 [IMP] sale_timesheet: Add tooltips to project overview
Purpose
=======

The project overview is still as obscure as ever, so we are adding even more tooltips.

Specifications
==============

Add the following tooltips to the project overview:
- Other costs: Any cost linked to the Analytic Account of the Project.
- Re-invoiced costs: Costs from expenses that were reinvoiced to your customer (provided
  that the Analytic Account of the Project was set on the Expense).
- Invoiced: Revenues linked to Timesheets already invoiced.
- To Invoice: Revenues linked to Timesheets not yet invoiced.

closes odoo/odoo#44693

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-06 09:39:32 +00:00
Dharmraj Jhala 587a6bd9f6 [IMP] sms: improve SMS preview without existing record behavior and code
This commit clean-ups the code for model `sms.template.preview` which
mainly includes the following changes :

 * remove 'res_id' field and use only the reference field instead;
 * remove inheritance from `sms.template` as we only need a body field
   computed based on record and template;
 * convert onchange of lang / record to compute field for body;
 * fix 'No Records' warning which previously appeared even if there were
   records to be previewed (by adding compute field 'no_records');

LINKS

TaskID 2180132
Community PR odoo/odoo#44104
Upgrade PR odoo/upgrade#763

Related: odoo/upgrade#763
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-11 14:14:19 +00:00
Raphael Collet c8e79869a3 [FIX] core: delay of constraints in upgrade
Sometimes, constraints are not delayed during a module upgrade: the
module is 'to upgrade' but in 'init' mode :-/
Fix this by relying on the module's state only.

closes odoo/odoo#45179

X-original-commit: 878b6538961a9b6a5fe1c6ac68d4ff39391abcdf
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-12 11:17:54 +00:00
Rémy Voet (ryv) 5e01d97b1d [FIX] stock_landed_costs: fix links account move<->valuation
When we valide a stock landed costs with a stock picking
with multiple products, when two stock valuation layers is created,
only one was link to the journal account move.

task-2123752

closes odoo/odoo#45178

X-original-commit: d141c5fdb5cf9b7d2b365dadcfa6ccd9c4d38d4c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-12 11:15:07 +00:00
Adrian Torres 97a5093117 [FIX] *: specify at least one field in search views
Without at least one field, performing a search in these models' search
view is outright impossible.

closes odoo/odoo#45177

X-original-commit: 0aabfbff3ce5d68bf37e1734ba7aa43f62803f3a
Related: odoo/enterprise#8379
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-12 11:09:05 +00:00
Raphael Collet eb08ac11ff [FIX] base: missing flush() before setting up registry
Custom models and fields set up the registry as part of their CRUD.
Make sure to flush() before setting up the registry, in order to avoid
neverending recomputations (as fixed by the former commit).

closes odoo/odoo#45163

X-original-commit: af6dbb5c7c165dcf37bf87ee76c0170795ecb574
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-12 10:16:12 +00:00
Xavier-Do 7483fdfce0 [FIX] core: flush env after pre upgrade scripts
In some case, a pre-migration script calls `xml_import.parse` to force
reload a no-update data in pre-script. It is possible that fields are
marked to recompute in the process. The problem is that the reference to
the field added in `env.all.tocompute` won't be the same as the
reference of the same field after calling `registry.setup_models()`,
leading to an infinite loop while recomputing this field, since
`fields.__get__` wont find `self` in `env.all.tocompute`.

This problem was discovered when trying to migrate a database with all
modules installed (no demo data) from 12.0 to 13.0 (for commit
references: http://runbot.odoo.com/runbot/build/1176576 with database
comming from http://runbot.odoo.com/runbot/build/1171714).

This commit adds a check before executing `registry.setup_models()` in
order to log when some fields to compute remain before breaking fields
references, and adds a `flush()` after pre-scripts to fix the current
issue.

X-original-commit: 41b9d810066774736c4077bba1dc9c9fba004f48
2020-02-12 10:16:11 +00:00
Xavier Morel e95ccf0908 [FIX] *: domains should not have as many binary operator as there are terms
* modify client-side domain normalisation to error if the domain is
  invalid (not enough terms / segments for the number of operators)
* add better error reporting to attrs / modifiers parsing
* add a few layered error augmentation to provide clearer context
  e.g. "error: invalid domain <thing>" is helpful but "error while
  parsing modifiers for field foo: modifier invisible: invalid domain
  <thing>" is much more helpful
* rework _evalModifiers to deduplicate it in order to more easily
  implement this contextual augmentation
* test that improper domains are properly found improper
* fix a bunch of incorrect attrs domains
* also removed an apparently undefined (& unused) "options" argument
  to a _applyModifiers call

closes odoo/odoo#44642

Related: odoo/enterprise#8175
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-12 09:32:17 +00:00
Romain Derie 968638aa1a [FIX] website: prevent undefined in publish toastr
d92f76592c introduced a toastr when publishing a record.
It was designed for the topbar publishing toggle button, but some other
templates ended up also using that feature.
As those templates were missing `data-description` which contains the model
business name, it would show `You've published your undefined`.
This is only related to a very few places having a publish button inside the
page.

This commit fixed that by ensuring every publish button template have the
necessary code.
Also, a fallback is added in case tha `data-description` is missing somehow.

task-2191735

closes odoo/odoo#45141

X-original-commit: 4ab6e36b739060eb16e97eac502fd087a072abf3
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-12 07:53:51 +00:00
jvm-odoo a0e2c8a765 [FIX] mrp: populating bom lines on import
Issue

	- Install MRP
	- MO > Import with BOM

	The lines are not populated but it
	was the case in v12.

Cause

	In 7206b385b5, the lines generation
	are done in a onchange but they are
	not trigerred in imports

Solution

	Call the onchange manually when we
	are in an import case

OPW-2188066

closes odoo/odoo#45118

X-original-commit: 26c44fae1ad8a3ac2d79d9673255aef12fddeb17
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-02-11 16:22:51 +00:00
Santiago Acosta y Lara fe8036537d [FIX] stock: move line: uom mismatch in _action_done
Before this patch, validating an unreserved move of a dozen while 12
units were reserved resulted in a quant with 0 unit as quantity and 11
units as reserved quantity.

closes odoo/odoo#45132

X-original-commit: bf7d76a7127521ba17f29bc470c3d551cc9988d5
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-11 18:33:25 +00:00
Sébastien Theys 4c492a1989 [FIX] hr: restore chat button on employee form
[1] transformed the button to be `a` instead of `button` for validation reasons
however `header` only renders `button` tags so the chat button was not visible
anymore.

[1] eb2f0aabcf

closes odoo/odoo#45129

X-original-commit: 0075dc37b07b1e81ff8c20e5af49173bf69d55ed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-02-11 18:11:10 +00:00
fja-odoo 729e8c9124 [FIX] website: hide move arrows for image gallery carousel items
Bug introduced with https://github.com/odoo/odoo/pull/38997

closes odoo/odoo#45125

X-original-commit: ffffa1c0ab84bbfe8950a0e31feb39e3a3b188bb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-11 17:35:41 +00:00
fja-odoo 1262648486 [FIX] web_editor, website_form: fix submit btn edit
The edition of the submit button's text was broken.

Part of https://github.com/odoo/odoo/pull/44907

closes odoo/odoo#45124

X-original-commit: 85966ac29b53d9e1c2ad1efb2c35ab13c9baae89
Related: odoo/enterprise#8360
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-11 17:35:07 +00:00
fja-odoo 07bb2e4591 [FIX] website_form, *: add submit btn position option
* = website_crm, website_hr_recruitment, website_sale

It is now possible to change the position of the submit button via
the left panel. Indeed switching to a non-horizontal form left the
submit button aligned with the labels which thus appeared broken.

Part of https://github.com/odoo/odoo/pull/44907
task-2191409

X-original-commit: 60b4c8d04006736be573189accd0dccaafafa651
2020-02-11 17:35:06 +00:00
Victor Feyens 25d70fc5c9 [FIX] account: account.bank.statement.cashbox multi record creation
account.bank.statement.cashbox model is verified at create/write
and updated accordingly but may crash on multiple record creation/update.

The `for` loop on `self` didn't use the specific records yielded but the `self` recordset.

closes odoo/odoo#45116

X-original-commit: af8367734c69dfeb0a1e1f029009f6da98449d0b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 16:16:05 +00:00
Victor Feyens fe7b0e828f [IMP] base: UI improvement
closes odoo/odoo#43676

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-11 14:48:52 +00:00
Victor Feyens 27650db8bb [IMP] base: onchange cleanup 2020-02-11 14:48:52 +00:00
Bhavita Bhattandjpr-odoo c1a1e47b52 [IMP] website_livechat,website_forum: option hidden after installation
In this commit we deleted tour file of website_forum beacause
of the changes applied on  forum icon of new click button,
live chat icon disappear after livechat module installed and
modified livechat channel data for auto-publish channel.

task-2088546
closes #40085

Related: odoo/enterprise#6639
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:10 +00:00
Bhavita Bhattandjpr-odoo 4e340cc5f0 [IMP] website: improve code for duplicate and new page
in this commit, throw the wizard to enter the new page name, while duplicating
page button and new duplicate page button added in the page properties dialog.
updated the test case related to duplicate page along with duplicate menu
consideration.

task-2088546
closes #40085

Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:10 +00:00
Bhavita Bhattandjpr-odoo 4e162a4e75 [IMP] website, website_link: improve frontend config screens
Following things are done in this commit:
1. changed some labeling and string for more readable and helpful to the user
2. added extra width to the text box
3. added publish/unpublish option for mobile view.
4. track page option auto-activated for any new page,event,job offer,course,
   blog.

task-2088546
closes #40085

Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:00 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
RATIONALE

Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case

  * using the template in the composer on a single record: it is displayed
    in the rendered template in the composer, meaning people could change it.
    This behavior is interesting as it allows to see the email content;
  * using the template in the composer in mass mail mode: it is not displayed
    as only the raw jinja is displayed. It is therefore not obvious that it
    will be appended to the body of the mail. People could add it manually and
    have 2 signatures as a result;

A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.

Behavior will therefore be

  * use a template -> specify signature usage in it manually through jinja;
  * do not use a template -> signature added in sent emails;

SPECIFICATIONS

Remove user_signature.

Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.

Quickly clean some signature integration.

LINKS

Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761

Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-02-11 14:01:13 +00:00
Sébastien Theys 5018b01dc7 [IMP] mail, test_mail, hr_holidays: remove obsolete out of office
The customizable "out of office" text was removed from the editable views as
part of task-2053585, but some places in the code were still using it, even
though it was never set anymore.

This commit removes the obsolete code.

Part of task-2171864

closes odoo/odoo#44968

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-02-10 13:05:04 +00:00
oco-odoo b7ade94c30 [FIX] account: correctly round amounts to compute matched percentage
Before that, depending on rounding errors on floats, it was possible to end up with a matched percentage of 0.999999999 instead of 1.0 on an account move in case of full reconciliation. This could in turn cause problems with cash basis taxes, when checking what proportion of the move is reconciled.

closes odoo/odoo#45094

X-original-commit: 958bee9cf9f770351fbc346a081cfe059a911b3f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-11 13:08:38 +00:00
Raphael Collet fd30d29d3c [FIX] core: log import traceback in debug mode
This is a followup of 1d553eea7b.

Systematically logging import tracebacks can fill up log files, and
waste disk space.  We therefore log those tracebacks in DEBUG mode, so
that they can be activated only when needed.

closes odoo/odoo#45075

X-original-commit: 017e3d798c55b1bdac221aea76d3d944f045ee65
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-11 11:39:25 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
Victor Feyens a247d64377 [MOV] account,sale --> (account,sale)_intrastat: intrastat code.
closes odoo/odoo#44858

Related: odoo/enterprise#8277
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 09:25:20 +00:00