Files
odoo_source/addons/l10n_latam_invoice_document
Ricardo Gomes Rodrigues (rigr) d16ce493a4 [IMP] account: improve fiduciary mode
This commit improves the fiduciary mode by:
- removing message error about the change of sequence format
- suggesting the Customer Invoice / Vendor Bill date according to the following heuristic:
	- Last day of the month of the most recent Customer Invoice / Vendor Bill (ignoring drafts) OR today (whichever is the smallest)
	- If this date falls before a Lock Date, pick the last day of the first month that is not locked
	- Examples:
		- Example 1 :
			We are June 17th 2022. No Lock date. Bill Date of the most recent Vendor Bill : March 15th 2022
			==> Default New Vendor Bill date = March 31st 2022 (last day of March 2022)
		- Example 2 :
			We are June 17th 2022. No Lock date. Bill Date of the most recent Vendor Bill : March 31st 2022
			==> Default New Vendor Bill date = March 31st 2022 (last day of March 2022)
		- Example 3 :
			We are June 17th 2022. No Lock date. Bill Date of the most recent Vendor Bill : June 2nd 2022
			==> Default New Vendor Bill date = June 17th 2022 (today is the smallest)
		- Example 4 :
			We are June 17th 2022. Lock date : April 30th 2022. Bill Date of the most recent Vendor Bill : April 30th 2022
			==> Default New Vendor Bill date = May 31st 2022 (last day of the first month not locked)
- renaming the invoice according to the suggested date

Task id: 2887007

closes odoo/odoo#101799

X-original-commit: 179f4f83db0d029850375012bbf80dedc6679505
Signed-off-by: William André (wan) <wan@odoo.com>
2022-09-30 22:54:47 +02:00
..
…