Commit Graph
313 Commits
Author SHA1 Message Date
David Harper cb60dc6b34 Get account from pool in UpdateChart default_start
issue9663
review329121002
2020-10-03 12:26:12 +01:00
David Harper b581907bac Get account from pool in CreateChart default_properties
issue9657
review306531002
2020-10-03 12:24:19 +01:00
Cédric Krier 80fc35e01d Add General Ledger per account and party
We define an internal AccountParty model which defines an unique ID for the
couple account and party based on the first move line created.
Then we define a General Ledger model based on this model.

issue7438
review314091002
2020-09-05 22:21:38 +02:00
Sergi Almacellas Abellana 28175f11bf Set default accounts on create and update chart wizards
issue9382
review306261002
2020-08-25 18:04:50 +02:00
Cédric Krier bdcc82beea Re-browse account updated to get inactive context
issue9473
review307941002
2020-07-24 09:55:35 +02:00
Cédric Krier 54075ed98b Add model, record and records attribute on Wizard
issue9421
review309861012
2020-07-07 23:56:09 +02:00
Cédric Krier 3d9739011f Fall-back to move date on aged balance
Putting empty maturity date on the last term does not reflect properly the
history of the balance. As we consider such line to be paid or received today,
it is better to use the date at which the move was effective.

issue9294
review305481006
2020-05-19 18:59:55 +02:00
Cédric Krier 371b35b9f5 Do not copy template of account type
issue9269
review307531002
2020-04-28 00:33:45 +02:00
Sergi Almacellas Abellana b04944abdd Improve posted move help text
issue8670
review319121002
2020-04-12 09:01:29 +02:00
Sergi Almacellas Abellana 624a80692b Order account by its code and name
issue9180
review297361002
2020-04-06 12:56:19 +02:00
Cédric Krier 6151377044 Add optional debit type on account
The balance of the account is added to the debit type instead of the regular
type if the debit is greater than the credit.

issue6601
review262771002
2020-03-28 14:17:49 +01:00
Cédric Krier f5d1d549d7 Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.

issue9082
review297061002
2020-03-01 12:33:50 +01:00
Cédric Krier cf6a464261 Remove trailing space in taxes help 2020-01-12 10:21:51 +01:00
Sergi Almacellas Abellana 76881d178d Add missing end dot on translatable strings
issue8670
review262311002
2019-12-18 09:16:34 +01:00
Cédric Krier 567eb41095 Add missing parent depends
issue8712
review258221002
2019-10-16 21:17:39 +02:00
Cédric Krier 31713f8cbf Prevent assign unknown attributes on Model
by adding __slots__ on PoolMeta

issue8567
review254091002
2019-09-07 23:45:08 +02:00
Cédric Krier 7b42f1faf9 Skip closed account on general ledger
issue8491
review271781002
2019-07-20 21:47:01 +02:00
Cédric Krier 320cad650d Add default company value for account type
issue8471
review265641002
2019-07-09 23:24:51 +02:00
Luciano Rossi (lukio) 63c6a38a03 Fix typo in states key name
issue8262
review263321002
2019-04-12 13:06:31 +02:00
Sergi Almacellas Abellana 9f17797504 Remove starting wildcard when searching on codes and numbers
issue7347
review64541002
2019-04-11 15:20:02 +02:00
Cédric Krier 0929d8d550 Merge account kind and account type
issue4990
review68401002
2019-03-24 18:00:01 +01:00
Cédric Krier 53b3e68c3e Do not recreate models that have template override is True
The dictionary template2*** must always be filled even if template override is
True because create_*** calls will use this dictionary to not recreate the
records.

issue7938
review54551002
2019-03-08 18:48:09 +01:00
Cédric Krier 1e447a7f39 Add ir.message and use custom exceptions
issue3672
2018-12-29 14:20:28 +01:00
Sergi Almacellas Abellana 1d3ffebf6b Ensure end periods is set when computing GL debit and credit amounts
As the diference between end_periods and start_periods is computed, the end
periods should have a value when the start periods is set otherwise and empty
list of periods is used

issue7838
review47721002
2018-12-03 11:35:19 +01:00
Korbinian Preisler 1792996783 Use list of ids in add operation on Many2Many in update_account2
issue7791
review72351002
2018-11-25 14:38:39 +01:00
Cédric Krier 8f9d06743f Ensure GL per periods or dates are the same
We should not use nonexistent period ids in the context and the start_date
must be excluded from the start computation because it is included in the
range (query_get use greater and lesser or equal).

issue7628
review60421002
2018-11-18 12:05:42 +01:00
Cédric Krier 944e103b1e Do not recursively extend the base domain of parent and childs
The base class can not extend domain in __setup__ because it modify the field
of the base class.

issue7834
review52521004
2018-11-18 12:00:11 +01:00
Cédric Krier 4a27e24c32 Improve ModelStorage.copy
* Allow callable in copy default
* Support dotted notation in copy default
* Use setdefault in copy
* Copy default when needed
* Do not set default state in copy
* Use callable and dotted notation in copy default

issue5576
issue7648
review72291002
2018-09-01 01:02:03 +02:00
Cédric Krier 317858703d Add support for chart of account evolution
* Add replacement account
* Add period on account and tax code

issue7417
review45671002
2018-08-31 14:58:05 +02:00
Cédric Krier 6485829233 Remove migration before 3.0
issue6470
review52421002
2018-08-09 20:43:51 +02:00
Cédric Krier 8758950427 Add __table_handler__ to ModelSQL
issue7581
review48531002
2018-07-24 22:01:07 +02:00
Cédric Krier 9dda2b3560 Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:40 +02:00
Cédric Krier fb54f508a3 Use tree mixin
issue7383
review45011002
2018-05-12 00:47:07 +02:00
Cédric Krier 8108634d0a Fix Decimal conversion for SQLite
changeset 3de9de3f476c set initial balance value as Decimal. But as the SQLite
Decimal loop break on the first correct instance, it fails to convert other
value coming from the SQL if the default value is tested first.
As there is any way a second loop, it is faster to make the conversion in this
second loop.

issue7284
2018-04-18 10:50:42 +02:00
Cédric Krier e2d8d0a808 Quantize to number of digits instead of rounding computed amount
Rounding may change the result if currency rounding is not unitary.

issue7284
review37251002
2018-04-18 10:18:37 +02:00
Cédric Krier e798828de9 Ensure None are before 0
The next index must point to the next value and not a None value which are
skipped.

issue7350
review38161002
2018-04-17 17:56:02 +02:00
Sergi Almacellas Abellana 5b788c768e Use deactivable mixin
issue4341
review38401002
2018-03-26 14:08:06 +02:00
Sergi Almacellas Abellana fccc268d69 Remove readonly by template on children fields
This was wrongly added on changeset 622fea89afd3

issue6912
review43241002
2018-03-26 10:19:52 +02:00
Cédric Krier 9f30868af2 Use tax code line for tax reporting
issue6013
review40171002
2018-03-25 23:33:46 +02:00
Sergi Almacellas Abellana f3437f5353 Open general ledger accounts from Income Statement relate
issue6747
review43961002
2018-03-23 13:19:43 +01:00
Sergi Almacellas Abellana 05062db146 Add company domain on account children
The domain is required to ensure the behaviour is consistent with the parent

issue7078
review37941002
2018-03-14 13:10:26 +01:00
Sergi Almacellas Abellana 1aacf5a680 Add warning when creating a second chart of account
issue6664
review44121002
2018-03-14 13:02:50 +01:00
Sergi Almacellas Abellana 49cf380a61 Manage chart update per record
issue6912
review44501002
2018-03-09 11:40:50 +01:00
Sergi Almacellas Abellana 1c1f5af674 Hide party required for non deferral accounts
issue6987
review39031002
2018-02-15 10:53:13 +01:00
Sergi Almacellas Abellana 1d4583045c Do not include start date when searching previous fiscalyear to cumulate
As there is a check to ensure that fiscalyears does not overlap it does not
make sense to include fiscalyears which end on the same start date as the
start of the current fiscalyear.

issue5131
review41811002
2018-02-01 13:35:31 +01:00
Cédric Krier 67cda0a166 Replace tree open wizard by simple relate
This allow to preserve the full context from balance sheet or income
statement.
Unfortunately both reports are using a different context model so it is not
possible to use a common context model on the account view.

issue6747
review36631002
2017-09-27 18:52:35 +02:00
Sergi Almacellas Abellana a23876a78c Add company domain on income statement
Also add company domain on fiscalyears

issue6726
review39631002
2017-09-20 13:33:17 +02:00
Cédric Krier c37b28abf6 Add searcher on General Ledger
It is implemented by evaluating the field for all accounts because the
computation can not be reduced into a SQL query as it may require recursive
computation for all previous fiscal year.
It should not be a problem as the number of account is normally quite static
overtime and the number should not exceed the query size of the database
backend.

issue5168
review41521002
2017-09-07 18:47:52 +02:00
Cédric Krier d2eeaaa723 Add from_date and to_date in Move.query_get
Add those fields to the context of GeneralLegder and IncomeStatement.

issue6692
review43361002
2017-09-07 18:40:32 +02:00
Sergi Almacellas Abellana b1c842a668 Do not set multivalue fields on create char properties
This ensures that the singleton is created when setting the account properties.
Singletons models return the default values when no model exists so the saved
multivalues are ignored if the singleton is not created.

issue6421
review36301002
2017-04-06 14:56:32 +02:00