Commit Graph
87 Commits
Author SHA1 Message Date
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
Cédric Krier df31d37ae5 Enforce domain on ignored and recreated invoices and stock moves 2024-03-01 14:55:14 +01:00
Cédric Krier 1846050401 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
2024-03-08 12:36:57 +01:00
Cédric Krier ce530c6c0b Remove custom table names 2023-12-26 12:18:00 +01:00
Cédric Krier 9223f374bf Use same sign when deducing ignored stock moves of remaining quantity to be paid
When the quantity of the line is negative, the quantity of the ignored stock
move must be added instead of subtracted.

Closes #12988
2024-02-02 13:48:12 +01:00
Cédric Krier b4608428fb Compute name of the product for sale, purchase and invoice lines
Instead of having the code in the report templates, we use a property that can
be extended without updating the template.

Closes #12892
2024-01-04 23:55:09 +01:00
Cédric Krier bfbab59ebf Use usage from context for default contact mechanism on party 2024-01-04 18:48:14 +01:00
Cédric Krier d3e086aace Order cancelled document without number last
Closes #12899
2024-01-05 15:33:57 +01:00
Cédric Krier 61e1b18e76 Compute remaining quantity of sale and purchase order following their method
Ignored quantities must be deduced from the remaining quantity.

Closes #12698
2023-12-17 17:07:41 +01:00
Cédric Krier 7e9d69f07f Set state to done when all lines of sale or purchase are cancelled
So when the shipment and invoice state are None and all lines have an 100%
progress, then the order should be considered as done.

Closes #12698
2023-11-01 16:37:23 +01:00
Cédric Krier da3c68d0c0 Add invoice progress on sale and purchase line 2023-11-01 16:34:42 +01:00
Cédric Krier 92a3ddb9ee Set shipment state of sale and purchase to None when all stock moves are cancelled
Closes #12697
2023-11-01 16:32:41 +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