[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>
This commit is contained in:
@@ -16,7 +16,7 @@ class AccountMove(models.Model):
|
||||
log_list = []
|
||||
not_posted_before = self.filtered(lambda r: not r.posted_before)
|
||||
posted = super()._post(soft) # We need the move name to be set, but we also need to know which move are posted for the first time.
|
||||
for line in (not_posted_before & posted).line_ids.filtered(lambda ml: ml.vehicle_id):
|
||||
for line in (not_posted_before & posted).line_ids.filtered(lambda ml: ml.vehicle_id and ml.move_id.move_type == 'in_invoice'):
|
||||
val = {
|
||||
'service_type_id': vendor_bill_service.id,
|
||||
'vehicle_id': line.vehicle_id.id,
|
||||
|
||||
Reference in New Issue
Block a user