Commit Graph
110 Commits
Author SHA1 Message Date
Cédric Krier 0e92537753 Do not generate UPDATE query if there is no columns to erase
Some erasure cases may not need to update columns but just remove attachment
or inactivate the record.

issue7380
review38171002
2018-04-20 18:40:37 +02:00
Sergi Almacellas Abellana c2059a2d60 Use deactivable mixin
issue4341
review38401002
2018-03-26 14:10:40 +02:00
Cédric Krier 611b5b5fd2 Add Erase Party wizard
issue7169
review37031002
2018-03-24 00:02:03 +01:00
Cédric Krier 4dcb4214fd Search party also by contact mechanisms
issue7106
review35911002
2018-02-19 19:17:39 +01:00
Cédric Krier 895a0d4344 Add contact_mechanism_get on Party
Similar to address_get but for contact mechanisms with types and usage
parameters.
It also adds the method 'usages' to allow other models to retrieve a selection
list ready to use. Each module must inherit it and append the field name to
the _fields parameter.

issue7093
review35901002
2018-02-19 19:14:42 +01:00
Cédric Krier fa3d7d8be3 Remove search call in address_get
For performance, it is better to use addresses attribute which is cached
instead of doing a search request on each call.

issue7092
review36961002
2018-02-11 14:53:15 +01:00
Cédric Krier b807d59724 Move party lang migration from Party.__register__ to PartyLang.__register__
The query can not work if the table PartyLang is not yet created.

issue6552
review35151002
2017-07-26 23:27:07 +02:00
Cédric Krier 57c22a788a Remove Property fields
issue2349
review23361002
2017-04-01 00:31:21 +02:00
Cédric Krier 09f9c192cb Use static selection for identifier type
This makes the selection translatable.

issue6374
review35301002
2017-03-21 10:42:59 +01:00
Cédric Krier 0ab856f728 Add help text
issue6309
review26201002
2017-03-16 18:32:07 +01:00
Cédric Krier 7d4ef33559 Rename VAT Code into Tax Identifier
This is a more generic name which match better with the actual usage.

issue6000
review32741003
2016-10-31 17:30:23 +01:00
Cédric Krier d5494f7559 Add sequence order on Identifier
This will allow to rely on the order to select an identifier.
Also it adds a type_string to use it in report.

issue5998
review26861002
2016-10-31 17:28:25 +01:00
Cédric Krier 41ab8e990e Use empty dictionary for default addresses
The client will anyway call default_get to get the default values but it will
do it only for the fields present in the view. This will prevent the client to
fetch the definition of the fields that were not in the view.

issue5919
review28851002
2016-10-05 22:46:20 +02:00
Cédric Krier 3cd9694f5f Add Replace Party wizard
issue5820
review26581003
2016-10-02 15:18:38 +02:00
Cédric Krier e538f73d4f Improve search_vat_code
- Use where clause to ensure to test code and type of the same record
- Add party without code for clause that match with None

issue5679
review28441002
2016-07-11 18:26:02 +02:00
Sergi Almacellas Abellana 589bd2cd49 Add missing depends on Identifier.check_code
issue5689
review31331002
2016-07-11 09:25:29 +02:00
Cédric Krier c8fd86722d Remove Party Language configuration
The Party language is now a property for which the default value is no more
managed by default method.
Also it is probably better to leave the field empty if user doesn't know than
having a default value set like that a choice can be done at run time.

issue5198
review20111002
2016-03-25 10:44:39 +01:00
Cédric Krier dd8278aefd Pre-validate identifier code
issue5357
review17091002
2016-03-05 17:27:36 +01:00
Nicolas Évrard f9cb8c8999 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:54:45 +01:00
Luciano Rossi ba978aa93a replace invalid_vat with invalid_eu_vat as a key at error_messages dict
issue5140
review16861002
2015-11-17 17:15:53 -03:00
Luciano Rossi db31fa2b37 Remove required on Party name
issue4436
review24611003
2015-11-17 14:41:16 -03:00
Cédric Krier bb6251b515 Change Party.lang into Property
issue4926
review17401002
2015-09-04 11:55:44 +02:00
Cédric Krier 63d96511c7 Fix identifier migration when both columns are empty
issue4906
review22371002
2015-08-14 18:08:07 +02:00
Sergi Almacellas Abellana da47dc26b0 Fix typo on vat_code searcher
issue4903
review15591002
2015-07-31 11:28:35 +02:00
Cédric Krier 5858ed9475 Add a list of identifier to party
issue3869
review17331002
2015-07-28 07:56:09 +02:00
Cédric Krier 16783d0472 Use Constraint instance in ModelSQL._sql_constraints
issue4814
review15491002
2015-06-22 16:59:29 +02:00
Cédric Krier 91bc80acf4 Fix search_rec_name for negative operator
In case of negative operator, each subclause must be composed with 'AND'.

issue4559
review6221002
2015-04-05 23:32:49 +02:00
David Harper 063f601232 change Ok to OK
issue4290
review9091003
2015-03-10 18:41:24 +01:00
Cédric Krier acf3864a27 Improve logging
issue4458
review11781002
2015-03-02 23:41:09 +01:00
Cédric Krier e29f8bd56e search_global yields record instead of id
It is better for customization to yield record instead of id to prevent to
instantiate a second times the record.

issue4519
review6871002
2015-02-04 13:38:14 +01:00
Cédric Krier 14447a42f7 Compact vat_number
It is better to standardize the format of the vat number using the compact
method of python-stdnum.

issue4445
review14861002
2015-01-12 22:53:00 +01:00
Cédric Krier 1e0b4b0f3b Fix most flake8 errors
review8771002
2014-12-02 12:55:24 +01:00
Cédric Krier 725a057ba2 Remove code_length and use char_length function instead
review10341002
2014-05-27 22:33:51 +02:00
Jordi Esteve 914b1a4032 Use OR clause in search_rec_name of party and address
issue3706
review3751002
2014-02-25 10:54:03 +01:00
Cédric Krier ff06428807 Add icon to global search
review3511002
2014-02-20 23:28:21 +01:00
Cédric Krier de730ce10d Use fields.depends decorator
issue3487
review2301002
2014-01-26 14:29:16 +01:00
Cédric Krier 4bc0f7e116 Use a sequence of records, values in write
issue3499
review1641003
2013-12-19 14:45:04 +01:00
Cédric Krier b5b4bc2bf7 Prevent default addresses in Party.create
issue3173
review1201002
2013-10-27 19:33:45 +01:00
Nicolas Évrard 7f29cf5cda Fix usage of return in validation method
review1126002
2013-10-15 15:08:53 +02:00
Cédric Krier c6d0aaab80 Migration to python-sql
review1001002
2013-09-06 22:34:20 +02:00
resteve bf9c2b0c4c Fix flake8
issue3185
review834002
2013-04-26 17:10:50 +02:00
Cédric Krier 30a434dd21 No need to manage copy of one2many
Copy of one2many is correctly managed since changeset aec785ab8362 (1.2.0)

issue3142
review786002
2013-04-16 15:19:25 +02:00
Udo Spallek 2aca787215 Add missing Active Record migration.
issue3086
review739002
2013-03-25 21:09:35 +00:00
Cédric Krier 957280d8ac Remove _inherits
review670002
2013-03-20 22:50:48 +01:00
Albert Cervera i Areny 04732ae2b0 Replace _constraints with validate in ModelStorage and improve user messages.
issue2616
review371002
2013-03-07 16:55:03 +01:00
Cédric Krier be27fcfb8f Fix flake8 2013-02-24 14:11:02 +01:00
Albert Cervera i Areny 16715fac8f Use a list of dictionaries in create().
issue2358
review266002
2013-01-06 22:18:13 +01:00
Cédric Krier 0e71931c2c Fix domain concatenation between list and tuple 2012-10-06 22:10:12 +02:00
Jean Cavallo 4d84501fef Active Record 2012-09-24 22:10:20 +02:00
Cédric Krier 7d37313c72 Fix domain concatenation between list and tuple 2012-09-19 22:20:38 +02:00