Commit Graph
134783 Commits
Author SHA1 Message Date
Ravi Gohil d2bd6d69d6 [IMP] account{_check_printing}: Added 'Country Code' field
Many localization modules adds field 'l10n_xx_country_code' on
Company/Settings views with the purpose of using it to hide that
particular localization's fields from other country's users.
So, it is better to add a common field in account module so that
other localization can use that field instead of adding a new one
where ever it is required.

Also, one such field was already added from account_check_printing
module, so we removed it from there as it is not needed anymore.

Task: 2049977
Closes: #35755
Related: odoo/enterprise#5158
2020-03-24 06:51:22 +00:00
Thibault Delavallée fd9b259026 [REF] mail: merge blacklist and address mixins
PURPOSE

Perform some code cleaning in mail module

SPECIFICATIONS

mail.address.mixin is used only for mail.thread.blacklist mixin. Let us
merge those two and simplify class organization.

LINKS

Task ID 2222033

closes odoo/odoo#48115

Related: odoo/upgrade#967
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-20 14:58:44 +00:00
Mohammed Shekha 5353fb2496 [IMP] web: trim FieldEmail widget value
before this commit, email widget was not trimming value and due to which
space aroung email value remain as it is added by user.

after this commit, email widget will trim the value and remove leading/trailing
space.

task-2197432

closes odoo/odoo#47470

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-24 08:02:13 +00:00
Thibault Delavallée efd5401ee1 [REF] event: allow to use UTMs directly in event
PURPOSE

Allow to use UTMs directly in event, notably to be able to sort or make
statistics on registrations.

SPECIFICATIONS

Move all UTMs fields definition to event. In base event module they are
set by hand or through links (when using mass mailing for example).Shared
links with utm bits defined in it allows to track marketing statistics
on registrations.

In event_sale registrations can be linked to a sale order. UTM information
are copied from the sale order to the registration itself. Order defined utm
always erase default one coming from event.

LINKS

Task ID 2212297
Community PR odoo/odoo#47229

Related: odoo/upgrade#913
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-23 10:07:46 +00:00
Thibault Delavallée 286427d3c4 [IMP] event, website_event_track: make create of registration and track multi
Purpose is to allow the batch create on those models that may be created
in batch, notably through import.

LINKS

Task ID 2212297
Community PR odoo/odoo#47229
2020-03-23 10:07:42 +00:00
Thibault Delavallée 30af656e1a [REF] event: remove origin field of registration
Origin is a char field holding the registration "source name". Its only use
is to copy the sale order name when registration is linked to a sale order
in event_sale. As we can filter / group / search on sale order or sale order
line directly instead of the origin there is no need to keep this char field.
If necessary to some internal reasons it can simply be added through studio.

LINKS

Task ID 2212297
Community PR odoo/odoo#47229
2020-03-23 10:07:32 +00:00
Odoo's Mergebot baab530737 [MERGE] crm(_*): move from onchange to editable stored fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

USE EDITABLE STORED FIELDS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

CLEAN CRM CONVERT WIZARDS CODE AND FIELDS USE

In this merge we also rewrite code located and/or used in convert or merge
wizards. Indeed it holds unnecessary variables, dictionaries manipulation
that hides the real business flow, badly named variables, unclear methods, ...
Logic of those wizards seem quite simple but is hidden behind a wall of
bloated code.

CLEAN CRM.TEAM MODEL

Clean statistics fields definition on crm.team. Future tasks will improve
the use of sales team in crm and first steps is to clean a bit models linked
to sales team.

LINKS
Task ID 2088565 (crm: from onchange to compute)
Community PR odoo/odoo#41955
Enterprise PR odoo/enterprise#7322
Upgrade PR odoo/upgrade#781

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-24 09:34:22 +01:00
Julien Castiaux a5df755284 [FIX] base: apply changes on inherited view
Commit 60106cf2 (task 2082503) introduced some changes on server
actions and automated actions, some changes were applied on server
actions but via the base_automation inherited view.

This commit move those change so they are directly applied on the server
action form view.

closes odoo/odoo#40964

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-03-24 06:43:44 +00:00
jerome hanke (jhk) 3ea6180f18 [FIX] web: export of id from grouped elements does not fail
Steps to reproduce:
- install sales
- go to sales > go to any list view (SO for example) and group by
anything (customer for example)
- click on action > export > add ID to the exported columns
- click export

Previous behavior:
you get a traceback: "Invalid field specification '.id'."

Current behavior:
ids are exported as intended

opw-2194233

closes odoo/odoo#48222

X-original-commit: c8217080d960ec3f8436111ce60a17754fe64f2d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-03-23 17:40:01 +00:00
Thibault Delavallée 8304bc01ba [REF] crm, website_crm_score: update team statistics fields
PURPOSE

Purpose of this commit is to clean statistics fields definition on crm.team.
Future tasks will improve the use of sales team in crm and first steps is to
clean a bit models linked to sales team.

SPECIFICATIONS

New statistic fields

  * ``lead_all_assigned_month_count``: all assigned lead and opportunities
    in the last 30 days; used notably for scoring mechanism;

Renaming performed on some statistic fields

  * ``unassigned_leads_count`` -> ``lead_unassigned_count``;
  * ``overdue_opportunities_count`` -> ``opportunities_overdue_count``;
  * ``overdue_opportunities_amount`` -> ``opportunities_overdue_amount``;

All those fields are used for display and management purpose, and are
computed not stored fields. No migration is therefore required.

LINKS

Task ID 2088565 (crm: from onchange to compute)
Enterprise PR odoo/enterprise#7322
Upgrade PR odoo/upgrade#781
2020-03-23 11:42:12 +00:00
Thibault Delavallée fc7bff8afb [REF] website_crm_partner_assign : use stored editable r+w fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based coputation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFICATIONS: FIELDS RENAMING

In this commit we also rename ``date_assign`` to ``date_partner_assign``. There
are already ``date_open`` (crm_lead) and ``assign_date`` (website scoring)
fields available. It may be confusing. The field is therefore renamed to better
indicate it is linked to partner assignment.

LINKS

Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781
2020-03-23 11:42:12 +00:00
Florent LejolyandThibault Delavallée d13dba106c [REF] crm : use stored editable r+w fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFIATIONS: CONSTRAINT USER_ID / TEAM_ID

In this commit we also remove all the better implementations of "not really a
constraint" constraint about user_id and team_id. Indeed as this is a computed
field normally we should not have to call the onchange manually, even through
a hackish call to a falsy constraint (see fdc8749, 222cca2, 4e8ebc7 ). You are
all inferior to SM team.

SPECIFIATIONS: DATE_OPEN

Assignment field, namely ``date_open``, has a random definition as it seems
linked to assignation, with several behaviors intended

  * ce39ca8a97 : reset only when going from
    no salesman to a salesman (aka, keep assignation when changing)
  * 8e540558ee: reset when changing salesman

We choose to keep first implementation as it seems a bugfix broken again
by second commit. It will also replace the ``assign_date`` defined in
``website_crm_score`` module.

SIDE EFFECTS

Several side effects occur with this commit. Indeed behavior is not always
exactly the same, notably as code rewriting allowed to fix some issues,
incoherent behavior or was simply not able to achieve exactly the same
result. Notably

  * at lead creation: default probability is the one coming from PLS and not
    0.0 anymore, since field is already computed. Synchronization with PLS
    still works the same way (change probability, you are out of syn);
  * various user_id / team_id combinations notably in convert / merge wizards
    may change, notably we do not reset team_id if user_id is reset. We
    consider we could keep a team_id set without user_id;

LINKS

Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Florent Lejoly <fle@odoo.com>
2020-03-23 11:42:12 +00:00
Thibault Delavallée aeed763b03 [FIX] crm: improve duplicate finding when converting
SPECIFICATIONS

Improve heuristic used to find lead to convert duplicates

  * check email_normalized instead of email_from, as it may contain formatted
    emails. Normalized email are sanitized and normalized version of emails
    and ease comparisons;
  * use lead email if its customer has no email;
  * if no email is available but a customer is set, use it anyway;

This notably reverts 2917b38f28 . Indeed no reason has been found why
this fix is necessary.

LINKS

Task ID 2088565 (crm: from onchange to compute)
2020-03-23 11:42:11 +00:00
Thibault Delavallée 03afd0f2a1 [REF] crm: improve context use and naming of fields in convert wizards
SPECIFICATIONS 1: FORCE_ASSIGNATION

Move and rename force_assignation in convert wizard. Purpose is to move the
force_assignation field from mass convert wizard to its base convert wizard
used through _inherit. It allows to avoid relying on context propagation in
some methods. This field is also renamed as assignation as other meaning in
English.

SPECIFICATIONS 2: OPPORTUNITY_IDS

Improve search of duplicate by always ensuring duplicated are computed using
active_test. Also add the active_test on the field as otherwise computed
results are actually not visible to the user.

Generic opportunity_ids field is also renamed to better indicated it is used
to store duplicates and avoid thinking it holds data related to batch convert
or merge.

LINKS

Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781
2020-03-23 11:42:11 +00:00
Thibault Delavallée d8b6b35cb3 [REF] crm(_*): improve code of methods used in lead/opp convert/merge wizards
PURPOSE

As CRM is going to be updated (onchange -> compute, code improvements, better
management of sales teams) cleaning and improving code is a necessary first
step.

SPECIFICATIONS

Purpose of this commit is to rewrite code located and/or used in convert or
merge wizards. Indeed it holds unnecessary variables, dictionaries manipulation
that hides the real business flow, badly named variables, unclear methods, ...
Logic of those wizards seem quite simple but is hidden behind a wall of
bloated code.

Notably for wizards

  * try to set explicit arguments in methods;
  * less use of context values, replaced by arguments when possible;
  * try to make better use of lead2opportunity wizard in its mass wizard that
    inherit from it, notably by correctly calling super;

Notably for tools

  * ``get_duplicated_leads`` was just a shortcut to ``_get_duplicated_leads_by
    _emails``;
  * ``_get_duplicated_leads_by_emails`` is renamed to ``_get_lead_duplicates``
    because email is not the only way of finding duplicates;
  * try to make better use of record sets instead of propagating ids, notably
    for partner. For example input of ``_get_lead_duplicates`` or output of
    ``_find_matching_partner``;
  * ``_create_lead_partner`` rename to ``_create_customer``, and its sub
    method ``_create_lead_partner_data`` to ``_prepare_customer_values``;
  * ``handle_partner_assignation`` was difficult as its use is not documented
    and its docstring was not updated. Parameter have been renamed to be more
    explicit about what it does. Method is renamed to ``handle_partner_
    assignment`` as assignation has other meaning in English;
  * ``allocate_salesman`` is renamed to ``handle_salesmen_assignment`` to match
    the partner assignement and code is slightly cleaned;

No functional change should occur with this commit. Tests have been gradually
added to try to ensure behavior does not change.

LINKS

Task ID 2088565 (crm: from onchange to compute)
2020-03-23 11:42:11 +00:00
Thibault Delavallée 8b94dc17bf [IMP] crm: ensure initial data for convert tests
PURPOSE

As CRM is going to be updated (onchange -> compute, code improvements, better
management of sales teams) ensuring data integrity in tests is necessary to
avoid having hidden issues or tests difficult to debug.

LINKS

Task ID 2088565 (crm: from onchange to compute)
2020-03-23 11:42:11 +00:00
Mohammed Shekha 7636a0f267 [IMP] *: remove color field from pivot measure
in several models the 'color index' field shows up in the pivot measures,
color field in pivot measure doesn't make sense functionally, so remove
it from measure list, to remove it, add field explicitly in view and set
invisible attribute on it to remove it from measure list.

task-2153090

closes odoo/odoo#47485

Related: odoo/enterprise#9183
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-13 06:56:42 +00:00
fja-odoo 65e8473464 [FIX] web: change invalid font awesome icon
fa-delete does not exist => fa-trash

introduced by: 6692919d1e

task-2211899

closes odoo/odoo#48207

X-original-commit: 1b830bf1c7211dad5c93ac6929c7c395b32f3f90
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-23 14:18:30 +00:00
Swapnesh Shah 11171842d0 [FIX] stock: Display date in user's timezone and lang format
Fixes #33309
Before this commit, Traceability report displays raw datetime.

This commits consider User's  TZ + Datetime format configured in language.

closes odoo/odoo#47827

X-original-commit: 324db18dc9d5774d714c4b178468971b8bb36d6c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-17 14:34:09 +00:00
Adrian Torres 32fcc1b883 [REM] base: deprecate resolve_2many_commands
With the introduction of `new`, the use of `resolve_2many_commands` is
redundant, as it accomplishes the same function with the added benefit
of returning a record-like object whose API is more familiar than
`resolve_2many_commands` API.

closes odoo/odoo#37290

Related: odoo/enterprise#9409
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-23 15:14:11 +00:00
Adrian Torres 9befa3d245 [FIX] *: adapt code for resolve_2many_commands removal
This code adapts all business code instances of calls to
`resolve_2many_commands` and replaces them by calls to `new` which
returns a record-like object whose api is more familiar than the
`resolve_2many_commands` api.
2020-03-23 15:14:10 +00:00
Nicolas Martinelli 0d16e7331c [FIX] mrp, mrp_subcontracting: clean-up routes at uninstall
When `mrp` or `mrp_subcontracting` are uninstalled, the routes used as
'Picking Before Manufacturing Route' and 'Resupply Subcontractor' are
kept active. When the modules are re-installed, the routes are created
again, and appear duplicated.

The routes should be deleted if they are not used anywhere else.

opw-2222895

closes odoo/odoo#48206

X-original-commit: ce219b8375dc14daf9d380433d254b622a947773
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-23 14:18:10 +00:00
Xavier Morel 43f10313c6 [IMP] *: automatically brand PDFs (from PyPDF2) as Odoo
To avoid having to fixup half a dozen places where we're creating PDF
writers, and possibly ending up with new ill-configured writers in
the future, patch PyPDF2's own writer with a subclass setting /Creator
and /Producer.

Note that this will not affect non-post-processed PDFs generated by
wkhtmltopdf. wkhtmltopdf does not allow setting these properties[0][1], so
to fix this issue we'd have to alter _run_wkhtmltopdf to pass the
result through PyPDF2 in order to alter its metadata.

[0] https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2000
[1] https://bugreports.qt.io/browse/QTBUG-44451

closes odoo/odoo#29460

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-03-23 14:41:52 +00:00
jvm-odoo 2573d681dd [FIX] calendar: fix virtual ids present when recomputing models
Issue

	- Install Calendar, HR Recruitment & Studio
	- Go into Calendar
	- Create a recurring event
	- Edit it with Studio
	- Add a related field
	- Select Applicant > Assigned

	Traceback

Cause

	Applicant > Assigned is a stored field.
	Adding a stored field seems to triggers
	something that recomputes all models

	odoo/odoo:odoo/modules/registry.py@12.0#L307

	Then it calls the _write method of models.py
	which uses self.ids (which contains virtuals ids)
	for a SQL query.

	odoo/odoo:odoo/models.py@12.0#L3428

Solution

	Avoid all the virtuals ids to be retrieved
	when we have "update_custom_fields" in
	the context.

OPW-2214170

closes odoo/odoo#48208

X-original-commit: 112f976eb193020c093068fd30a004be3f5e9254
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-23 14:23:31 +00:00
Swapnesh Shah 3754cdf517 [FIX] hr_timesheet: Display task related to selected Project
Before this commit there was no Domain on field `task_id` on this form view. (This was already present on `Before this commit there was on Domain `)

After this commit user can select the Task of the Selected Project only.

closes odoo/odoo#48170

X-original-commit: 3c5a23118138bedb3d956f98ec8e48357ca201e2
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-23 10:18:10 +00:00
Antoine Prieels 12fd8c37fd [ADD] pos_six: Six payment terminals with TIM
Deprecate MPD integration for Six payment terminals and replace it
with TIM because:
- MPD broadcasts connection messages to the network so having
  multiple terminals and MPD servers in the same network results
  in connection issues
- TIM has a JS SDK so it doesn't require an IoT Box.
- MPD supports only Yomani and Yoximo terminals while TIM also
  supports Ingenico.

closes odoo/odoo#46789

Taskid: 2188566
Related: odoo/upgrade#903
Related: odoo/enterprise#8994
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-03-23 09:29:52 +00:00
Antoine Prieels 6413ef6955 [REV] hw_drivers, hw_posbox_homepage, pos: Remove MPD
This reverts commit 9d43308a8f6b521d3d18f7fc472303f58f56a0c3.

No one should be using MPD in production at the moment but
we'll still leave it in the buiold of the Box, just to be sure.

X-original-commit: 129101815d5846d5b53148546b19bdd791f22aac
2020-03-23 09:29:52 +00:00
Rémi Rahir 5094cdc9f7 [FIX] iap: limit force_create at last step
The modification introduced in 5307f47d975c3b3ebd87c7f7e2248802a1aa5be7
was not properly managing the 'force_create' argument. When it is set to
false, we only look for existing accounts with the current cursor and
end up returning an empty recordset when the account was created during
the same transaction. Ex:
// Do stuff
IapAcc = self.env['iap.account']
IapAcc.get('my_service')
IapAcc.get_credit('my_service')
// Other stuff

closes odoo/odoo#48201

X-original-commit: c78070dc22f99867b4b1f3a52cd11543da571fe4
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-03-23 13:41:18 +00:00
fw-bot 94fee8a8dd Cherry pick of b0c5370fd25191b4e537805b006fba02fffe2b23 failed
stdout:

stderr:

closes odoo/odoo#48197

Error: could not apply b0c5370fd25... Revert "[FIX] web, purchase, sale: fix no currency in calendar view"
Hint: after resolving the conflicts, mark the corrected paths
Hint: with 'git add <paths>' or 'git rm <paths>'
Hint: and commit the result with 'git commit'
X-original-commit: e8d6f1eae0f4f9c0f4df78553b7d51a03087940f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-23 13:17:51 +00:00
Benjamin Vray 1e35fffc89 [FIX] web_editor: get size of resizable elements on mouse down
Get the elements size also on mousedown. Because before that, the
size was only obtained on the start method when some elements did not
yet have its actual size. Example: elements in inactive slides in the
carousel snippet.

task-2162952

closes odoo/odoo#48193

X-original-commit: 2a36c684bb33704e46a6f30b5c501043683da67d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-23 12:42:02 +00:00
Hardik Prajapati 3998fa8dc1 [IMP] web: removed extra space in export field list
before this commit:
when manually adding field in export wizard, string has extra space in
begining.

after this commit:
manually added field in export field list doesn't contain any extra
spaces.

task-2065433

closes odoo/odoo#36759

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-09-12 10:01:47 +00:00
Adrian Torres 02327d8a6b [IMP] base: warn user about the consequences of uninstall
This commit adds a warning banner near the bottom of the uninstall
wizard warning the user of the consequences of module uninstallation and
advising him to try it first on a duplicate database so as to avoid
borking the database.

The Cancel/Confirm buttons were also swapped and the Cancel one was
made primary to avoid mindless "next-clicking"

closes odoo/odoo#33396

Task-id: 1824392
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-23 12:26:56 +00:00
Priyanka Kakadiya 85c707e684 [IMP] base: sort actions by sequence if sequence available
before this commit:
actions are not showing as per the sequence, like:
1) Other actions (delete, duplicate)
2) Windows actions
3) Server actions (without sorting by sequence)

After this commit:
Server actions are sorted by the sequence, like:
1) Other actions (delete, duplicate)
2) Windows actions
3) Server actions (with sorting by sequence)

task-2005419

closes odoo/odoo#39872

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-23 12:15:38 +00:00
Jinal PatelandMohammed Shekha 8f8c93b68a [IMP] base: display full name of the field in import warning
Before this change, if an error occurs while trying to match / import
a sub-field e.g. order_line/product_id, only the name of the top-level
field is showing when displaying the error e.g. "Order Line", which
lacks precision and makes understanding and fixing the issue more
complicated.

After this change, the entire field path should be displayed, e.g.
"Order Line / Product" in the example above.

Task-1906700

closes odoo/odoo#33031

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-03-23 11:51:30 +00:00
Martin Trigaux 800db7405c [FIX] website_slide: correct frenglish
closes odoo/odoo#48185

X-original-commit: 3ad726f3019e4aa6f7043ef08bf4fae8eec49a09
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-23 11:29:34 +00:00
Hiral Bhavsar 73834a659c [IMP] calendar, web: private events shouldn't be editable/deletable
Before this commit, when user attempts to edit or delete a private
event without being an attendee, it raises an access right error.

This commit disables edit and delete buttons in this case, in
addition to hide event details.

task-2151150

Closes https://github.com/odoo/odoo/pull/42569

closes odoo/odoo#42569

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-03-20 10:09:10 +00:00
william 3e9293e0e8 [FIX] l10n_lu: wrong account type details
Followup of task 2213464

closes odoo/odoo#48180

X-original-commit: 4df8d145c34ba0db153609e3a213c42dae6bda51
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-23 10:59:17 +00:00
Nicolas Martinelli c2cd71f576 [FIX] payment_sips: rounding error
- Activate SIPS
- Make a payment of 263.90 on the eCommerce

The SO is not confirmed because there is 0.01 of difference.

This is due to the fact that 263.90 * 100 = 26389.9999...

Using `round` instead of `int` prevents truncating the value.

opw-2179123

closes odoo/odoo#48169

X-original-commit: 60f9cea444df37e685b7f4312c9ff28c395822b3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-23 10:11:08 +00:00
Xavier Morel d418bff698 [FIX] core: make accessing fields from __str__ possible
Because CacheMiss calls str() on the record it's given, it's not
possible to override __str__ and get field values: on the first cache
miss (= the first field access) we're going to blow the stack:

* any random field is accessed
* and faults
* which creates a CacheMiss
* which stringifies the record
* which accesses a field
* which faults
* which creates a CacheMiss
* etc...

Fix:

* move the basic Model's stringification to repr(), which is
  implicitly called on str() if no __str__ is specified, for historical
  reasons we were doing the opposite
* use repr() when initialising CacheMiss

closes odoo/odoo#42966

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-03-23 10:53:34 +00:00
Rémy Baranx (bar) af67c53582 [IMP] sales_team: remove read ACLs on crm.tag model
Indeed they have no use of that model that should be limited to sales people.

Task ID 2191276

closes odoo/odoo#46976

Related: odoo/enterprise#9327
Related: odoo/upgrade#947
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-23 09:08:59 +00:00
Rémy Baranx (bar) fd4798195d [IMP] crm, sales: add crm tags on sale orders
As the crm.lead.tags model shall be used in CRM and/or Sales apps,
it has been moved to the sales_team module, which is a depedency
of the CRM and Sales apps.

As these tags becomes more generic than just "lead tags", the model
has been renamed from crm.lead.tags to crm.tags.

Tags on sale orders were already present but not visible. They are
now visible in the "Other Info" section, and optionally in sale order
tree views.

When a quotation is created from an opportunity (CRM app), existing tags
are populated from the opportunity to the sale order (Sales app).

Views and demo data of several modules have been updated accordingly.

Task ID 2191276
2020-03-23 09:08:47 +00:00
Nidhi Patel 32ec8a974d [IMP] auth_signup: Allow to send reset password instructions to multi users
Currently,the action_reset_password is only available at form view
of res.user under the 'Send reset password instructions' button.

The purpose of this task is to allow admins to send password reset instructions
to multiple users at once from list view.

In this commit, we make action_reset_password available in the action menu of
list view with label 'Send password reset instructions' and  relabel the form
view button to 'Send password reset instructions'.

As when the user is created at that time it will send the 'accept invitation'
mail so here from list view we will always send the 'change password' mail even
user is never connected(state='new').

closes odoo/odoo#47454

Taskid: 2076526
Closes: #47454
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-23 09:16:22 +00:00
Kevin Baptiste fad3ed7ce4 [FIX] sale_timesheet: change SO on project
The "Create Sales Order" button was not displayed again when the
original SO was deleted. Thus, it was not possible to link a new SO to
the project.

closes odoo/odoo#47397

Taskid: 2206862
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-18 14:09:01 +00:00
Raphael Collet fd50ba9fb8 [IMP] core: do not recompute stored field on new record
The use case is a cache miss of a stored field with compute on a new
record with origin.  The field should be computed only when explicitly
triggered, i.e., when a dependency has been modified.  Otherwise it
should be fetched from the origin record.

closes odoo/odoo#47353

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-23 09:04:59 +00:00
Nisha patel 8978b0bc8f [IMP] web: Show company icon on property(company dependent) field
Purpose Of the task is, we need a visual cue on those fields to let
the user know that their value is company-specific.

So, in this commit On company depedent field we added a building
icon with title 'Values set here are company-specific' next to the
label in the form view.

closes odoo/odoo#47178

Taskid: 2001748
Closes: #47178
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-23 08:48:02 +00:00
Odoo's Mergebot fe74b0b6f4 [MERGE] base, various: remove unused views (limited to Marketing applications)
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that
are not used anymore because generic one is always taken. In
this merge we remove dead views linked to Social/Marketing
applications.

LINKS

Task ID 2196317 (Social/Marketing specific)
Community PR odoo/odoo#48086
Upgrade PR odoo/upgrade#966

Followup of odoo/odoo#46435 (actions cleaning)
Followup of odoo/enterprise#8846 (actions cleaning)
Followup of Task ID 2196183 (actions cleaning)

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-23 10:00:57 +01:00
Victor Feyens 067034453b [REF] mass_mailing_sms: remove unused views
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that are not used
anymore because generic one is always taken.

LINKS

Task ID 2196317 (Social/Marketing specific)
2020-03-20 15:01:39 +00:00
Victor Feyens bd748c10be [REF] crm: remove unused views
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that are not used
anymore because generic one is always taken.

LINKS

Task ID 2196317 (Social/Marketing specific)
2020-03-20 15:01:39 +00:00
Victor Feyens bbce92b436 [REF] base, various: remove unused views
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that are not used
anymore because generic one is always taken. Notably

  * view_partner_short_form: a short form view on partner that is not used
    anywhere anymore. Indeed it has a priority of 2 whereas default form view
    has a priority of 1 (lower better). It is not referenced in actions
    anymore. It is therefore dead.

LINKS

Task ID 2196317 (Social/Marketing specific)
2020-03-20 15:01:39 +00:00
Nisha patel e428d473c3 [IMP] various: Allow to select only internal users on m2x field with res.users
Purpose of this task is to prevent users from setting portal users on
internal documents by mistake, and preventing noise and performance
issues resulting from loading all the portal users in those fields.

This commit fixes internal many2x fields to res.users which are now
restricted to internal users by setting domain (share=false) on form view.

closes odoo/odoo#47553

Taskid: 2172779
Related: https://github.com/odoo/enterprise/pull/9204
Related: odoo/enterprise#9204
Closes: #47553
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-16 10:28:35 +00:00