Cédric Krier
6dd5f5873e
Use explicit order for shipments and invoices on sale and purchase
...
Closes #15090
(grafted from 05dbc76d7b374aebf7aaef7c03617cbec6c67393)
--HG--
branch : 7.0
2026-09-13 13:57:29 +02:00
Cédric Krier
123d6db298
Sort invoices and shipments on Function fields of sale and purchase
...
Closes #15083
(grafted from 9385c3660f174830a30529078f3e2899a7a8672c)
--HG--
branch : 7.0
2026-09-10 14:14:16 +02:00
Cédric Krier
0a46153971
Round moved quantity before compare to 0
...
As moved quantity is the sum of float, it may carry rounding issue so it must
be rounded before comparison.
Closes #14386
(grafted from 760368f8aa28083ad69311ce0f424c0de3d54b3d)
--HG--
branch : 7.0
2025-11-25 18:38:51 +01:00
Cédric Krier
d9df1c0c22
Test from location when checking warehouse for purchase line with negative quantity
...
Closes #14333
(grafted from f21002c5cb1882a5cc6e7375aec7db45fc56698f)
--HG--
branch : 7.0
2025-10-30 01:11:22 +01:00
Maxime Richez
d5b2919200
Set empty currency and unit price on stock move when not required
...
Closes #14023
(grafted from 6090f9c621e782cd47eb0537dee972c2f1fa8fe6)
--HG--
branch : 7.0
2025-05-16 13:20:28 +02:00
Cédric Krier
eb5d8e6cd1
Make lines of sales, subscriptions and purchases read only without a company and currency
...
Closes #13948
(grafted from 47c126ef770e2da3227eaaf10b64398d9b27d6e9)
--HG--
branch : 7.0
2025-03-27 23:07:41 +01:00
Cédric Krier
0504a0e766
Ensure the contextual company is not None and positive before using it
...
Closes #13868
(grafted from 0ea68af90f3ef7059c7c9c7a33d13fa216e23bc4)
--HG--
branch : 7.0
2025-03-10 23:43:49 +01:00
Cédric Krier
be3de61310
Convert list/tuple value to list of IDs only if it contains records
...
The Modify Header set the start value from the sale or purchase values but when
it is a list or a tuple, it should also ensure it contains records before
converting to a list of ids.
Closes #13915
(grafted from 35fc6e3d271b4eeb7ef123f58085836fdab77228)
--HG--
branch : 7.0
2025-03-10 23:26:14 +01:00
Cédric Krier
9fd12e21d1
Link invoice lines and stock moves for different quantity sign if invoice method is not shipment
...
Closes #13821
(grafted from 09524e5cc8c4edd63a556b5c5dc723af9edb4cfa)
--HG--
branch : 7.0
2025-01-16 17:38:14 +01:00
Cédric Krier
7c28af4bd5
Do not convert invoiced quantity if sale or purchase has not unit
...
Closes #13593
(grafted from 203c7f14ff6c4b230fe9bc0de42052d4b8cf90cb)
--HG--
branch : 7.0
2024-10-27 19:41:19 +01:00
Cédric Krier
4bca0da9be
Return location instance in getter of sale and purchase
...
If the location field is empty, it prevents to raise an attribute error when
accessing the id.
Closes #13544
(grafted from 277281d61a6223e2ed42a0e6b3002a559c6a67ff)
--HG--
branch : 7.0
2024-10-11 15:59:18 +02:00
Cédric Krier
716437be2d
Link stock moves with invoice lines only for the same quantity sign as the order line
...
When invoice lines are created to correct invoices quantity, it should not be
linked to stock moves because it comes from a stock move being cancelled.
Closes #12972
(grafted from 20c538f39c871bacc0486b8506957229268f59cd)
--HG--
branch : 7.0
2024-09-28 18:05:21 +02:00
Cédric Krier
6377c401db
Clear cached amount when resetting to draft sale, purchase and purchase requisition
...
Closes #13296
(grafted from 8e441329d11b93ceafa47d553cb23883e5b4ec2f)
--HG--
branch : 7.0
2024-06-13 12:34:50 +02:00
Cédric Krier
23f4232157
Do not copy cached amounts of sale, purchase and purchase requisition
...
Closes #13336
(grafted from f8ddc8aae5c43b08f62cc3009172a3463f2e4363)
--HG--
branch : 7.0
2024-06-13 12:11:51 +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
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
87135f32d5
Always return float for invoice or moves progress
...
The fields are Float so they must return a float.
(grafted from 68824d0fd7e6b7568db499d0a6594476c7f9ab66)
--HG--
branch : 7.0
2024-04-04 15:12:21 +02:00
Cédric Krier
01ad452523
Consider sale or purchase as done when states are none and methods are not manual
...
This partially reverts 87d1b5dd99c6 and cc3f0e8968a4 to base the state on the
methods instead of the quantity.
Closes #13154
--HG--
branch : 7.0
2024-04-02 15:33:01 +02:00
Cédric Krier
26db6c6a8b
Do not set sale nor purchase in exception for invoice with cancel move
...
Cancelled invoices with a cancel move should be considered as paid.
Closes #13085
(grafted from 9d82512f29e0e84ab3bb899cc1e4216e42718908)
--HG--
branch : 7.0
2024-03-08 12:36:57 +01:00
Cédric Krier
76c00d3133
Update amount when changing unit or taxes of purchase line
...
Closes #12648
2023-10-29 14:23:34 +01:00
Cédric Krier
cf0b20da58
Do not change line type when calling on_change_product
...
The wizard to modify header calls on_change_product on all lines but their
type must not change.
Closes #12633
2023-10-22 10:36:20 +02:00
Cédric Krier
e2e05b146c
Use purchase line unit when invoice line has no unit
...
Closes #12462
2023-10-09 18:31:37 +02:00
Cédric Krier
bf71a702c9
Compute taxes when purchase is changed on line
...
Closes #12612
2023-10-04 17:18:47 +02:00
Cédric Krier
66e460b97d
Do not consider purchase as done when invoice or shipment state are none
...
If there are still line to invoice or to receive, the purchase should not be
done.
Closes #12594
2023-09-27 12:30:12 +02:00
Cédric Krier
10525611df
Add warning when receiving too much goods from purchase
...
Closes #12521
2023-08-24 18:18:15 +02:00
Cédric Krier
4268b22ad2
Require unit price only for confirmed purchase
...
This allows to send quotation to supplier without prices and fill them when
the quotation is received.
Closes #12498
2023-08-17 19:19:51 +02:00
Cédric Krier
c5a3340851
Update taxes when create invoices
2023-07-25 15:34:01 +02:00
Cédric Krier
a20b805f16
Store original planned date of stock move and compute delay
2023-09-10 21:28:51 +02:00
Cédric Krier
8a7aaeb278
Do not invoice non order line
...
As we can only ensure to keep the layout for the first invoice, it is less
astonishing for the user that we never invoice the non lines.
2023-08-26 14:59:59 +02:00
Cédric Krier
ccfd9e0797
Create invoice line for not line only if it is for the first invoice
...
This is the only case where we are sure that the layout will be conserved.
Closes #12320
2023-08-25 22:37:22 +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
cb08557fad
Rename Uom to Unit for move and inventory
...
Closes #2221
2023-08-22 13:18:33 +02:00
Cédric Krier
0a6e049de2
Pre-validate invoice address when confirming purchase
...
The invoice address is only required from confirmation.
Closes #12499
2023-08-17 19:29:48 +02:00
Cédric Krier
536d95a219
Do not require purchase date when pre-validate on quotation
...
The purchase date is filled by default on confirmation.
Closes #12499
2023-08-17 19:24:03 +02:00
Cédric Krier
3cbb0efb43
Order by descending id to get the last 10 purchases
...
Closes #12497
2023-08-17 16:18:21 +02:00
Cédric Krier
d44f20599a
Keep the existing purchase price if the price from the product is empty
2023-08-17 16:16:17 +02:00
Cédric Krier
4deaaf59a2
Round price returned by get_purchase_price
2023-08-17 17:57:11 +02:00
Cédric Krier
982356c4ab
Test purchase invoice to skip using instance
...
Since baf7fc59e2d4 skips contains a sets of instances instead of of ids.
Closes #12476
2023-08-16 18:30:57 +02:00
Sergi Almacellas Abellana
c9b90a362c
Add search context fields to purchase line product depends
...
They should be added explicity because they are not included in display_depends
nor edition_depends
Closes #12407
2023-07-19 11:46:44 +02:00
Cédric Krier
3dac1d819d
Add a button to create invoices manually from purchase
...
#12412
2023-07-19 11:26:33 +02:00
Cédric Krier
f2ebadf1da
Test company header is not empty before using its id
...
Closes #12363
2023-07-18 22:58:23 +02:00
Cédric Krier
aa1475a467
Use boolean value when enforcing value to edit delivery date of purchase line
...
The clients always convert Boolean field values into boolean so the domain
validation against None value is always failing.
Closes #12306
2023-06-05 15:18:11 +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
dc3afbd016
Define process delay per sale and purchase
...
Closes #12209
2023-04-12 13:42:18 +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
5c3f4e503e
Use fixed location type to compute quantity to invoice for sale and purchase
...
Using the computed location to get the expected type is not reliable because
for return order, the location can be of different type and the stock move can
change of location type.
Closes #12203
2023-04-13 17:45:09 +02:00
Cédric Krier
a1538856b7
Fill taxes from default account for sale and purchase line without product
...
Closes #2479
2023-04-09 19:58:49 +02:00
Cédric Krier
b9c4b8230d
Return instance in on_change_with methods
2023-03-26 09:49:00 +02:00
Cédric Krier
9ad95c58ed
Log modification of sale and purchase header via wizard
2023-02-08 19:05:00 +01:00
Cédric Krier
ea62dea8da
Log transition of invoice and shipment states of sale and purchase
2023-02-08 19:04:42 +01:00