Cédric Krier
466f2114b6
Reset cancelled invoice to posted when unpaid
...
Closes #13509
(grafted from cbb381841768cf91419c43df93794c593d61ac8b)
--HG--
branch : 7.0
2024-09-13 15:30:26 +02:00
Sergi Almacellas Abellana
2dab614b8b
Clear employee fields when duplicating invoices
...
Closes #13471
(grafted from 2ee778466a0b0fd54426404cec4088425d0b028a)
--HG--
branch : 7.0
2024-09-28 15:19:35 +02:00
Cédric Krier
e18d53e99c
Test if origin id is greater or equals to 0 before accessing the target record
...
Closes #13498
(grafted from 497490225779fc8dc210c9cee997cd5ce4b4381e)
--HG--
branch : 7.0
2024-09-09 12:46:16 +02:00
Cédric Krier
2578569a76
Fix message ID when creating invoice tax on non draft invoice
...
Closes #13402
(grafted from 82a29d5623e2e56037048cd1df73a52df1c59c4a)
--HG--
branch : 7.0
2024-07-27 10:22:32 +02:00
Cédric Krier
1ddd2c38e8
Sum only invoice lines of type line to update untaxed amount
...
Closes #13357
(grafted from 2256d42c0b40b1a47de88ca0c5f96b11f177b2dc)
--HG--
branch : 7.0
2024-06-22 16:46:54 +02:00
Cédric Krier
c2091befaa
Use decimal 0 without digits as default value
...
If the digits of the field is 0, than using '0.0' trigger the validation error
introduced by 2be02f249a1d.
Closes #13197
(grafted from 979cd092ea24f04328af5f4ff315c418e1c5b3e6)
--HG--
branch : 7.0
2024-04-30 19:15:44 +02:00
Cédric Krier
92365f83df
Test if cache amount is null to include tax amount when searching for amount
...
Closes #13219
(grafted from e9640ffe7241f00606dcbf71ef55622fbf372563)
--HG--
branch : 7.0
2024-04-28 17:30:17 +02:00
Cédric Krier
5623f2bcf6
Use id as default payee value on pay invoice wizard
...
Closes #13140
(grafted from 1a12707bd33d013f3f1853e7843742727018abf6)
--HG--
branch : 7.0
2024-04-21 15:33:42 +02:00
Cédric Krier
a6e822f877
Depends on xxx2many fields when they are assigned by a change function
...
Closes #13099
(grafted from 4a24c323d44a3b5ab440b1bafc4b3b9005500642)
--HG--
branch : 7.0
2024-04-22 08:59:48 +02:00
Cédric Krier
0a30314a89
Set posting employee only when using button
...
As the posted by employee field can not be modified once the invoice is
posted, the employee must be set only when it is an action of the user.
On processing the invoice, it is the internal posting method that must be used
so no employee is set nor any other warning checks.
Closes #13124
(grafted from 361b4624d10c7173ce439329d72e37d7fa02d00b)
--HG--
branch : 7.0
2024-03-25 10:17:35 +01:00
Cédric Krier
b6409b7598
Set invoice line state to paid when invoice is cancelled with cancel move
...
Such invoice line should be considered as booked for example to compute the
invoiced quantity of stock move.
Closes #13085
(grafted from cfd02fdbd6781576e47fd92a9720049c01a1e498)
--HG--
branch : 7.0
2024-03-08 12:29:03 +01:00
Cédric Krier
305747d8ab
Do not hard-code invoice report action in refresh report wizard
...
This prevents customization of the report by deactivating the report action as
documented.
Closes #12872
(grafted from 208637c2d94be75b4c795eb56c0c4405c15bc29d)
--HG--
branch : 7.0
2023-12-27 13:33:10 +01:00
Cédric Krier
ace6906d28
Do not rely on invoice state to compute reconciliation lines
...
Closes #12864
(grafted from 94018bd6531aa5943e5044d925b24c04fc5ecb8c)
--HG--
branch : 7.0
2023-12-22 18:43:55 +01:00
Cédric Krier
bf55f9310d
Use correct id for error message when creating invoice line not draft
...
Closes #12863
(grafted from b052e8902bb286b6b1d84333e9b2bacd46970384)
--HG--
branch : 7.0
2023-12-22 18:34:45 +01:00
Cédric Krier
04af335284
Copy alternative payees of invoice if it is the only party on lines to pay
...
Only one alternative payee is permitted on draft invoice so we can copy it
only if there is only one and it is the one that was already set when posting
the invoice (only party that appears in the lines to pay).
Closes #12528
2023-10-28 14:04:23 +02:00
Cédric Krier
b037f93b77
Prevent changing company of invoice with lines filled
...
Closes #12620
2023-10-07 08:47:30 +02:00
Maxime Richez
fa5ae37c46
Always allow editing invoice reference, description and comment by accounting administrator
2023-09-19 14:17:33 +02:00
Maxime Richez
d603d56f71
Allow refreshing invoice report cache
...
Closes #12091
2023-09-19 14:12:42 +02:00
Cédric Krier
c5a3340851
Update taxes when create invoices
2023-07-25 15:34:01 +02:00
Sergi Almacellas Abellana
24a4abc6ba
Set employee who validates and posts invoices
...
Closes #9678
2023-07-06 16:27:53 +02:00
Cédric Krier
a4cb3f9f61
Normalize Unit of Measure labels
...
For short label, we only use UoM with an help text showing with capital letter
the meaning of UoM.
2023-08-20 12:17:27 +02:00
Cédric Krier
91fb1e7c24
Use OR-ed domain when composing clauses from exclusive join
...
When a searcher of a Function field compose a domain using mutually exclusive
joins, the boolean operator must always be OR because only one clause is not
NULL.
Closes #12291
2023-08-02 20:35:13 +02:00
Cédric Krier
2be6515fa6
Start remainder with all lines for amount to pay invoice
...
This is the worst case before finding a better one with a lower remainder.
Closes #12403
2023-07-15 01:05:48 +02:00
Cédric Krier
852741ae54
Set overpayment by default when amount is greater than the amount to pay
2023-07-14 12:02:49 +02:00
Cédric Krier
03e0455e75
Do not allow overpayment of invoice when write-off amount is negative
...
When paying less than the amount to pay, there is no overpayment.
2023-07-14 12:01:05 +02:00
Cédric Krier
c3da634f9f
Require lines when paying invoice with write-off or overpayment
...
This is needed ensure that at least one line to pay of the invoice is
reconciled.
The lines and payment lines are also shown for overpayment.
Closes #12403
2023-07-14 11:59:19 +02:00
Cédric Krier
d9865ab943
Simplify tax identifier types of invoice
...
We do not need to be able to customize it for only the invoice so it can be
customized on party.
2023-06-27 15:06:34 +02:00
Cédric Krier
d9e9df28c2
Limit type to tax identifier for party tax identifier of invoice
...
Closes #12356
2023-06-27 15:00:59 +02:00
Cédric Krier
1353212f31
Hide taxes deductible rate for invoice lines without the type line
2023-06-28 12:25:54 +02:00
Sergi Almacellas Abellana
614cff956d
Allow modification of invoice references when report is not cached
2023-06-22 16:11:33 +00:00
Nicolas Évrard
91ed1cddc1
Use indexes and cache to make search on amounts faster
...
This optimization relies on the idea that few invoices should stay in the
states where the amount cache fields are empty. It splits the search query in
two parts: one on the cached fields, the other on the computation with the
invoice lines (and tax lines when it applies).
Closes #11919
2023-05-27 09:53:47 +02:00
Nicolas Évrard
d894c1f442
Add cache on invoice's amounts
...
Having cache on the invoice's amounts will allow to make search more efficient
for #11919
2023-05-25 16:21:49 +02:00
Cédric Krier
c053327018
Show reconciliation lines of invoice also when cancelled
...
When the invoice is refund with a credit note, it is cancelled instead of paid
so the reconciliation lines from the credit note are not displayed as payment
lines.
So we should display them in this case.
2023-05-17 17:25:03 +02:00
Cédric Krier
fc8e2016e7
Compute amount of invoice line tax when changing tax or base
...
Using on_change_with does not work correctly for editable field because the
value may be changed when the user does not expect it.
Closes #8618
2023-05-17 18:24:40 +02:00
Cédric Krier
b0590200db
Set invoice journal only when type is changed
...
Using on_change_with does not work correctly for editable field because the
value may be changed when the user does not expect it.
2023-04-29 12:57:57 +02:00
Cédric Krier
f2838915d4
Set invoice account only when changing party or dates
...
Using on_change_with does not work correctly for editable field because the
value may be changed when the user does not expect it.
Closes #12239
2023-04-29 12:56:51 +02:00
Adrià Tarroja Caubet
960c220329
Remove migrations previous to 5.0
...
Closes #11324
2023-01-19 11:25:25 +01:00
Cédric Krier
a84cb9f07c
Do not change account nor journal of invoice no more draft
...
Closes #12146
2023-04-08 16:36:38 +02:00
Cédric Krier
51b7fe72f8
Support invoice payment with currency exchange
...
Closes #11500
2023-02-16 18:59:06 +01:00
Cédric Krier
dc979ed50b
Hide pay button on invoice if there is no payment method
...
Closes #12160
2023-03-24 13:21:42 +01:00
Cédric Krier
b9c4b8230d
Return instance in on_change_with methods
2023-03-26 09:49:00 +02:00
Cédric Krier
ba701d5a38
Remove invalid fields from default copy
2023-03-15 16:11:51 +01:00
Cédric Krier
b049293df0
Do not search on party when searching invoice record name
...
The party is not part of the record name so for consistency it should not be
searched.
2023-02-16 09:58:20 +01:00
Cédric Krier
45bbfa8fb5
Add cache to account period find and return instance
...
Closes #7705
2023-02-10 23:36:18 +01:00
Cédric Krier
f429332d97
Use right boolean operator in composite domain of searcher
...
When the clause is negative, it must return an AND-ed domain instead of OR-ed.
2023-02-16 10:39:30 +01:00
Maxime Richez
10466a9936
Prevent deletion of payment terms in use
...
Closes #12085
2023-02-21 12:55:12 +01:00
Cédric Krier
88aa08904c
Replace same account check by domain between invoice, lines and taxes
...
Closes #7641
2023-02-10 16:06:23 +01:00
Cédric Krier
e0182d9ecb
Do not allow to create line or tax on invoice not in draft
...
Adding new line or tax should also be forbidden for validated state.
2023-01-26 15:01:10 +01:00
Sergi Almacellas Abellana
33aa8bad09
Limit tax kind of invoice tax based on invoice type
2023-01-27 11:55:05 +01:00
Cédric Krier
cad8cad4ef
Do not convert into float search amount of invoice if it is None
2023-01-12 11:36:01 +01:00