Commit Graph
2 Commits
Author SHA1 Message Date
Thibault Francois 4340a7e4d2 [FIX] fleet: fix search method for contract_renewal*
the search method of contract_renewal_due_soon and
contract_renewal_overdue return a domain
id in res_ids where res_ids are id of contract
not vehicle

So it return random result

Solution
--------
Get the vehicle_id from the contract record set

closes odoo/odoo#84987

X-original-commit: 975841953adaa6b7adc8016fb96cc6efc8891613
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-21 13:13:52 +00:00
uso-odooandLucasLefevre 28a9e90dce [FIX] fleet: Fix access error on assign driver linked to internal user
Currently, Failing at base/models/res_partner.py#L535
We write on the partner because of the related `plan_to_change_car`

When Assign driver linked to internal user without admin rights
it gives an error in security rules due to write on partner.

So while creating the vehicle when driver is assigned pop the value
for related field plan_to_change_car and rewrite the same with sudo.

closes odoo/odoo#60358

Issue: #54199
Taskid: 2309192
X-original-commit: af21dba516de688743f75e6ffb3bc3341578e37a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: LucasLefevre <lul@odoo.com>
2020-10-20 10:43:36 +00:00