Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1300 Widoki

Hi
The adviser requested to do this (according to the photo)
In fact, all invoices and accounting documents should have a field for the current and previous number after approval and be arranged according to the due date.

Has anyone had a similar experience?


old Number
INV/0003
INV/0002
INV/0001
INV/0004
INV/0006
INV/0005

Due Date
2021/05/10
2021/05/11
2021/05/15
2021/05/18
2021/06/10
2021/06/12

Number
INV/0001
INV/0002
INV/0003
INV/0004
INV/0005
INV/0006


Awatar
Odrzuć
Autor

_inherit = 'account.move.line'
I have the document number (move_name) with regex
I put it in the list with the due date
And then I sorted the documents and saved the new number in a field
It will soon be available in the Iranian Accounting Localization module
https://github.com/FadooIR/l10n-iran/tree/14.0/l10_ir_accounting

Najlepsza odpowiedź

sorted_record = self.env['your_model_name'].search([], order='due_date asc')
above mention, code display the record an ascending order

sorted_record = self.env['your_model_name'].search([], order='due_date desc')

above mention, code display the record an descending order



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
paź 24
1891
1
lip 22
2277
0
lut 25
1091
1
sie 19
2913
2
gru 18
3291