Commit Graph
111 Commits
Author SHA1 Message Date
Cédric Krier a49aa67d73 Calculate the quantities to ship and to invoice for sale and purchase 2026-03-27 19:32:32 +01:00
Cédric Krier 905a2b20ba Rename invoice method on shipment into on fulfillment 2026-02-25 11:37:37 +01:00
Cédric Krier 55da16f6a7 Use party lang Function field to set language for taxes and chat 2026-03-06 10:50:48 +01:00
Cédric Krier 7fb5a4a3de Do not use Literal to count in SQL
The * is not actually a parameter of the aggregate function so it is better to
let python-sql manage it with its default value.
2025-12-25 09:47:23 +01:00
Cédric Krier 70701c14e4 Add depends on methods of TaxableMixin 2026-01-17 12:54:09 +01:00
Cédric Krier 93a5e6ceb8 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
2025-11-25 18:38:51 +01:00
Cédric Krier 6f26a9cc79 Add chat to operational documents 2025-12-02 16:01:39 +01:00
Cédric Krier e576fcacc9 Rename _get_invoice_purchase in _get_invoice on purchase 2024-02-21 15:07:52 +01:00
Cédric Krier d4c6400c26 Include the line in the warehouse required error message for sale and purchase 2025-10-30 01:14:10 +01:00
Cédric Krier 6c7e903226 Test from location when checking warehouse for purchase line with negative quantity
Closes #14333
2025-10-30 01:11:22 +01:00
Cédric Krier 29e6c6e0c9 Do not copy reference field by default
Closes #14140
2025-08-01 00:10:49 +02:00
Cédric Krier ea26652f45 Simplify tests by using movable property of line instead of product type 2025-07-10 17:52:16 +02:00
Cédric Krier a4a655b05e Use explicit key when computing taxes and object instead of dict
This defines explicitly the available attribute and unify the use the values as
tax line instead of the keys.
2025-05-30 21:35:55 +02:00
Cédric Krier 0d361542fe Do not use state Function field of line to check against modification
The Function field is an helper to write PYSON statement so there is no need to
use it for checks.

Closes #14002
2025-05-08 18:36:13 +02:00
Maxime Richez 4cf2384552 Set empty currency and unit price on stock move when not required
Closes #14023
2025-05-16 13:20:28 +02:00
Cédric Krier 1b50ab9624 Make lines of sales, subscriptions and purchases read only without a company and currency
Closes #13948
2025-03-27 23:07:41 +01:00
Cédric Krier 275248478a Ensure the contextual company is not None and positive before using it
Closes #13868
2025-03-10 23:43:49 +01:00
Cédric Krier 5aeff66acd Use ModelStorage hooks instead of extending create/write/delete 2025-04-06 00:14:17 +02:00
Cédric Krier 1772caec90 Clean migrations for series before 6.0 2025-01-04 00:19:42 +01:00
Nicolas Évrard cbdad75620 Remove old-style of super() calls 2025-04-04 00:45:18 +02:00
Cédric Krier bee0a048f9 Add partial index on sale and purchase line for relate from product
Closes #13887
2025-02-25 10:05:43 +01:00
Cédric Krier 8fc5d631b9 Add quotation expiration date to purchase 2025-02-07 16:25:03 +01:00
Cédric Krier 743f622a31 Link invoice lines and stock moves for different quantity sign if invoice method is not shipment
Closes #13821
2025-01-16 17:38:14 +01:00
Cédric Krier eb6c40f135 Do not sum purchase line without amount to calculate purchase amounts
04e9bc5b56f3 removed the test against empty amount with the line test.

Closes #13784
2025-01-03 11:02:29 +01:00
Cédric Krier c03dff9352 Support instances as default value
Closes #13694
2024-11-20 12:08:20 +01:00
Udo Spallek 8b252472c4 Replace usage of docstring of Model by __string__ attribute
Closes #8402
2024-11-19 10:09:52 +01:00
Cédric Krier 0e0f5f0ec6 Do not convert invoiced quantity if sale or purchase has not unit
Closes #13593
2024-10-27 19:41:19 +01:00
Cédric Krier afb909aa41 Fix missing target field in operand of domain 2024-10-28 21:23:57 +01:00
Cédric Krier d967356c7e 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
2024-10-11 15:59:18 +02:00
Cédric Krier a87be1db6a Do not return empty for planned deliver date of purchase line when it is in the past
Closes #13298
2024-09-07 14:00:50 +02:00
Cédric Krier 8523552c12 Test invoice of invoice line before using it to compute remaining quantity
Closes #13534
2024-09-19 19:14:31 +02:00
Cédric Krier c47fc79f06 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
2024-08-27 13:24:29 +02:00
Cédric Krier cae99922de Group numbering purchases 2024-08-25 12:16:12 +02:00
Cédric Krier b222ab29f9 Improve exception handling wizard
We use two Many2Many fields to let the user explicitly fill them with the
records to ignore or recreate.
Any cancelled records that have not been added to one of the fields, will stay
in exception to be proceeded later.

Closes #8142
2024-08-21 17:33:14 +02:00
Cédric Krier f350adcee3 Remove "Parties associated to Purchases" menu entry
Closes #6935
2024-08-06 16:51:57 +02:00
Cédric Krier a2dfc4455b Refine index definition
- Set low and high cardinality to index usage
- Use Range usage for numerical expression instead of Equality
2024-07-27 18:36:14 +02:00
Cédric Krier 01574e6700 Add searcher to summary fields
Closes #13401
2024-07-18 10:12:04 +02:00
Cédric Krier be68d7ad69 Use a separate browse list to compute amounts from non cached states
The browse record list loops over the ids of the list to complete the read
batch. So move the record without cache at the end does not prevent to read
the lines of the first records with cache. A separate browse list must be used
for the records without cache to prevent to read lines from record with cache.

Closes #13396
2024-07-27 10:16:51 +02:00
Cédric Krier 48ad8ebb02 Add filtered One2Many fields on sale, purchase and invoice
This allows to create only instances for the lines of type line when only
those lines are needed.
This mainly avoid to compute amount for subtotal lines when accessing the
amount of instance of type line.
2024-06-22 16:50:48 +02:00
Cédric Krier 4fd13555f4 Add movable field on sale and purchase line 2023-11-18 00:24:33 +01:00
Cédric Krier e8acbc6a8c Index invoice and shipment state partially on their own state
Closes #13365
2024-06-26 18:37:26 +02:00
Cédric Krier 376dbeddb5 Clear cached amount when resetting to draft sale, purchase and purchase requisition
Closes #13296
2024-06-13 12:34:50 +02:00
Cédric Krier 09985de225 Always clear cached amount before storing it
This is safer as if for some reason the cache is filled with wrong data, the
values will be fixed instead of keep propagating it.
2024-06-13 12:32:08 +02:00
Cédric Krier 347a161353 Do not copy cached amounts of sale, purchase and purchase requisition
Closes #13336
2024-06-13 12:11:51 +02:00
Cédric Krier 575d1d0132 Change _changed_values and _save_values properties to method
Closes #13317
2024-06-09 19:54:52 +02:00
Cédric Krier 2244c964fe Add "Stock" prefix to stock move labels 2024-06-03 10:48:34 +02:00
Cédric Krier 06270e6a7a 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
2024-04-30 19:15:44 +02:00
Cédric Krier 787595125a Depends on xxx2many fields when they are assigned by a change function
Closes #13099
2024-04-22 08:59:48 +02:00
Cédric Krier 3a25fc0df9 Always return float for invoice or moves progress
The fields are Float so they must return a float.
2024-04-04 15:12:21 +02:00
Cédric Krier 2a8626afd5 Permit to remove ignored invoices and stock moves
Closes #13066
2024-03-01 14:44:47 +01:00