Task 2085023
* Add a field that replaces the context to get the ids of the
entries/invoices
* Remove move_id, we can use move_ids instead
* Add text to explain invioces/bills will create refunds
closesodoo/odoo#38857
Related: odoo/enterprise#6263
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
In order to see the added value of digest in demo mode some demo data about
livechat conversations are added. Rating is also added.
Task ID 1883428
closes#29764
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose of the task is to add a Live Chat section in the weekly digest email
template. Following value related to livechat are therefore added in digest
emails:
* hit % of ratings;
* amount of conversations he handled;
* hit time to answer;
Task ID 1883428
closes#29764
* root the base.partner.merge wizard's logger in odoo.addons so the
"odoo" logger configuration properly applies to it
* update the default logging configuration to set the root logger
rather than independently set the odoo and werkzeug loggers
closesodoo/odoo#40872
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The slide.slide "_compute_slides_statistics" method is missing the 'slide_ids.sequence' trigger.
It should be specified for cases when one of the slide_ids changes category (determined by the
sequence).
This can cause some CacheMiss and seem related to nondeterministic errors on the runbot.
PR #40705
Task#2123711
Runbot build error ID 247
closesodoo/odoo#40867
X-original-commit: 1994f544694051a767ecda88a12dee5c5579add2
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
before this commit:
when creating a product from frontend and editing the product and
delete image, it doesn't get any url thus generating the traceback.
after this commit: if url is not defined then return None from
ir.qweb.field.image field converter
task-2063293
closesodoo/odoo#40866
X-original-commit: 2efad751e66931fd25a41c1b7d46865bccbc774a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, the computation of kpi for last week, last 30 days and
previous period comparison was wrong due to cache. Indeed as first value
was in cache, other values were taken directly from cache itself instead
of recomputing each value based on start_date and end_date of the computation
timeframe.
As digest fields are computed fields used a bit off-side, let us manually
invalidate the cache before computing a kpi so that it correctly computes
the timeframe values.
Task ID 1883428
closes odoo/odoo#40861
Closes: #40834
X-original-commit: 2966ee59cabc2bbae91e4ac4701fc393bc3770ae
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
steps to reproduce:
-change decimal accuracy for "Product Price"
-create a price list with fixed price
-the fixed price field does not takes the decimal accuracy into account
this was working in V11 and V12
fixed_price was a float field like other price fields
previous behavior:
fixed_price is a monetary field
when setting up a fixed price for a pricelist, it takes into account
the precision from the current currency
current behavior:
fixed_price is a float field
when setting up a fixed price for a pricelist, it takes into account
the proper decimal accuracy setting ("Product Price")
opw-2121964
closesodoo/odoo#40807
X-original-commit: 27b90fc7389cfc7fe4a9f4f17dea74283a45af44
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
before this commit: when creating a product from frontend and editing
the product and delete image and save edition, it throws traceback,
because ir.qweb.field.image doesn't get any url and due to which it
throws traceback.
after this commit: if url is not defined in ir.qweb.field.image field
converter then return None
task-2063293
closesodoo/odoo#40638
X-original-commit: 896127a6528fa59f7f385019e296acd5db585321
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- Group the SO list view by Analytic Account
- Go to a SO
- Click on the stat button 'Timesheets'
Traceback because the field `analytic_account_id` is not on Timesheets.
opw-2124539
closesodoo/odoo#40840
X-original-commit: 3f17dd36e8369c21e55009e5492438cb9f9ea53d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Excel can store data in multiple tables, each is called a sheet. Odoo
was only importing the first sheet making the process to import a file
containing multiple sheets cumbersome.
It is now possible to select the sheet in the import options. By default
the first sheet is selected.
closesodoo/odoo#40728
Task: 2043768
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When you create a pos order, it is possible that the request timeout or
the client loose the connection with the server, that will lead to not
have the server_id of the order sent to the server. So when the client
will try to synchronize the order again, it'll not send the server_id to
the server, and the server will create a new order which is a duplicate
of the one created when the client lost the connection.
To avoid this duplication, we are using the pos_reference to find if
there is an existing order like in 12.0 to avoid duplication.
closesodoo/odoo#40837
Task-id: 2127656
X-original-commit: cddf29e70008dc1fcb6ec41b4dfc739d4d06cf6d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce the bug:
- Let's consider Today = 21/11/2019 and Employee E
- Create a new hr.leave.type LT and set a validity from 01/01/2020 to 31/12/2020
- Set mode = Free Allocation Request and Validation = No Validation
- Try to create leave allocations for LT
Bug:
It was impossible to create a leave allocation for LT because Today < 01/01/2020
So it was impossible to allocate future leave.
We had to wait the 01/01/2020 to make the allocation of LT leaves
opw:2126300
closesodoo/odoo#40815
X-original-commit: 2b1810daeb13bba8405b663cf401ffab6eba5e24
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Below points are improved in automated action
- Set no_create on model_id, crud_model_id, partner_ids, and channel_ids
- Set widget many2many tags and change string for trigger_field_ids
- Rename 'Trigger Condition' to 'Trigger'
- Change on_change_fields into a many2many to ir.model.fields
- Set 'Hours' as default of field trg_date_range_time
- Rename label of crud_model_id to 'Target Model'
- Rename label of sms_mass_keep_log to 'Log as Note'
- On creation of template set the default model
- Hide the 'Security' tab
- Set no_create on fields resource_ref and col1
- Make 'value' readonly when col1 is not set
- Rename 'Link using field' to 'Link Field'
Task-2082503
closes odoo/odoo#39622
Closes: #39622
Related: odoo/enterprise#6515
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Reproduce the issue:
- Install eCommerce app
- Publish a product to your website
- Add the product in your cart
- Unpublish/make unsellable/archive the product
The product is still in the cart and the checkout process can be done.
Cause: There is no check for invalid products before displaying the cart
This commit remove the invalid products while loading the cart.
OPW-2092541
closesodoo/odoo#40241
X-original-commit: ab9290e39c2d2b9eb6d6f9972c1c8b546263edfd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
After the rainbowMan issue was fixed here: e5bc2e7, steps were consumed
on 'click' events. This caused an issue with the drag and drop event
(which breaks tour, because it is expecting a click event). If the user
dragged an element, thetip was not getting consumed as no click event
was triggered.
closesodoo/odoo#40819
X-original-commit: 3f458fe06e6a629edc72428eab749068c2eba1ba
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
A customer reported an issue when he tried to add a link on the
blog covers of his blog. The link is displayed as text and it's added
to all the covers.

According to SBU, the user should not do this.
This commit prevents the user from editing a blog cover.
OPW-2119924
closesodoo/odoo#40816
X-original-commit: 576fe145941add48481ebbb066cd9715dc83fb55
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Archived users are inactive, so we shouldn't be able to ping them.
Task-2046885
closesodoo/odoo#40814
X-original-commit: 8169e34a2230b9a2aff359dc6a69b59c04fc9908
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In the pivot view of report.pos.order that is a view mainly over
pos.order, the "Count" measure is a little rubish giving more or less
the number of different products in the grouped order lines.
With this changeset, we have the field "Order" as measure that allow us
to know the number of orders a grouping is corresponding to.
opw-2127275
closes#40723closesodoo/odoo#40804
X-original-commit: 431114d4f574d0fe9df745a7696f73f941c42ad3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, when a user was on leave, the out of office
message displayed the current leave-in-progress date-to.
This information was misleading when the user on leave used different
types of leaves, because other users would expect their colleague to
come back from vacation sooner.
For instance, suppose that user is on vacation on October from 18-22
(included), and from 25-28 (incl.), with a week-end from 23-24:
+--------------------------------------+
| OCTOBER calendar |
+--------------------------------------+
| Mo. Tu. We. Th. Fr. Sa. Su. |
| |
| |
| on-leave week-end |
| <--------------------> <------> |
| 18 19 20 21 22 23 24 |
| |
| on-leave |
| <---------------> |
| 25 26 27 28 29 30 31 |
+--------------------------------------+
On November 20, other users would see "On leave until _November
22_ included", instead of _November 28_.
This commit fixes the issue by taking into account consecutive
holidays to compute the actual end date of vacation.
Task-2002525
closesodoo/odoo#38388
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Added Chart of Accounts, taxes and other related data
closesodoo/odoo#40806
Task: 42243
Courtesy: www.vitraining.com
X-original-commit: 046f7039618d00a1b5d4a08e11b67e9788620bc6
Signed-off-by: Josse Colpaert <jco@openerp.com>
If odoo is started with a log-level of "warn" of higher, the logging
record is not emitted at all and thus the handler added by assertLogs
has nothing to process at all. As a result the test will fail.
closesodoo/odoo#40802
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Current activity types master data cannot be unlinked through a quite harsh
override of unlink using xml id existence, introduced at 2602642a78.
Some of them are real master data, other could be unlinked if users want it.
Finally custom activity types may cause errors when removed if used in some
side models like server actions or automated actions.
To allow more flexibility we remove the removal constraint and implement
a fallback mechanism. It is implemented in mail.activity.mixin when calling
activity_schedule(xmlid, ...). If the given xmlid is not found
_default_activity_type() specifies the default activity to use. It can
be overridden in modules if some specific behavior is wanted.
e.g.
def _default_activity_type(self):
"""Define a default fallback activity type when xml id not found
only used in in activity_schedule() for now.
"""
try:
return self.env.ref('mail.mail_activity_data_todo')
except Exception:
return False
In this commit we also
* restrict deletion of activity type (hr.plan and ir.actions.server);
* fallback on default activity type if xmlid ref not found in
activity_schedule;
* correct calls to activity_schedule and replace some manual creation calls
by activity_schedule;
Task ID 1961156
PR #39013
Related: odoo/enterprise#6238
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
`name` field can be required and falsy `data.name` should not be
added as default in context or it warns for missing required field.
Task-2052536
closesodoo/odoo#35880
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit disables quick create in calendar view for
`mrp.production`, because it uses name field for storing
`ir.sequence` and calendar quick create also uses `name` field to
create quick create record.
So in this case, even if user enters summary field, it will be replaced by
`ir.sequence`, thus quick create doesn't make sense here.
Task-2052536
It was discussed previously from:
- https://github.com/odoo/odoo/commit/b79d05fff0cacb4d99ebc1b60f44d8dab757b806
I quote Olivier Dony commit message:
"""
Having it in INFO should be sufficient for its purpose, and will avoid
impacting all CI builds done on a system that does not have the lib
installed.
For the record, this is not a hard requirement because the lib was not
available in Debian stable packages at the time of release. It is only
enabled on demand for those who want the feature and can install it
manually.
Fixes#22426Closes#22459
"""
closesodoo/odoo#40788
X-original-commit: 0394f5e95702087b38357070aad43f2b477c374e
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
==================
Before this commit
==================
No tags in account templates in CoA for Cash Flow Statement
=================
After this commit
=================
Tags Operating Activities, Financing Activities, Investing &
Extraordinary Activities Link to respected accounts
Related to task: #1973937Closes#33256
Signed-off-by: Josse Colpaert <jco@openerp.com>
Create and Edit Buttons are not needed on views being opened from
the Product Margin report
Fixesodoo/odoo#39069closesodoo/odoo#39072
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This is a performance fix. It avoids the cost of XML/HTML translations
for fields that may not be necessary when prefetching fields on records.
This patch marks such fields as non-prefetchable by default.
The code that changes the attribute `translate` on HTML fields (from
`translate=True` to `translate=html_translate`) has been adapted to
allow the setup of textual fields to mark the field as non-prefetchable.
Jairo Llopis made a comparative benchmark: evaluating `name_get` on
`event.event` records. The method needs the field `name` and without
the patch, the prefetching mechanism reads the translated HTML field
`description` as well. This patch speeds up the benchmark from 5800ms
to 800ms (see https://github.com/odoo/odoo/pull/37967#issuecomment-538364011).
closesodoo/odoo#40771
X-original-commit: e5ee5e5b65f85d66c8d59594ead9eece172c4282
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Pedro Baeza <pedro.baeza@tecnativa.com>
Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com>
PURPOSE
Purpose is to perform some cleaning in survey models: naming, ordering,
dead code [0]. As new features are about to land in survey, notably live
interactions [1] and new survey building [2] performing a pre cleaning
is necessary [3].
SPECIFICATIONS
This merge contains three commits doing
* code move;
* dead code removal;
* templates split to ease understanding and reading;
See sub commits for more details.
LINKS
[0] Related to Task ID 2144393 (surveys split / cleaning)
[1] Task ID 1972640 (live interactions)
[2] Task ID 2119587 (new frontend for building surveys)
[3] Task ID 2061901 (survey models cleaning and preparation)
PR #40623
Related: odoo/enterprise#6853
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When a pos session is closed, the difference and transactions of cash
control are not good anymore, because it is based on the statement
linked to the cash payment method, and it is modified during the
validation of the session to create a balanced account move.
So we are now storing the values in fields, to keep history of the
closing control
closesodoo/odoo#35286
Task-id: 2032173
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
PURPOSE
Purpose is to perform some cleaning in survey models: naming, ordering,
dead code [0]. As new features are about to land in survey, notably live
interactions [1] and new survey building [2] performing a pre cleaning
is necessary [3].
SPECIFICATIONS
Remove dead code :
* split templates into 3 main files
* survey_templates: holding main templates when taking a survey;
* survey_templates_statistics: graph and statistics (results) of a survey;
* survey_templates_management: templates linked to corner cases and
error management (403, closed survey, ...) as well as tools and utility
templates;
* rename template ids to ease code understanding;
No functional changes should occur with this commit. It contains only
code move, not any change at all.
LINKS
[0] Related to Task ID 2144393 (surveys split / cleaning)
[1] Task ID 1972640 (live interactions)
[2] Task ID 2119587 (new frontend for building surveys)
[3] Task ID 2061901 (survey models cleaning and preparation)
PR #40623
PURPOSE
Purpose is to perform some cleaning in survey models: naming, ordering,
dead code [0]. As new features are about to land in survey, notably live
interactions [1] and new survey building [2] performing a pre cleaning
is necessary [3].
SPECIFICATIONS
Remove dead code :
* old code bits not used anymore since several code cleanings have
already been performed;
* use tools when possible instead of manually checking stuff like
email validation;
* clean unused imports;
No functional changes should occur with this commit. It contains only
code move, not any change at all.
LINKS
[0] Related to Task ID 2144393 (surveys split / cleaning)
[1] Task ID 1972640 (live interactions)
[2] Task ID 2119587 (new frontend for building surveys)
[3] Task ID 2061901 (survey models cleaning and preparation)
PR #40623
PURPOSE
Purpose is to perform some cleaning in survey models: naming, ordering,
dead code [0]. As new features are about to land in survey, notably live
interactions [1] and new survey building [2] performing a pre cleaning
is necessary [3].
SPECIFICATIONS
Code move main points
* move fields to have them grouped by main use;
* move methods to have them grouped by main purpose;
* reorganize some line breaks to ease reading files;
Globally this code move is done according to our famous guidelines.
No functional changes should occur with this commit. It contains only
code move, not any change at all.
LINKS
[0] Related to Task ID 2144393 (surveys split / cleaning)
[1] Task ID 1972640 (live interactions)
[2] Task ID 2119587 (new frontend for building surveys)
[3] Task ID 2061901 (survey models cleaning and preparation)
PR #40623
Non-ascii characters in LDAP don't cause a python unicode string in
returned ldap entries, this commit fixes this.
Before this commit, further string operations on ldap values with
non-ascii characters fail.
closesodoo/odoo#40761
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
On mobile, there was no way to create a new column in the kanban view. This
was specifically annoying in the Project app (the user was able to
create the project but couldn't set its stages).
This commit enables this feature by adding a `+` icon at the end of the
tabs. This button opens a quick-create column widget.
If there is no existing column (for example in a newly created project),
this quick-create column widget is opened by default.
Finally, this commit improves the processing needed for the swipe
animation between the columns.
Task ID: 1893137
closesodoo/odoo#40722
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Co-authored-by: Ankit Sathvara <asa@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Romain Estievenart <res@odoo.com>
Reproduce the issue
- Install Projects
- Create a project
- Create a task with a deadline
The deadline format is correct in the form view but not in the
kanban view.
Cause
In the kanban view, there is some code applied on the `date_deadline`
field to add a class when the deadline is near.
As it uses a `span` with a `t-esc`, the only way to get the date
is to do `record.date_deadline.raw_value` which return the raw
value of the datetime object (a big string with all the infos).
This commit creates a char field for the formatted date and uses it
only for the display.
OPW-2122928
closesodoo/odoo#40707
Related: odoo/enterprise#6832
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Purpose
=======
We want to allow different approvals for allocations and leaves of a same type.
e.g. In case of compensation days, a manager would approve the
allocation request, but would later not approve leave requests.
Specification
=============
Allocation modes
----------------
No change here except renames.
1. No limit (employee doesn't need an allocation to request a leave)
2. Allow employee requests
3. Fixed by Time Off Officer
Allocation approval
-------------------
A radio field to choose the approval mechanism
appears if the employee is allowed to request an allocation.
The following approval modes are possible:
1. Time Off Officer
2. Employee's Time Off Manager (leave_responsible_id)
3. Employee's Time Off Manager and Time Off Officer
These options are the same as leave approval options
(except the missing "No Validation").
If option 1 or 2 is selected, a o2m field should
allow to select which Time Off Officer is responsible
for approving those allocations.
Allocation approval policy is the same as the leave approval policy.
Task id: 1936742
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#35446
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>