Cédric Krier
208ac87281
Add support for scanning code
2023-07-04 17:50:50 +02:00
Cédric Krier
d3b553bf23
Reject deferred with the error as argument
2023-07-03 19:42:55 +02:00
Cédric Krier
d47163be93
Add unittest for MatchMixin
2023-08-18 17:06:44 +02:00
Cédric Krier
b7432a677d
Convert pattern values into boolean when matching boolean field
...
Closes #12504
2023-08-18 17:06:26 +02:00
Cédric Krier
270ee0f8cb
Remove Weight UoM Digits on carrier price list
2023-08-20 12:50:27 +02:00
Cédric Krier
2df68915d8
Remove quantity UoM digits on stock location
2023-08-20 12:49:38 +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
780e781d69
Rename Lot Unit to Lot UoM for product
...
Closes #2221
2023-08-20 11:31:15 +02:00
Cédric Krier
3a6e278b39
Rename UOM to Unit for purchase request
...
Closes #2221
2023-08-21 09:31:27 +02:00
Cédric Krier
cd9dcfd84c
Rename Uom to Unit for bill of material
...
Closes #2221
2023-08-20 01:39:36 +02:00
Cédric Krier
38e87b12f8
Rename UOM to Unit for forecast line
...
Closes #2221
2023-08-20 01:24:32 +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
d44297eae6
Rename UOM to Unit for product supplier
...
Closes #2221
2023-08-21 09:30:21 +02:00
Cédric Krier
b494a58475
Rename Uom to Unit for production
...
Closes #2221
2023-08-19 15:22:30 +02:00
Cédric Krier
a44c520de8
Fill unit price of purchase line in test scenario
...
Since 2f25450e11f6 the unit price is no more filled if there is no supplier
price or previous purchase.
2023-09-11 22:07:13 +02:00
Cédric Krier
919e6b13fa
Fill unit price of purchase line created automatically
...
Since 2f25450e11f6 the on_change_product does not always set a unit price for
purchase line. But as the field is required, it must be filled for line
created.
2023-09-11 22:06:11 +02:00
Cédric Krier
c583528ca8
Do not set rec_name for unsaved record
...
Since 0db956eb2505 _changed_value is used for on_change_with calls, so it can
have to deal with unsaved Many2One value if it is the parent of a One2Many.
2023-09-11 22:02:27 +02:00
Cédric Krier
8885e86581
Return an entry for each value in names of Function field getter
...
0db956eb2505 removes this behavior if the getter return an empty defaultdict.
2023-09-11 21:58:22 +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
297a9f4f1d
Use price from last purchase as product price
...
The cost price is not really relevant as purchase price because it may include
extra cost like landed cost.
Closes #12494
2023-08-17 16:26:09 +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
2df45a15d4
Ensure to always have a unit price on purchase line created from request
2023-08-17 16:16:56 +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
4430198462
Set only once date when computing purchase and sale prices
2023-08-17 16:13:40 +02:00
Cédric Krier
4deaaf59a2
Round price returned by get_purchase_price
2023-08-17 17:57:11 +02:00
Cédric Krier
f03ccfd7a6
Round price returned by get_sale_price
2023-08-17 17:57:32 +02:00
Cédric Krier
42ba6d2d66
Use absolute quantity to compute sale price
...
Closes #12496
2023-08-17 16:30:28 +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
Cédric Krier
e1123853ab
Do not skip many2many in _changed_values
...
Like the one2many they should always be processed as they can have been
updated.
Closes #12474
2023-08-16 11:37:12 +02:00
Cédric Krier
bc5a28a50c
Use _changed_values to return result of on_change_with
...
This allows to support add/update/remove/delete for xxx2many fields and
rec_name for xxx2one and reference fields.
Closes #12473
2023-08-16 16:11:51 +02:00
Cédric Krier
9aa4a8583b
Add decorator on RPC
2023-08-16 10:39:16 +02:00
Cédric Krier
fe66322ab1
Use on_change_result for on_change call
...
The ModelView.on_change method returns directly the changed values instead of
a list with the changed values.
2023-08-16 09:37:26 +02:00
Cédric Krier
bce30f97f9
Update _changed_values docstring about Many2Many
...
Since 41f7d6828fcd Many2Many are managed the same way as One2Many.
2023-08-16 09:20:09 +02:00
Cédric Krier
b0e4093dcb
Trigger build when .readthedocs.yaml is changed
2023-09-03 18:05:23 +02:00
Cédric Krier
8a38e435fc
Set a return url when confirming setup intent in test scenario
...
A return URL is now required if the payment methods do not disable it.
Closes #12509
2023-09-04 23:38:57 +02:00
Cédric Krier
310d8d1daf
Set visibility of active button when screen is displayed
...
Setting it on the domain parser property does not ensure that it is always set
if the parser has been cached or the context screen is not valid.
Also it is not right that accessing a property trigger a change of state.
As the button visibility can change between views, the active domain must only
be added if the button is currently visible.
Closes #12549
2023-09-04 18:32:52 +02:00
Cédric Krier
8d7e1b6b83
Do not try to duplicate moves for transit if internal shipment has no move
...
Closes #12541
2023-09-04 16:47:49 +02:00
Cédric Krier
1f3dcc86c7
Do not fail to copy empty list of ModelStorage
...
Closes #12541
2023-09-04 16:41:33 +02:00
Cédric Krier
edd198c949
Extend translation index to be fully used when searching on translated field
2023-08-29 11:03:19 +02:00
Cédric Krier
423e32a989
Backed out changeset 10e16de6a494
...
Applying the domain on the LEFT JOIN create wrong result because the fallback
value (from COALESCE) is then used even if a valid translation exists.
Closes #11781
2023-08-29 10:51:04 +02:00
Cédric Krier
7f9550e9ba
Return 0 as default recomputed fixed cost price
...
Closes #12535
2023-08-29 14:24:58 +02:00
Cédric Krier
93dc054222
Select current revision when showing the revision popup
...
Closes #12472
2023-08-14 19:44:38 +02:00
Cédric Krier
7b02a795c7
Do not use the lower revision when selected revision is empty
...
Closes #12472
2023-08-14 19:43:52 +02:00
Cédric Krier
523bcd4011
Use module name to build path for readthedocs requirements
2023-09-03 12:03:49 +02:00
Cédric Krier
6a06579e13
Use Sphinx book theme for documentation
2023-09-01 09:44:09 +02:00
Cédric Krier
6d4b80cd6d
Remove shipment cost method if there is no carrier for web sale
...
Since 52a777d4e4d0 the shipment cost method is no more removed by on_change's.
Closes #12546
2023-09-02 09:54:06 +02:00
Cédric Krier
ea915152a7
Test deferred balance against a range of possible values
...
Depending of the day of the year, the amount deferred may vary of 2 days.
Closes #12545
2023-09-01 18:15:05 +02:00
Cédric Krier
1e1ee72f65
Use VARCHAR with size in SQL type for SQLite
...
Without the size the TableHandler creates a schema without size. When the
schema is updated, it raises a warning because it can not resize from no size.
Also even if SQLite does not enforce the size of the schema, at least we have
a correct schema.
Closes #12471
2023-08-14 19:36:28 +02:00
Cédric Krier
23a718ab1d
Do not render deactivated actions in completion
...
The disabled attribute is not enough to prevent the click event.
So it is simpler to not render the action that are not supported like tryton
does.
Closes #12470
2023-08-14 09:56:36 +02:00
Cédric Krier
51b032442d
Clean self references before deleting records
...
When deleting a full branch of a tree, if the number of records deleted is
higher than IN_MAX, the foreign key constraint may prevent the deletion
because the group of records deleted may still be referencing a record in the
next group to delete.
To prevent this failure, we must first clean the values of the column with
foreign key referencing the same table. We use the table id as value instead
of NULL in case the column is not nullable.
2023-08-10 16:42:36 +02:00
Cédric Krier
d1779f0430
Reuse get_related_records to search restricted foreign keys
2023-08-10 15:07:37 +02:00
Cédric Krier
dfa79b36b6
Simplify foreign key search in ModelSQL delete
2023-08-10 15:05:23 +02:00
Cédric Krier
b8e4b5bbc8
Use module name instead of package name in readthedocs configuration
2023-08-12 13:53:38 +02:00
Cédric Krier
e3444ecac8
Check modules against template model
...
Some files in modules should always be the same as the template.
We add a CI task to check those files against a new templated version of the
module.
2023-08-12 13:52:54 +02:00
Cédric Krier
804476f318
Remove translations with empty source
...
It is useless to keep fuzzy translation with empty source.
Closes #12477
2023-08-16 18:24:32 +02:00
Cédric Krier
36ca97d371
Add resource module on readthedocs index
2023-08-14 15:07:41 +02:00
Cédric Krier
ad6e147083
Prepend statement journal with Statement
2023-08-05 22:00:10 +02:00
Cédric Krier
babedd9246
Prepend payment journal with Payment
2023-08-05 21:59:48 +02:00
Cédric Krier
14bc5d2a6c
Use selection widget for journal fields
...
It is expected to have only a small number of journals.
But also it is uncommon to create of a new journal from a form.
So it provides a better user experience to use a selection widget.
2023-08-06 00:34:16 +02:00
Cédric Krier
5ce06c7d69
Post write-off and exchange moves when reconcile posted lines
...
Closes #12439
2023-07-29 15:10:59 +02:00
Cédric Krier
e862ca836a
Run doc tests with different globals
...
Closes #12441
2023-07-29 15:11:05 +02:00
Cédric Krier
98eeb1727a
Remove unused _location_amount from customer shipment
...
The method was introduced by a3aa9d985589 for the assign_try method but it is
no more used.
2023-08-20 01:18:11 +02:00
Cédric Krier
030dce36ac
Remove biginteger widget from tryton and sao
...
Since 73fe133d7a2c trytond does not have anymore a biginteger type.
2023-08-18 20:50:15 +02:00
Cédric Krier
1882caa576
Do not set carrier if no shipment cost is set
...
Since d7437e620941 the shipment cost can be defined per party. So a party
without shipment cost should not have a carrier set by default.
A carrier should be set by default only if it is required since bf0b2af7700f.
2023-08-11 09:49:22 +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
855a0aaeab
Update origin of outgoing moves for internal shipment
...
When synchronize moves, the origin of outgoing is updated to point the
new incoming move instead of the original one.
Closes #12272
2023-08-25 18:08:17 +02:00
Cédric Krier
b32eeae46a
Store synchronized moves of customer shipment even when quantity is not updated
...
ed41959390ff added a synchronization on assign to prevent infinite warning
loop on pack if it creates new move without origin.
But 38e2a76db719 refactoring lost this behavior.
Closes #12503
2023-08-18 14:47:39 +02:00
Cédric Krier
e2676bcd85
Discard disconnected connection from the pool
...
When a connection in the pool is disconnected, it stays in the pool and it may
still be served.
Using such connection raise an OperationalError and so the request is retried
but before that the connection is put back to the pool. So we may get it back
again.
It is not possible to distinct between an OperationalError due to a
disconnection or due to a isolation error for example.
So with the current design of Transaction API, an OperationalError always put
back the connection to the pool.
This main that we can only ensure that the connections served are still
connected by executing a simple query. And close connections that are failing.
Closes #12452
2023-08-04 15:59:35 +02:00
Cédric Krier
d6a92dc606
Add default price list line to test sale extra
...
Since d632eee3c4c3 the price list returns None as unit price if no matching
line is found.
Closes #12505
2023-08-21 09:57:28 +02:00
Cédric Krier
2d8cc458fd
Convert element joined domains into domain when searching for OR-ed domain
...
The content of joined domains can be a single clause, so it must be converted
into a domain before calling search_domain.
Closes #12460
2023-08-10 13:55:00 +02:00
Cédric Krier
d706ab7ffa
Support GIN index with btree_gin PostgreSQL extension
...
Closes #12480
2023-08-16 22:03:59 +02:00
Cédric Krier
f58582b636
Include Similarity in the indexed expression of BTREE
...
The Similarity expression increase the score and are supported in BTREE.
Closes #12479
2023-08-16 21:53:32 +02:00
Cédric Krier
318950e03b
Filter expressions for BTREE and GIN indexes
...
IndexMixin is calling the method _get_indexed_expressions instead of
_get_expressions.
Closes #12478
2023-08-16 21:50:05 +02:00
Cédric Krier
ac86331140
Use only stock move with cost price for product cost price history
...
The cost price on stock move is only required by validation so we can not
ensure over time that all the stock moves selected have a cost price.
Closes #12468
2023-08-12 20:10:06 +02:00
Cédric Krier
9cc5d449bb
Add missing new keyword when instantiate DomainInversion
...
The instantiation was added by changeset 47f8e9433d2d
2023-08-16 09:44:27 +02:00
Cédric Krier
de1386328b
Update style for flake8 6.1.0
...
Closes #12475
2023-08-16 11:49:30 +02:00
Cédric Krier
0fe7228d58
Try to post only clearing move of journals from the contextual company
...
Closes #12453
2023-08-05 00:27:11 +02:00
Cédric Krier
69c88b6a8a
Do not apply unaccent when searching on number fields
...
Closes #12435
2023-08-03 15:54:33 +02:00
Cédric Krier
9c2a9623e4
Delete on cascade account receivable rules
...
When company, account or journal are deleted, the rules using them should not
prevent the deletion and should be deleted as well.
2023-08-07 11:19:24 +02:00
Cédric Krier
bf9735dd5a
Remove useless state variable when initialize database
2023-08-14 22:02:09 +02:00
Cédric Krier
ad0b2411c8
Order number fields first by length
...
This is more natural for incremental field.
2023-08-03 15:53:18 +02:00
Cédric Krier
6daca5a307
Rename stock package code to number
2023-08-03 15:58:57 +02:00
Cédric Krier
7502b9d26d
Merge account dunning email logs into email archives
...
Closes #12214
2023-07-28 00:54:49 +02:00
Cédric Krier
4d3b90faea
Add missing ending dot in project invoice error message
2023-08-02 22:42:26 +02:00
Cédric Krier
cc3b71bae4
Replace domain on view type by validation on view tree optional
...
The validation of type must be recursive up to the first inherited view which
cannot be expressed with a domain.
Closes #12341
2023-07-30 10:45:03 +02:00
Cédric Krier
2b96ba7428
Add access rights to stock lots by locations
...
Closes #12348
2023-07-29 23:25:26 +02:00
Cédric Krier
b7e30235fd
Round and convert numeric value after applying factor
...
Closes #12381
2023-07-29 16:21:33 +02:00
Cédric Krier
6f56a6ba8d
Do not parse as integer null value
2023-07-29 16:20:30 +02:00
Cédric Krier
10d42631b0
Fix path for sphinx configuration in readthedocs configuration
2023-08-12 12:20:34 +02:00
Cédric Krier
e5d264a7ee
Add product_price_list_cache module
2023-08-12 09:06:26 +02:00
Cédric Krier
9dfcabf8c5
Update documentation of product_price_list_dates
2023-03-30 19:28:15 +02:00
Cédric Krier
5a23012694
Remove unit price to compute price list
...
Instead the value of unit price comes from the product and is defined on the
price list.
2023-03-30 19:11:27 +02:00
Cédric Krier
024a6bf0a3
Remove party to compute price list
2023-03-29 13:41:04 +02:00
Cédric Krier
8eb77eb3c5
Add a button to create shipment manually from sale
...
Closes #12412
2023-07-19 15:26:39 +02:00
Cédric Krier
6b4c649367
Add a button to create invoices manually from sale
...
#12412
2023-07-19 13:27:34 +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
f86cd2c6d4
Drop notification email log table after migration
...
And use the configured table name if set.
Closes #12438
2023-07-28 01:03:10 +02:00
Cédric Krier
14c0d66b11
Generate invoices and consumptions only for contextual company
...
Closes #12345
2023-07-24 23:51:00 +02:00
Cédric Krier
d41cb4d14a
Call the same search method in super call when extending for components
...
Closes #12434
2023-07-25 11:02:09 +02:00