From d00471fdb4f205e3a4dbaaae8076602da5a07920 Mon Sep 17 00:00:00 2001 From: "Victor Piryns (pivi)" Date: Fri, 23 Sep 2022 14:37:55 +0000 Subject: [PATCH] [FIX] sale_timesheet: show date fields in invoice wizard Current behaviour: If you have an SO, with an SOL that is a service invoiced based on Timesheet's task, with some logged hours (therefor it can be invoiced), the wizard wasn't showing the date range fields to allow user to specify a begin and end date for invoicing. Expected behaviour: You should be able to choose a date in the wizard when you have a service based on timesheet, and "normal invoice" is chosen as a radio option. Steps to reproduce: - Install Sale and Timesheet - Create a Product of type service, invoiced on timesheet, on create task, chose a project (doesn't matter), unit = hours - Create an SO and sell 50 hours of the newly created service, confirm the SO - Log 20 hours on the task related to the sol - Return to the SO and click on "Create Invoice", normally 2 fields for "Date Begin" and "Date End" should be present, but it is not the case. You can test the desired behaviour in version 15.3 and before. Reason for the problem: The xml view was attaching itself after a field `deposit_taxes_id` which is inside a group that is invisible if there are no downpayment. Fix: Attach the xml view after the before mentioned group (`down_payment_specification`), in a separate group of its own, with visibility that depends on `invoicing_timesheet_enabled` field. Affected versions: - 16.0 - master opw-2994036 closes odoo/odoo#101406 X-original-commit: 3eb1660e7bee4c5b2fe63f82daad5f4acbea2dd2 Signed-off-by: Xavier Signed-off-by: Piryns Victor (pivi) --- .../sale_make_invoice_advance_views.xml | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/addons/sale_timesheet/wizard/sale_make_invoice_advance_views.xml b/addons/sale_timesheet/wizard/sale_make_invoice_advance_views.xml index d0f2633992c..a3a72bfb9bd 100644 --- a/addons/sale_timesheet/wizard/sale_make_invoice_advance_views.xml +++ b/addons/sale_timesheet/wizard/sale_make_invoice_advance_views.xml @@ -9,21 +9,24 @@ true - + - + + +