Commit Graph
136709 Commits
Author SHA1 Message Date
Anh Thao Pham (pta) e2d1d445a9 [IMP] sale_timesheet: small improvements for the reporting
Purpose
=======

Small improvements for the reporting in Project Overview and allow to group by date in Project Costs and Revenues

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

In Project Overview:
- unfold the details of SO by default
- do not display caret if it is not foldable

In Project Costs and Revenues, the date is retrieved for each account_analytic_line and therefore the values are not summed anymore in the SQL request.
Also fix the default filter "Costs and Revenues" that wasn't applied at the opening of the report.

closes odoo/odoo#48172

Related: odoo/enterprise#9415
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-25 08:34:23 +00:00
Antoine Prieels c5e1af7a35 [FIX] hw_drivers: IoT Box connection
In Chrome 84, mixed content will be completely blocked for security
reasons ([see blog](https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html))
Other browsers will probably follow in the next months.

As IoT Boxes don't have a valid certificate before connecting to a DB,
we used mixed passive content to communicate with the boxes.
This won't be possible anymore, and we have no possible way to
communicate directly from the browser to the box.

- When an IoT Box boots without registered DB, a unique code will be
 created with a validity of 5 minutes.
- This code will be shown on the customer display and printed on the
 status ticket.
- The box will call a route on odoo.com and a record will be created
 in odoo.com with the unique code.
- The user will have to enter the code manually in his DB to connect
 to the IoT Box, the DB will then contact odoo.com to search for a
 record containing the unique code. If it's found, the
 `openerp.enterprise.database` will be added to the record.
- The box will then query odoo.com at regular intervals (10 seconds)
 to check if a DB is linked to the code.

closes odoo/odoo#53623

Taskid: 2246535
X-original-commit: c55f12e32598a713105f3c049ac053e46ba15bb2
Related: odoo/enterprise#11421
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-25 06:08:33 +00:00
Csaba Tóth bc81853ba5 [IMP] note: Note module demo adjustment
Add checkboxes to some of the Note module's demo datas
Instead of an old text-only list, take advantage that the notes
contains HTML.

closes odoo/odoo#49368

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-25 05:23:31 +00:00
Nicolas Lempereur e961a2fe09 [FIX] web: action before field willStart end
On a re-render, when:

- a field is not yet started (still in willStart because of RPC)
- then an action is executed

we can get a traceback because we try to save the field before it is
started and `this.el` is not set.

eg. in MRP on a work order:

- click on + to get new serial number

=> page is re-rendered with RPC call to update duration to
   mrp.workcenter.productivity().search_read to update time
   counter

- click on "Record production" before RPC is finished

=> traceback because we try to save `duration` that is not already
started (`this.$el.toggleClass` when `this.$el` is `undefined`)

Without change, added test fails with:

  "Cannot read property 'toggleClass' of undefined"
  in BasicRenderer.canBeSaved

  "Expected 6 assertions, but 5 were run"

Before saas-11.3 5faec34a3c this.el was always set in `init` so this
issue did not happen.

opw-2272117
closes #53532

closes odoo/odoo#53612

X-original-commit: befcad51fd236fdaf284f76cea5624d21c070b0e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-24 15:48:27 +00:00
Sébastien Theys 446888cc0d [FIX] mail: prevent messaging menu mark as read from opening thread
task-2278759

closes odoo/odoo#53619

X-original-commit: 6af057b087bb66af70ed93d7f82521b56e3b1aa5
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-24 17:36:44 +00:00
Paul Morelle f463983cf9 [FIX] website: fix semantics of MockRequest
We should push the request object on the request stack only in the
__enter__ method, in order to be symmetrical with the __exit__ method.

closes odoo/odoo#53613

X-original-commit: 30e94d305f9cffa816ddc213e0b9329c0263c145
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-06-24 16:06:11 +00:00
Aaron Bohy 5e888f8a6c [FIX] web_tour: consume step even if tip not visible
When several tips (coming from different tours) can be displayed on
the same screen, we only display one of them [1], the one from the
tour having the lowest priority [2]. For instance, with CRM and
Sales, there are two tours starting from the HomeMenu, but we only
display the tip on the CRM app.

Before this commit, if the user entered the Sales app, the first
step of sales tour wasn't consumed, so no tip were displayed inside
the Sales app, even though the user "discovered it by himself".

This commit ensures that tips that aren't displayed because there
is another one with a lower sequence still get consumed when the
user clicks on their anchor.

[1] f0a7d69dcf
[2] 61ed0409c3c419f9624874fb0743d707eee673b1

closes odoo/odoo#53606

X-original-commit: 3bf1d8418f41bcaa0ba4b153620def11aaea0a2b
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-06-24 15:20:11 +00:00
Nasreddin (bon) 3c169a415b [FIX] tools: Return input_str when removing accents if empty
Issue

	The misc feature remove_accents(input_str) return a
	string 'False' if the param is a boolean.

Solution

	Return input_str if equal '' or False.

opw-2278959

closes odoo/odoo#53572

X-original-commit: 3fc7ce3b5599355933734e5e3f59d14a7a9b199c
Related: odoo/enterprise#11391
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-24 11:06:01 +00:00
Denis Ledoux c219727974 [FIX] base: prevent loop in module categories Administration during upgrades
Revision 07631a5185
inverts the parent/children relationship of the module categories
`module_category_administration`
and
`module_category_administration_administration`,
by swaping the `parent_id`.

During an upgrade, e.g. from 12.0 to 13.0,
as the `parent_id` node has been removed from the category
`module_category_administration` in the data xml file,
the field `parent_id` of the category was left untouched,
therefore leaving the former parent,
creating a recursion between the two categories.

```sql
select id,name,parent_id from ir_module_category where name ilike 'administration';
 id |      name      | parent_id
----+----------------+-----------
 79 | Administration |        78
 78 | Administration |        79
```

closes odoo/odoo#53568

X-original-commit: e4bc0a6c6b1181b7c723df415c75f6983ff91927
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-06-24 10:25:41 +00:00
Hardik Prajapati 63cbe8678a [IMP] project,sale,hr(_timesheet): Generic improments for project
Done the below several improvement on project:

- move the stage description and tooltips to the debug mode
- remove the 'need assistance' tag
- Change the app description in manifest file 'Organize and
plan your projects.'
- Change the burger menu sequence into: Edit/Delete/Share/Set Cover Image
- change the description of the pad feature into, 'edit tasks
  description collaboratively in real time. see each author's
  text in a distinct color.'
- add the following tooltip for the allow_billable field,
  'invoice your time and material from tasks.'
- add an fa-stopwatch icon in front of the Start & the Stop buttons
  in task's form view
- rename the 'validate time spent' modal into 'confirm time spent '
  + increase the size of the description field
  + this field should not be required
- project overview: rename 'Hours recorded' into' Recorded Hours'
- project form view: disable the creation for the portal users field
- Rename the 'ready for next stage' kanban state into 'Ready'

TaskID: 2232051
Related Enterprise PR: https://github.com/odoo/enterprise/pull/9961

closes odoo/odoo#49694

Closes: #49694
Related: odoo/enterprise#9961
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-24 11:10:33 +00:00
Carlos Dauden fdc20d13bb [FIX] sale_purchase: Take into account minimal quantity supplierinfo
closes odoo/odoo#53548

X-original-commit: d872cbf11f05cd10aa9b36b3c0aded895e0e68f3
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-06-24 08:44:59 +00:00
Xavier Morel 6bd8e89766 [IMP] sale: avoid using _write to schedule an activity from the invoice status
Task 2186312

closes odoo/odoo#53427

Related: odoo/enterprise#11335
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-06-24 10:27:26 +00:00
Xavier Morel 1dab0fac85 [IMP] website_slides_survey: remove _write override
odoo/odoo@020e2a5e85 added a way to hook
into recomputation of stored fields, so messing about with _write
should be unnecessary.

Task 2186312
2020-06-24 10:27:26 +00:00
Barad Mahendra 7e8dee1ecc [IMP] hr_timesheet: add name on task kanban to inherit easily.
Purpose of the commit is to add the name on condition so it will
be inherited easily from the fsm view and  able to change the condition
easily by inehritance.

closes odoo/odoo#51979

Taskid: 2253536
Related: https://github.com/odoo/enterprise/pull/10796
Related: odoo/enterprise#10796
Closes: #51979
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-27 12:32:54 +00:00
Pratima Gupta 6ed99c032a [IMP] stock: propagate_date on 1st receipt move
1) Before this commit, propagate date on 1st receipt move was always False
   if PO was created manually.

   After this commit, move will be assigned with propagte_date of buy
   route of warehouse only if there is not move_dest_ids.

2) Default settings on routes as -
	1) If receipts in 3 steps > the alert on the receipt
	   (+ propagate) and the propagate rescheduling on the followings
	2) If receipt in 1 step > the alert on the buy rule
	   (no propagate rescheduling)

Task-2209541

closes odoo/odoo#51853

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-24 11:05:33 +00:00
Sébastien Theys 652d835f77 [FIX] mail: restore close of other menus on click of messaging menu
task-2278830

closes odoo/odoo#53566

X-original-commit: 0407151b34da16ca54066bb15e578dc1db85f365
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-06-24 10:22:58 +00:00
Xavier Dubuc ba744be937 [FIX] mail: fix folded new message chat window style
task-2272492

closes odoo/odoo#53565

X-original-commit: dcaa91ffb84a7d9ca433fff1913df47513bb365a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-24 10:22:35 +00:00
Xavier Morel ff669b68cb [IMP] test_lint: disable deprecated-method
It's not super useful as we've re-enabled DeprecationWarnings though
logging, and it turns out to be a *very* expensive lint, as it more
than doubles the runtime of pylint locally:

Before:

    odoo.addons.test_lint.tests.test_pylint ran 1 tests in 376.27s, 2 queries

after:

    odoo.addons.test_lint.tests.test_pylint ran 1 tests in 114.05s, 2 queries

It also seems to significantly increase peak memory consumption (by
~60% though that's not a precise measurement), which can lead to
non-deterministic memory errors.

Also disable mixed-indentation since it doesn't do anything (mixed
indentation is illegal in Python 3).

closes odoo/odoo#53562

X-original-commit: 8062098d0586048a9e91543290c6ab1c8d8d7009
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-06-24 09:52:28 +00:00
Victor Feyens c250bec9ff [FIX] hr_timesheet: timesheet encoding unit of measure.
Potentially wrong in multi-company environment.

closes odoo/odoo#53513

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-23 14:15:39 +00:00
Victor Feyens 117c391ac7 [IMP] hr_timesheet: project CRUD cleanup
* remove name_create override: allow_timesheet default is True anyway
* create projects in batch
* write improvement
2020-06-23 14:01:47 +00:00
Victor Feyens 9d2e60aa86 [FIX] hr_timesheet: wrongly raised UserError
Do not say that the task has timesheets linked when there are none 
linked...
2020-06-23 13:47:32 +00:00
shs-odoo 770494fade [IMP] fleet: Change long description of fleet.vehicle.log.contract model
Purpose of the task is the current name(_description) of model
fleet.vehicle.log.contract is too long and confusion.

So in this commmit, Rename model fleet.vehicle.log.contract
name(_description) to 'Vehicle Contract'.

closes odoo/odoo#52176

Taskid: 2267547
Closes: #52176
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-02 04:16:25 +00:00
Xavier Morel e1df56f25c [FIX] doc: meta directive support
The translator defined a `meta` attribute, however:

* it was static so couldn't be expanded using the `meta` directive,
  move to instance attribute, and create an `add_meta` method which
  adds some indentation (for a cleaner HTML output)
* the `meta` directive itself was not supported by the translator
* turns out HTMLWriter just removes the first to entries of `meta` as
  "cleanup", which explains why we had to duplicate it in the template
  - therefore pad the `meta` list and remove entries from template
  - move front to linktags, that seems more relevant

closes odoo/odoo#49699

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-17 08:48:21 +00:00
Nicolas Martinelli 6f8f0d4bc3 [FIX] mrp: multiple BOM
- Create 3 products A, B1, B2
- Create a BOM for A:
  Manufacture, 1 unit of B1
- Create another BOM or A:
  Kit, 1 unit of B2
- Create a MO for A
- Click on 'Produce'

B2 appears as a 'By-product'. Upon saving, an error occurs because of a
rounding set to zero.

The issues is coming from the generation of the `move_finished_ids`.
Since the product A has a BOM kit, the latter is exploded and added as
'By-product'.

We should not try to find phantom BOM for this specific use case. A
solution is to not explote the move produced.

opw-2251423

closes odoo/odoo#53526

X-original-commit: 226ccc2f64d00a19e0ae8851c45051106aa49adc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-23 15:14:37 +00:00
Adrian Torres ce4fcebbbb [FIX] orm: don't log errors on constraint failure unless necessary
Given an scenario in which a field F of model M is defined in module X
as `required=True` and is extended by another module Y as
`required=False` in a database with data not satisfying the original
constraint:

During an upgrade of base the original constraint will be re-applied
on the data (and fail) even though it is no longer necessary because
module Y relaxes the NOT NULL constraint.

This failure in and of itself is non-blocking, the upgrade will go
through but an error and a warning are logged anyway which are not
problematic either except in the case of automated testing
infrastructure (such as runbot), because of this it would be best if
these errors would not be logged at all unless we're 100% sure that the
constraint that was applied is not relaxed downstream.

With this commit, the `finalize_constraints` method will verify that the
constraint is applicable (field is required) before re-applying the NOT
NULL constraint.

opw-2269220

closes odoo/odoo#53529

X-original-commit: f09f4826fbdd1a547503c51a3cfad71285312c49
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-23 15:33:04 +00:00
Swapnesh Shah 195c7e83fe [FIX] purchase_requisition: add missing attribute/context
Followup on ca707502a6

During replacing `partner_id` field in `purchase_requisition` module, widget and context key `show_vat` was not preserved.

With this commit we add missing attributes of the field.

closes odoo/odoo#52383

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-23 14:41:52 +00:00
Raphael Collet ea83473eab [FIX] core: flush() with one2many fields
This ensures that flushing a one2many field automatically flushes its
inverse many2one/integer field.  Without that, a search like:

    model.search([('o2m_ids', 'in', ids)])

can return incorrect results.

closes odoo/odoo#53514

X-original-commit: b91b485a5d9a62acfe44b12c64a46dcca23981ce
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-23 14:00:42 +00:00
Nicolas Martinelli 536759644e [FIX] stock: reserved quantity on return of return
1. Activate receipt in 2 steps
2. Make a PO of 10
3. Receive 8 (pick 1), backorder
4. Receive 2 (pick 2)
5. Unreserve the internal transfer (pick 3)
6. Go to pick 2, return 2 (pick 4)
   => product is sent back to the supplier
7. Go to pick 4, return 2 (pick 5)
   => product is received from the supplier
8. Go to pick 3, check availability

Only 8 units are reserved instead of 10.

It happens because pick 5 (return of the return) is not linked to the
pick 3 (internal transfer).

We use a similar approach for `move_dest_to_link` than the one used for
`move_orig_to_link`.

Closes #52459

opw-2271838

closes odoo/odoo#53506

X-original-commit: c96339dd94ffe1e9c5103814062455c79d93a273
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-23 12:41:15 +00:00
Nicolas Martinelli 8b49908f8c [FIX] stock: prevent traceback
In case there are several `move_dest_ids`, this piece of code will cause
an error.

X-original-commit: ff17edfd6682ba45397549fb228b37384f634674
2020-06-23 12:41:15 +00:00
oco-odoo 57c74415cb [IMP] account: cash rounding: forbid entering a negative rounding value.
closes odoo/odoo#53501

X-original-commit: 2ecd2130639caad90609ce794df370359ad6e2fb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-23 10:51:41 +00:00
Yannick Vaucher 2e9aac7655 [FIX] l10n_ch - print ISR tests
resolves the following error:

E psycopg2.IntegrityError: null value in column "partner_id" violates not-null constraint
E DETAIL: Failing row contains (193, 010391391, null, null, null, null, 10, null, 1, 1, 2020-05-20 20:05:28.431208, 1, 2020-05-20 20:05:28.431208, null, null, null, null).

To generate an ISR payment slip you need:

  * a type == out_invoice
  * a partner bank account with a ISR issuer number (field l10n_ch_isr_subscription_[chf|eur])
  * a currency either in EUR or CHF

Remarks:

  * l10n_ch_postal is not necessary and must be used for Vendors only.
  * human readable subscription number is xx-yyyyyy-c
        validation of such format is done with the following PR: https://github.com/odoo/odoo/pull/51544/files

It does:

- Removes unexisting field from tests
- Adds required field on partner_id
- Fix test with an actual case that case generate ISR payment slips

closes odoo/odoo#53498

X-original-commit: 776fd59909d12c981585fac82cfa9f3603d96ccf
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-23 10:17:26 +00:00
Dhruv Patel 8a1e1c0c4c [FIX] web: daterangepicker not working in firefox
A recent commit [1] made the daterangepicker automatically close
itself on scroll events. However, in firefox, a scroll event is
triggered when the daterangepicker opens. This event is triggered
inside the picker itself. As a consequence, the picker is closed
directly. This commit solves the issue by only closing it on scroll
events occurring outside the picker.

[1] https://github.com/odoo/odoo/commit/e6730c6e928587cd7438340cc101c57fee34220b

closes odoo/odoo#53497

Task: 2282571
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-23 12:45:10 +00:00
Nicolas Martinelli f1b7a2b147 [FIX] l10n_ca, l10n_us: do not change paper format on upgrade
- Install US localization
- Change the paper format of the main company
- Upgrade `l10n_us`

The paper format is changed back to 'US Letter'.

Note that the current situation is not ideal since it forces the
paper format on the main company, whithout taking into account its actual
country.

opw-2272894

closes odoo/odoo#53494

X-original-commit: 618f0e7f8b411e1930c73f52462e674353c18be9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-23 09:56:32 +00:00
shs-odoo db0de87ead [IMP] sale: improve invoiceable lines decoration
purpose of this task to improve invoiceable lines decoration

in view_order_form
- decoration is removed from the order line tree view
- decoration applied to fields
  -  product_uom_qty
  -  qty_delivered
  -  qty_invoiced

closes odoo/odoo#53402

Taskid: 2282277
Closes: odoo#53402
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-22 11:20:26 +00:00
Hardik Prajapati 999507007e [IMP] hr: Sync some data between user and employee
Purpose of the task is to improve the employee image and phone
behaviour while changing the user.

So in this commit, IF there is no pitcure on employee then apply the
image of user while adding the user to employee from cretae, write
and onchage. do not  change the employee image if employee image is
already set while creating employee or changing the user on employee.

Also improve the phone behaviour when changing the company,
  - Never change the mobile_phone when switching the company
on employee
  - Always change the work_phone when switching the company, except
if empty on res.company.

closes odoo/odoo#50115

Taskid: 2240167
Closes: #50115
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-23 11:53:45 +00:00
Thibault Francois 3ad85b6f06 [FIX] website_hr_recruitement: Mail not send at creation
When an applicant is created from the website
and the job_id has a first stage with a template to send
the mail is actually not sent.

This is happening because at the creation of
a mail.thread values from computed field don't
appear in the change to track.
so _message_track_post_template don't see the
change on stage_id and thus don't send the email

This is going to be fix on the master
in the meanwhile we can force the value of the stage_id
at the creation of the applicant from the website form

closes odoo/odoo#53462

X-original-commit: bbaf4913382809da0c4d644f914cb3e8191a5d1b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-22 17:15:24 +00:00
Aaron Bohy 61a3a4d52d [FIX] web: list: buttons with attrs column_invisible
Since commit 042b4060bd, attrs 'column_invisible' on button was
ignored. This commit makes this work alongside the adjacent button
grouping feature: if all adjacent buttons have their attrs
column_invisible evaluated to true, no column is rendered for this
group of adjacent buttons.

closes odoo/odoo#53489

X-original-commit: 3110e34ab8e5ec3bf7160655af21f72b4d2179db
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-23 09:03:34 +00:00
Nicolas Martinelli 7a4e90de8a [FIX] account_payment, payment: filter providers
- Install 3 payment providers:
  P1: no countries set
  P2: country set to USA
  P3: country set to Canada
- Activate online payment of invoices
- Create an invoice for portal user A (country of user is USA)
- Login with A
- Pay the invoice

All 3 providers are available, while only 1 & 2 should be available.

The providers are filtered in the sale module, but not in the account
module:

https://github.com/odoo/odoo/blob/586ee04a6296c13868011b3afaca61be5c6ff3c6/addons/sale/controllers/portal.py#L190-L193

The same issue occurs with the direct link `/website_payment/pay`.

We apply the same filtering in all modules.

opw-2279710

closes odoo/odoo#53483

X-original-commit: aaac93b551e2a5f331dd14ee5aefbe4ced173691
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-23 08:27:29 +00:00
Dhruv Patel 9e60a82680 [FIX] web: crash when multiple occurrences of cids in url
This error occurs for instance when your session expires and you
reload. At this point, the hash part of the url is duplicated and
an error is raised when the webclient tries to parse 'cids' part.

The hash part of the url should not be duplicated, but whatever the
url hash, the client should not crash either.

This commit prevents the hash part from being duplicated, and the
client from crashing when there are several occurrences of 'cids'.

closes odoo/odoo#52599

Task: 2267401
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-23 09:46:33 +00:00
Yenthe666 fdf381e1b6 [IMP] stock: show location name in warning
Before this commit if you have a quant that has a location linked of the type 'view' you'd get this warning
but you would not know about which location this was and figuring that out is not trivial for most people.
After this commit users get notified about which location is of the type 'view' and can directly correct it if they want to.

closes odoo/odoo#51137

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-23 09:52:11 +00:00
Pratima Gupta dd23daec01 [FIX] sale_stock: deley alert is invisible on sales order
Here before this commit, if delivery is late for any sale order,
a warning alert is expected, but was missing on it.

commitment_date_div which contains field json_popover was replaced
by new div without json_popover, was leading the issue.

Fixes#2246833

closes odoo/odoo#50813

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-23 09:19:39 +00:00
Yannick Tivisse 721dda2361 [IMP] project_timesheet_holidays: Improve error message
closes odoo/odoo#45818

Related: odoo/enterprise#8602
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-23 09:20:32 +00:00
Rémy Baranx (bar) dfdeb34a89 [IMP] sale_timesheet: convert onchanges to stored-editable computed fields.
As now the partner_id field is fully computed and not modified by an onchange method anymore, some tests have been updated.
2020-06-23 08:57:08 +00:00
Rémy Baranx (bar) 972e097dbe [IMP] project: convert onchange to stored-editable computed fields.
The 'stage_id' field is now a stored-editable computed field.

The 'company_id' has been converted to a stored-editable computed field.

The modification of the 'partner_id' field in the onchange method has been
moved and merged into the _compute_partner_id method.

Remove the empty 'onchange' method from the project.task model and also remove
this method call from the sale_timesheet module, which inherits from the project.task model.

Adapt the _compute_partner_id to retrieve exactly the behaviour before the onchange
method deletion.

Update code and tests of the task/subtask partner_id management after discussion with Alexandra to clarify the behavior.

Add the 'multi_edit' attribute to tree views.
2020-06-23 08:57:08 +00:00
Rémy Baranx (bar) cd4e854e41 [IMP] project_timesheet_holidays : convert onchange to stored-editable computed fields.
The 'timesheet_generate' and 'timesheet_task_id' fields have been set as
stored-editable computed fields.

The condition to compute the timesheet_generat field has changed to be
coherent with the _check_timesheet_generate constraint.

Keep the timesheet_generate field without its default value (True) to avoid
raising a ValidationError through the _check_timesheet_generate constraint
before the timesheet_generate field has been computed.
2020-06-23 08:57:08 +00:00
Rémy Baranx (bar) d924d89ab8 [IMP] hr_timesheet: convert onchange to stored-editable computed fields
The fields 'project_id' and 'user_id' have been converted to
stored-editable computed fields.

Convert the 'allow_timesheets' field.

Improvement of the _compute_task_id method to check the task_id field before using it.

Update hr_timesheet tests by removing calls to onchange methods because
now, compute methods are always called.

Get back the onchange on the 'project_id' to compute the task_id field due to a complex
bug found in sale_timesheet tests.
2020-06-23 07:00:10 +00:00
fw-bot 0d327e2d81 [FIX] l10n_ch: don't add an empty page on QR-bill pdf report when a header is displayed
Before that, just one pixel from the bottom of the QR-bill frame passed got out of the page, and end out creating a second, empty page.

Since this error was probably due to some rounding issue in the way A4 dimensions were compared to the layout specified by the scss file, we solve it by rounding the height of this section a little more, removing 0.25mm from it.

[FIX] l10n_ch: qr bill report: display the payment ref under "reference" and the invoice's name as additional information

closes odoo/odoo#53453

X-original-commit: 8a6cc1a572cd04f540e4a5e83362319c13274aea
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-06-22 16:03:59 +00:00
Goffin Simon a220f05f4d [FIX] odoo: Traceback when creating a new contact
Steps to reproduce the bug:

- Let's consider a new instance with default installed language 'en_US'
- Install CRM
- Activate a second language (e.g. en_GB)
- Set that language in all users
- Inactivate default language 'en_US'
- Reset the language of your current user (no value)
- Go to contact and try to create a new one

Bug:

A traceback was raised because the lang en_US did not exist.

PS: Forcing the user to set a language ensures that this fallback
will never occur anymore.

opw:2267711

closes odoo/odoo#53375

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-22 14:00:19 +00:00
Arnaud Joset 6b95f0c144 [IMP] project: improve calendar view
Before this commit, the calendar view showcases tasks by deadline. Because it is a simple date field, the day/week modes don't have much value and are even confusing to the users, who expect to be able to define timeframes.

In addition, the quickcreate doesn't allow to select a project. This is problematic because it leads to "ghost" tasks.

closes odoo/odoo#52478

Taskid: 2264594
Related: odoo/enterprise#10976
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-23 07:56:16 +00:00
Swapnesh Shah b88c755b35 [IMP] stock: display full product name in warning
Displaying full name with code helps to Identify Products with `default_code` in the warning message. (Especially when variants are activated)

closes odoo/odoo#51720

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-22 15:55:48 +00:00