From fcaa54939e9a4f0dd5e47cd0ccffe7aa24bd451c Mon Sep 17 00:00:00 2001 From: wan Date: Fri, 2 Apr 2021 10:33:24 +0000 Subject: [FIX] account: never set default for invoice_date For customer invoices: * do not set default date because if you prepare an invoice (and it gets a default date), then validate it the next day, the date will be wrong * set the date when posting if it wasn't set, because why not? For vendor bills: * do not set default date because you rarely encode a bill at the bill date. Forcing the user to enter it reduces risks of user error (duplicated vendor bill) * do not set it when posting, same reason. opw-2492862 Related #68368 Closes #68367 closes odoo/odoo#68689 Related: odoo/enterprise#17502 Signed-off-by: Laurent Smet --- odoo/addons/test_main_flows/static/tests/tours/main_flow.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'odoo') diff --git a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js index a65312b484a..d79f808dae8 100644 --- a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js +++ b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js @@ -775,6 +775,15 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('OP/')"), position: 'bottom', }, ...tour.stepUtils.statusbarButtonsSteps('Create Bill', _t('go to Vendor Bills'), ".o_statusbar_status .btn.dropdown-toggle:contains('Purchase Order')"), +{ + trigger: '.o_form_button_edit', + content: _t('Edit the vendor bill'), + extra_trigger: 'body.o_web_client:not(.oe_wait)', +}, { + trigger:".o_field_widget[name=invoice_date] input", + content: _t('Set the invoice date'), + run: "text 01/01/2020", +}, ...tour.stepUtils.statusbarButtonsSteps('Confirm', _t("Try to send it to email"), ".o_statusbar_status .btn.dropdown-toggle:contains('Draft')"), ...tour.stepUtils.statusbarButtonsSteps('Register Payment', _t("Register Payment"), ".o_statusbar_status .btn.dropdown-toggle:contains('Posted')"), { -- cgit v1.2.3