- Aug 07, 2014
-
-
Olivier Dony authored
The extra parsing check is not necessary when we're not validating inputs, because in that case the values come from the database and are valid. The validation is quite expensive due to calls to strptime() + strftime().
-
Olivier Dony authored
This can give a performance boost on large databases and should not be a concern in terms of access control as the inheritance already grants access to the parent records.
-
Olivier Dony authored
-
Olivier Dony authored
-
Thibault Delavallée authored
management to access documents in notification emails, as well as for the 'view quotation' link in portal_sale module. models: added a get_access_action method: basically, returns the action to access a document. It uses the get_formview_action by default (form view of the document). However for some documents we want to directly go to the website, leading to an act_url action for some documents. This method allows this behavior. portal_sale: get_signup_url now uses the mail.action_mail_redirect method instead of directly redirecting towards a portal menu. This allows to fall back on a standard behavior. portal_sale: get_formview_action updated, to match actions tailored for portal users. website_quote: get_access_action of sale order updated. If the sale order has a template defined, the returned action is an act_url (website view of the quotation), not the form action anymore. mail: fixed signature + company signature in notification emails. Even without user signature, the company signature + access link should be correct. portal: signup url in notification emali was not using the mail redirection as action. It is now the case.
-
Thibault Delavallée authored
[FIX] tools: html_sanitize: keep mako tags (<% ... %>), required for example in the portal sale quotation email.
-
Christophe Simonis authored
-
Christophe Simonis authored
-
Christophe Simonis authored
-
- Aug 06, 2014
-
-
Olivier Dony authored
Due to the use of a sudo env, the records were being added to the sudo cache one by one instead of all at once. This meant the prefetching was not able to load all records at once, leading to prohibitive times when processing thousands of records.
-
Raphael Collet authored
This avoids code duplication between methods, and keeps backward compatibility with existing code overriding _name_search().
-
Raphael Collet authored
If a selection field is defined by a list as selection, such as: state = fields.Selection([('a', 'A'), ('b', 'B')]) one can extend it by inheritance by redefining the field, as: state = fields.Selection(selection_add=[('c', 'C')]) The result is that the selection field will have the list [('a', 'A'), ('b', 'B'), ('c', 'C')] as selection.
-
Christophe Simonis authored
As `_inherits` fields are now handled via `related` fields (not stored, obviously), a new descriptor `searchable` has been added to `fields_get()` result to indicated if the field is searchable or not.
-
Mohammed Shekha authored
Singleton object was required while access model properties, but search returns multiple results and hence caused traceback while accessing record.property
-
Raphael Collet authored
The one2many field 'user_ids' was initialized with an incorrect value for the inverse field 'wizard_id', using a res.users id. The latter was causing a MissingError exception. The fix is simply to not define explicitly the inverse field in the one2many. Also did a small cleanup of the code of the wizard.
-
Raphael Collet authored
The existing code was buggy when writing on *2many fields with a list of commands: the value was converted for the cache, but taking an empty recordset as the current value of the field.
-
- Aug 05, 2014
-
-
Raphael Collet authored
This makes the patching mechanism more flexible, and enables patching BaseModel, for instance. This should fix #1501.
-
Cecile Tonglet authored
It is not useful to try to create foreign keys when the destination model is a PostgreSQL view for example. We already do this kind of verifications but ir.actions and transient models but did not for _auto.
-
Raphael Collet authored
- simplify the code by removing unused cases - do not modify input argument 'value' of create/write - do not call BaseModel.read() with reified group fields (this causes warnings)
-
Wolfgang Taferner authored
Makes ordering transitions easier and more deterministic. (Rebase of #1564)
-
- Aug 04, 2014
-
-
Olivier Dony authored
See #1527
-
Denis Ledoux authored
-
Raphael Collet authored
When a new record is returned as the value for a many2one on a new record, the method Many2one.convert_to_write() now returns a NewID, and default_get() then discards that value from its result. This makes it consistent with its former behavior. Manual rebase of #1547
-
Raphael Collet authored
The fix consists in this: when setting up models, ignore manual fields that refer to unknown models if all models have not been loaded yet.
-
Denis Ledoux authored
On child partner creation of a parent partner, the commercial_partner_id is not computed (and stored) in the create method. Therefore, we should compute the commercial_partner_id before trying to sync his data
-
Raphael Collet authored
-
- Aug 01, 2014
-
-
Olivier Dony authored
If any missing or partially incorrect values cause an exception other than a psycopg2 error, we should still catch it, rollback that record and report the error, rather than letting bubble and fail without any feedback to the user. Fixes #1485
-
Martin Trigaux authored
-
Dharti Ratani authored
When a record is created, the magic fields (id, create_date,...) are first removed from the vals as the user should not set a value for these. However if a value for this is given in default value (e.g. defined in an ir.value), the creation would crash (sql error : column specified more than once) as the magic column would be added again.
-
Olivier Dony authored
These parameters are (or should be) irrelevant for a search_count(), and they could actually break the result or make it significantly slower (e.g applying `order` on large tables). This fixes a performance regression introduced by 0f43032b. We could also raise an error offset/limit are passed in combination with count, but that seems unnecessary. Also switched to "SELECT count(1)" for the count query, as it is simpler and just as fast. We'd get the same perf with * or any constant value, as in "SELECT count('me in')", but let's keep it simple ;-)
-
- Jul 30, 2014
-
-
Olivier Dony authored
-
Raphael Collet authored
-
Raphael Collet authored
-
Olivier Dony authored
-
Olivier Dony authored
Can be defined to False in any model to completely disable translations for this model, when they are irrelevant. This is useful e.g. for test classes that use attributes that would normally be translatable.
-
Olivier Dony authored
-
Olivier Dony authored
This was added in master-apiculture at f1f16a8 to permit special function fields that return structured JSON-like data. This is unnecessary and caused typing problems, for example for the type field of ir.model.fields, or when you decide to store them. It is simpler to explicitly declare these fields as fields.Char and have them serialize their results to JSON strings, or to declate them as fields.Binary and return any opaque data they want.
-
Christophe Combelles authored
element.{text,tail} are either ascii-compatible `str`, or `unicode` when non-ascii-compatible. This could force the implicit decoding of utf-8 encoded contents when joining template bits, breaking the rendering. Fixes #1085, and related to #1130
-
- Jul 29, 2014
-
-
Denis Ledoux authored
-
- Jul 28, 2014
-
-
Martin Trigaux authored
An ir.value without condition should not match when searching with a condition. When a field with change_default on it is modified, the method get_defaults is called with the new value. This means that manually modifying a field with this trigger would put back the default value (opw 611193).
-