Commit Graph
141507 Commits
Author SHA1 Message Date
Xavier BOL (xbo) 9fed5964a6 [IMP] {hr,sale}_timesheet: use the container for project settings
Before this commit, we create a container to add the new options in the
project settings.

This commit removes the container to put these options in the default
container.

task-2387984

closes #66740
2021-03-12 14:15:36 +01:00
Xavier BOL (xbo) 63777d3c3f [IMP] project: check no cyclic task dependencies
Before this commit, if we have for instance 3 tasks called A, B and C
where A depends on B and B depends on A then we have a cyclic dependency.
Another example with the same tasks, we can have a cyclic dependency if
A depends on B, B depends on C and C depends on A.

This commit checks we have no cyclic dependencies when the user adds a
dependency on a task.

task-2387984

closes #66740
2021-03-12 14:15:36 +01:00
Xavier BOL (xbo) 1c691c26a8 [IMP] project: filter task list for depend_on_ids Many2many field
Before this commit, we can add the same task as dependency or the tasks
in which the allow_task_dependencies is disabled.

This commit adds a domain to filter the task list when the user wants to
add a task as dependency.

task-2387984

closes #66740
2021-03-12 14:15:36 +01:00
Xavier BOL (xbo) d2dadbcc3b [IMP] project: add task dependencies feature in project.task model
This commit adds two new fields in the project.task model.
The first one called 'allow_task_dependencies' is a related field to the
one project.project model. The other field called 'depend_on_ids' is a
Many2many field will contain the tasks which the current task depend on.

In the form view of project.task model, these fields are added.

task-2387984

closes #66740
2021-03-12 14:15:36 +01:00
Xavier BOL (xbo) 70d7f31d58 [IMP] project: add task dependencies feature in project settings
This commit brings a new feature for the Project App and project
configuration. This feature is called "Task Dependencies" and it allows
to the user to determine the order in which to perform tasks in a
project.

task-2387984

closes #66740
2021-03-12 14:15:36 +01:00
fja-odoo 20491edb72 [FIX] stock_landed_costs: fix allowed pickings
The landed cost journal (lc_journal_id) is not required by default as a
result it is possible to create a landed cost with no account_journal_id
and thus no company_id this will make the query in
_compute_allowed_picking_ids fail.

Issue caused by: #63742

closes odoo/odoo#67675

X-original-commit: 3b9824f57d2bbe30a8a3f63d0decb2101b6b0a90
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-11 12:15:03 +00:00
Jorge Pinna Puissant 304eef3ced [FIX] base: traceback on testing outgoing mail server connection
- Settings > Technical > Email > Outgoing Mail Servers;
- Create a new serve with no security;
- Test connection.

Before this commit,  a traceback error is raised. This occurs because
SMTPException don't have 'smtp_error'.

Now, the UserError is shown correctly.

opw-2464796

closes odoo/odoo#67712

X-original-commit: f0e478a154b1f15146c7d95e0ffe146bb22b8cae
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-03-11 16:44:30 +00:00
Tymoteusz Motylewski 24d9b5990e [CLA] Sign contributor license tmotyl
closes odoo/odoo#67717

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-03-11 18:06:30 +00:00
Tymoteusz Motylewski df4015f5f5 [IMP] tools: remove unneded dot from CLI group header
Internationalisation options. :
is now
Internationalisation options:
2021-03-11 18:06:21 +00:00
Bruno Zanotti (ADHOC) 00816cf0d7 [IMP] l10n_ar: report name of document types 60/61
Add report name and document prefix on l10n_ar data for
the following documents:
 - (60) CUENTAS DE VENTA Y LIQUIDO PRODUCTO A
 - (61) CUENTAS DE VENTA Y LIQUIDO PRODUCTO B

closes odoo/odoo#67720

X-original-commit: f61877763c601ee80107d92a414dd9ca13132f0e
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-11 17:30:25 +00:00
Josse Colpaert b2c7799cba [IMP] l10n_co: reuse identification types from l10n_latam_base
We also remove the country_id for the foreign/external_id as otherwise,
it would not be selectable if the country_id of the partner is not Colombia.

closes odoo/odoo#67711

X-original-commit: 46bf5b27aaf374d6fa458170bc936251b8595c24
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-11 16:42:03 +00:00
Rémy Voet (ryv) 1c0dec6d58 [ADD] barcodes_gs1_nomenclature
In order to integrate and use GS1 nomenclature into `stock_barcode`,
adds a new module with GS1 nomenclature and rules, and overrides parsing
methods.

task-1968113

closes odoo/odoo#65858

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Co-authored-by: ryv-odoo<ryv@odoo.com>
2021-02-26 08:21:08 +00:00
Rémy Voet (ryv) a09e370ec5 [REF] barcodes: refactor check digit computation
To prepare gs1-128 feature, refactors the check digit computation.
Also, does some cleanings:
  - Removes unusused check_ean method;
  - Converts comments into docstrings;
  - Makes needed changes to avoid linter errors (PEP 8).

task-1968113

Co-authored-by: ryv-odoo<ryv@odoo.com>
2021-02-26 08:21:08 +00:00
svs-odooandryv-odoo d1abf31fb4 [MOV] barcodes: split barcodes.py
Separates `barcode.nomenclature` and `barcode.rule` in their own file.

task-1968113

Co-authored-by: ryv-odoo<ryv@odoo.com>
2021-02-26 08:21:08 +00:00
svs-odooandryv-odoo 2c2e85005f [ADD] barcodes: add tests
In anticipation of refactoring, adds some tests to be sure all still
keep working as it should do.

task-1968113

Co-authored-by: ryv-odoo<ryv@odoo.com>
2021-02-26 08:21:08 +00:00
Romeo Fragomeli 841d29f129 [FIX] web, account: dashboard's links are not well placed on mobile
Before this commit, on mobile in the Accounting app, the link in a
kanban card was not well placed.

After this commit, in mobile we consider a link as a block so he is
moved below.

Steps to reproduce:
* Open Odoo on Mobile
* Go to Accounting => Bug ("Create Manually" is in a strange position)

Task ID : 2200168 (4.a)

closes odoo/odoo#67692

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-03-11 16:22:29 +00:00
Qiuyu (QHO) 12660438c0 [FIX] mail: fix array check in model_field
closes odoo/odoo#67702

X-original-commit: f9d0614f28625bd8dfdd5710e465b65935ad5d38
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-11 15:48:15 +00:00
fw-bot ad039ebeec [FIX] l10n_cl: return a different domain in available document types
when the partner is Tesoreria de la República, and exclude the credit note.

closes odoo/odoo#67630

X-original-commit: 8ca3ea063050f2ab2d19cce8a68116489872a734
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-11 14:54:50 +00:00
Romeo Fragomeli b11eabbfd7 [FIX] web: calendar: avoid rerendering on resize
Before this commit, when a calendar view was resized the full view was
rendered again to recalculate the resize.

After this commit, we now set manually the new size.
This avoid to lose the current position-y in the calendar.

Steps to reproduce:
* Open a window (not maximized)
* Go to calendar (day/week view)
* Scroll to the end of the calendar
* Resize the window => the calendar returns to the begging.

Note:
By the same way it also fixes a performance issue in TimeOff's render as
it makes an RPC to calculate the popover for the year view.

Task ID: 2200168 (5.a)

closes odoo/odoo#66387

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-03-11 14:59:45 +00:00
Goffin Simon 46c4e6fc56 [FIX] sale: Wrong untaxed_amount_to_invoice
Steps to reproduce the bug:

- Let's consider an included tax T (10%) and a product P (11€) with invoicing policy based on delivery
- Create a sale order SO with one line L with 2 P and T
- Confirm SO

Bug:

The untaxed_amount_to_invoice was 20€ on L instead 0€
The untaxed_amount_to_invoice must be 20€ when the delivery is processed

opw:2457660

opw:2457660

closes odoo/odoo#67682

X-original-commit: d6ed6b9fa204fcfcabf1c1c330b5ae8ada34744c
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-11 13:08:11 +00:00
Thibault Delavallée 8690bd6add [IMP] crm: make query counter tests informative
Those are not launched anymore by default. Indeed framework and code followup
is not ready for that level of details.

Task ID-2480727

closes odoo/odoo#67678

X-original-commit: f950399e6e4aaaf88b743abfeb37a2de4c99fa5c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-11 12:20:53 +00:00
Thibault Delavallée 8f812583cc [FIX] crm: bump query counters
According to last runbot state. Should probably be removed someday as actually
there is not much gain with those tests.

X-original-commit: dc05f873571ca60b7fbbb701a86760f13a6d3172
2021-03-11 12:20:53 +00:00
Laurent Smet 1bbb97bf55 [FIX] account: Always display inactive taxes on journal items
closes odoo/odoo#67657

X-original-commit: f7dc4a4c8c6700cfecebffa1ef516e29a46aef61
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-11 10:30:16 +00:00
Arturo Flores b7af1774b0 [ADD] l10n_pe: add Spanish translations
closes odoo/odoo#67656

X-original-commit: c72994ea297d755919a35011c2626ffad2a2dea8
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-11 10:29:03 +00:00
Katherine Zaoral 8fa1e671bc [FIX] l10n_latam_base: identification type default
Identification type  was always been overwrite by the _onchange_country even when just opening the contact form, this was always setting the is_vat identification type as default without taking into account if the user has defined their own default.:
* If Identification type is set and it is compatible with the country then we leave it as it is (this is the case the identification type has been set by a default).
* If Identification type is set but is not compatible with the country then compute and set the Identification type that is is_vat True for the country

Where country is the one set in the partner record, if not set will use the country of the move's company, if not defined then will use the country of the environment company

closes odoo/odoo#67628

X-original-commit: 8e9b1c404a71c0a7dce37c7f5f6ecef1396e0a1a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-10 18:29:15 +00:00
Goffin Simon 87fbc4faa2 [FIX] account: Entries from Expense journal
Steps to reproduce the bug:

- Create an Expense E
- Create a report R from E in the journal J (type=purchase)
- Generate the journal entry JE from R
- Go to Accounting Dashboard and click on J in the kanban view

Bug:

JE was not displayed in the entries filtered for J

PS: When creating a journal entry from an expense sheet, the move_type of the entry
is 'entry'.

opw:2474729

closes odoo/odoo#67674

X-original-commit: 31ca461ee3a6b9560fe6d78642e8fe5017b1085e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-11 12:08:08 +00:00
Julien Castiaux dddf1bc34b [IMP] models: Better error than apple and orange
The "TypeError: Mixing apples and oranges" error message is raised when
users are using recordsets from different models together. The error
message was confusing some users thus have been reworded to be more
explicit.

The initial proposal was to replace "apples" and "oranges" by "torchons"
and "serviettes" but it was rejected because the French are not capable
not to mixup the two. They suggested to instead replace "apples" and
"oranges" by "pain au chocolat" and "chocolatine", this was rejected
because none of us understood the difference between the two, they both
are couques.

closes odoo/odoo#62266

Task: 2366612
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-12-11 14:15:29 +00:00
Djamel (otd) a8f8999409 [FIX]base: fix domain of "user_id" field in res.partner
Steps to follow to reproduce the bug:
-Go to the Contact app
-Choose any contact
-In the contact form> go to the "sales & purchase" tab and try to assign a user in the "salesperson" fields

Problem:
You can choose any user regardless of their type. While normally we can only choose internal users

Solution:
Add a domain to the "user_id" fields to only see users of the kind "internal type"

opw-2468819

closes odoo/odoo#67642

X-original-commit: 1361686fe502be137a4757c9092fab4223d484f8
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-03-11 09:29:51 +00:00
Jeremy Kersten 82e80ee22e [IMP] website_sale: checkout - remove deprecated functions
closes odoo/odoo#67662

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-11 11:09:36 +00:00
Laurent Smet 6ffed37585 [FIX] account_check_printing: Fix 'amount_currency' field don't exist on account.partial.reconcile
Since https://github.com/odoo/odoo/commit/beccf82e09d536255d9d9cb9bfe58ebae2559843, 'amount_currency' is now 'debit_amount_currency' / 'credit_amount_currency'.

closes odoo/odoo#67645

Opw: 2444189
X-original-commit: 5e2c9badae8fa50cabd432d2b525278e95432e80
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-11 09:32:48 +00:00
Nicolas Seinlet b404ae6a55 [FIX] registry: avoid dropping indexes
When an index has name 'tablename_fieldname_index', this index is
dropped if the field has index=False.  This lead to dropping a
user-created index or dropping/recreating the index when index=True is
set in a dependent module.  Some info is logged instead.

closes odoo/odoo#67602

X-original-commit: 6a87318df296a11e3300723ca0c8b49c0dcf5fa7
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-03-10 14:56:16 +00:00
Nicolas Seinlet 5fa1256bb6 [FIX] registry: no name in constraint check
When table name is long enough, the foreign key constraint name computed
by odoo and the one by PostgreSQL are different, for the same table,
column and definition, are different. As an example,
base_partner_merge_automatic_wizard_res_partner_rel(partner_id) foreign
key is named
base_partner_merge_automatic_wizard_res_partner_rel_res_partner_id_fkey
in Odoo while it's
base_partner_merge_automatic_wizard_res_par_res_partner_id_fkey in
PostgreSQL. This difference trigger a useless foreign key drop/create.

closes odoo/odoo#67601

X-original-commit: 353b415c74da057d5e81cce4d309bebb5f0f2927
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-03-10 14:55:59 +00:00
Florian Gilbert e131ce8e54 [IMP] account: move lines group by move views improvement.
This commit modifies the views of the move lines grouped by
move. Its purpose is to optimize the UI.

Task ID: #2443795

closes odoo/odoo#66928

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-10 12:00:30 +00:00
Jeremy Kersten 3b9cd53660 [IMP] base: check fallback on AccessDenied
Before this commit, we only check if another endpoint can be serve in case of
404 not found. Idea was that each url has only one endpoint.

Fun effect is that if record doesn't exist, route doesn't match, so in reality
we had one endpoint but we fallback too to check if another match.

But it doesn't match a recurring case, when you archive a record, and want to
create a redirect for your seo and customer to another record, it is just
ignored because the url math a controller (that return 403 since you don't have
anymore the access right)

Since ask to the customer to delete the record is not always possible
(e.g. a product already sold) now we check if a fallback match for 403.

closes odoo/odoo#66030

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-12 08:46:31 +00:00
Samuel Degueldre ff8070033b [FIX] web_editor: show mimetype warning for illustrations
Previously, when clicking on an illustration in the editor, the image
options would be unavailable with a message saying that it was due to
technical limitations, and that the user should reselect the image in
the media-dialog for quality options to become available. This was
caused by the fact that in order to support more than one customizable
color in illustrations, they are now saved inside the database with an
url containing which colors are customizable inside the url's query
parameters. Since the endpoint that finds which attachment corresponds
to which image src was looking for an exact URL match, but query params
are trimmed on the client side before talking to the endpoint, they were
no longer matching.

This commit fixes that by searching for attachments whose URL matches
the provided one with or without any extra query parameters.

closes odoo/odoo#67625

X-original-commit: b26319c3c9409e8724fadeec80e63ea94dc8d599
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 17:59:34 +00:00
nie bb5052575a [FIX] website_sale: only show products of the current companies
Steps:
- Create a second company
- Go to Website > Products > Products
- Create a product for all companies
- Click the "Go to Website" smart button
- Click "Edit in Backend" in the top-right corner
- Change the product's company to the one you're not on
- Go to Visitors > Visitors

Bug:
Access Error:
The requested operation ("read" on "Product" (product.product)) was
rejected because of the following rules:

(Records: Two prod (id=42), User: Mitchell Admin (id=2))

Explanation:
It happens because of the rule `product_comp_rule` which prevents
reading a product from a different company.
This commit filters the visited products on the current companies.

opw:2467138

closes odoo/odoo#67614

X-original-commit: 984adb180ab1a255fac086fd61478141074e8d31
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-03-10 16:36:51 +00:00
Anh Thao Pham (pta) 30879f9ff1 [FIX] purchase_product_matrix: fix product onchange on PO form
- Install purchase_product_matrix
- Go to Purchase and create a PO
- In PO Line, type a text (i.e. test) in product field and use quick create option
Description and UoM fields should be updated following product creation, but they are not.
"onchange_product_id" is not triggered.

"purchase_product_matrix" module overrides "purchase.order" form view by replacing product_id
field by product_template_id field.
"_onFieldChanged" function should execute "_onTemplateChange" when product_template_id is changed
and if id is set, which would trigger "field_changed" on product_id, but it cannot be done after
a quick create as id is false.

opw-2462538

closes odoo/odoo#67605

X-original-commit: 3c082b9a47be35579a454f13edc230ac3029922d
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-03-10 15:43:06 +00:00
Younn Olivier 7332d37c68 [FIX] website: fix image gallery slider index
The gallery slider index was wrongly calculated when the gallery had no
active element, as the jquery method .index() will still return -1 when
no element is found.

task-2472041

closes odoo/odoo#67563

X-original-commit: 666fc3697bd7d70cfa0dd92f0a401b771196bb27
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 15:50:37 +00:00
Younn Olivier 4366d17794 [FIX] website: fix fullscreen indication pointer events
As the container div of the fullscreen indication stays on the page to
be displayed, it was obstructing the click events of the elements it was
displayed on. The user could not access what was on top of the screen.

The solution was to remove pointer events for that div so that it
doesn't interfere with other elements on the page.

Related to https://github.com/odoo/odoo/pull/65255

closes odoo/odoo#67589

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 12:49:29 +00:00
Yannick Tivisse 98f86305b3 [IMP] hr_work_entry_contract: Lessen calls to _get_bypassing_work_entry_type
Allows to reduce the number of queries of 4*N, with N=number of contracts.

closes odoo/odoo#67471

Related: odoo/upgrade#2255
Related: odoo/enterprise#16842
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-10 14:25:22 +00:00
Yannick Tivisse d5abecbce5 [IMP] hr_work_entry_contract: Make _get_contract_work_entries work in batch
Purpose
=======

Reduce by N the number of calls to the method, with N = Number of payslips
2021-03-10 14:25:21 +00:00
Yannick Tivisse b57272794c [IMP] hr_work_entry_contract: Reduce _generate_work_entries queries 2021-03-10 14:25:21 +00:00
Julien Banken e86f892a7b [IMP] crm: Duplicate leads on lead form view
PURPOSE

Duplicate lead records are an issue for CRM users
To prevent sales representatives from contacting a prospect that:

- Already refused an offer from another sales
- Already accepted an offer from another sales
- Is already discussing with another sales

The purpose of this task is to inform the CRM user that there are
some possible duplicates for one lead and let the user decide how
to handle the case.

SPECIFICATION

- Add a computed field to count the number of potential duplicates.
- Add a stat button on the form view of a lead to display the number
of potential duplicates. When the user clicks on it, the leads
considered as duplicate will be displayed in a kanban view.
- Add a lost ribbon on the kanban view to quickly visualize the lead
state since the duplicates can be lost leads.

LINKS

Task ID : 2151017

closes odoo/odoo#61834

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-10 14:29:50 +00:00
Nisha patel adf3c610c7 [FIX] hr_holidays: Improve displayed information on calendar leaves
See task pad for complete information.

closes odoo/odoo#58168

Taskid: 2314838
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-10 14:21:24 +00:00
Arnaud Joset ce58c83872 [IMP] calendar: set default stop different than default start
Before this commit, the default stop was equal to default start, creating events with duration = 0.

closes odoo/odoo#67146

Taskid: 2475473
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-03 12:35:10 +00:00
Laurent Smet 25dcf48225 [IMP] account: Allow tax to not be affected by a previous one
In India, we need to configure taxes like this:
- 6% applied on base amount
- 6% applied on base amount
- 1% applied on 1.12 * base amount

If both 6% taxes are affected the base of subsequent taxes, it gives the following result:
- 6% applied on base amount
- 6% applied on 1.06 * base amount
- 1% applied on 1.06 * 1.06 *  base amount

Thanks to the new 'is_base_affected' field set on the second tax, it gives the expected results.

closes odoo/odoo#66134

Task: 2343958
Related: odoo/upgrade#2254
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-03-08 15:37:08 +00:00
Goffin Simon ba1d2b754f [FIX] account_fleet: Field vehicle_id unavailable on vendor refund
The fleet vehicle_id must be visible on vendor refund

opw:2471784

closes odoo/odoo#67280

X-original-commit: 7144321c3fd13f83241ae7e4be71a9a4d576a871
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-04 16:16:25 +00:00
Kevin Baptiste 8c5bfd351a [IMP] hr_attendance: show own attendances
Users with the rights 'Manual Attendance' get (read-only) access to their
own attendances.

closes odoo/odoo#66934

Taskid: 2438863
Related: odoo/upgrade#2216
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-01 13:33:35 +00:00
Kevin Baptiste be8c2cad82 [FIX] calendar: send context on "Add" button
The "Add" button was not propagating the context, therefore records
couldn't get their default values set from the context keys `default_XXX`.

closes odoo/odoo#66876

Taskid: 2464991
Related: odoo/enterprise#16664
Related: odoo/upgrade#2207
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-08 07:18:00 +00:00
Kevin Baptiste 07ccdb2e88 [IMP] hr_holidays: increase performance counter
The change introduced in odoo/enterprise#16664 for hr_appraisal
increases the query counter by one.

TaskID: 2464991
2021-03-08 07:17:59 +00:00