Commit Graph
337 Commits
Author SHA1 Message Date
Christophe Simonis cb00be643a [MERGE] forward port branch saas-14 up to a4d5e64a4c 2017-03-06 15:46:24 +01:00
Christophe Simonis d08ecdc3b8 [MERGE] forward port branch 10.0 up to 1279f82e12 2017-03-06 13:52:06 +01:00
Christophe Simonis 6b3a80862c [MERGE] forward port branch saas-11 up to 503227838d 2017-03-06 13:23:38 +01:00
Olivier Dony 944def6932 [FIX] ir.actions.server: allow execution by portal/public requesests
When an automated action triggers for an action of a public/portal
user session, the server action is executed with the session
credentials. As of 4a18d5744e
only employees can access model fields, including the model name,
so a temporary sudo() elevation is necessary to find the model name.

The `model` and `record` action context parameters are however still
provided with the credentials of the session, not the super-user.
2017-03-06 10:56:23 +01:00
Pratima Gupta 8c522750c8 [IMP] base: Rename res.partner _description from 'Partner' to 'Contact'
Purpose
=======

When using Studio and adding a many2one field for example, it will be easier for a non technical user to find the model res.partner under the name "Contacts" than under the name "Partners".
2017-03-06 10:46:45 +01:00
Odoo Translation Bot c0f0d49542 [I18N] Update translation terms from Transifex 2017-03-05 04:32:11 +01:00
qdp-odoo 0031f98f1d [ADD] tools/float_utils: add float_split() and float_split_str() methods.
Add utility methods allowing to split floating points numbers and return their unitary and decimal parts.
2017-03-03 15:58:05 +01:00
Olivier Dony d569142ec8 [FIX] ir.cron: add missing button to deactive job 2017-03-03 15:11:20 +01:00
Martin Trigaux c1b603e81c [FIX] base: avoid writing on a company
When reading the computed field.
Requires the write access rights to be able to fetch the value.
Introduced at 99f365523
2017-03-03 13:24:11 +01:00
Christophe Simonis 68176d80ad [MERGE] forward port branch saas-14 up to eddefc9948 2017-03-01 16:49:15 +01:00
Christophe Simonis eddefc9948 [MERGE] forward port branch 10.0 up to 8c55e57c7f 2017-03-01 16:14:41 +01:00
Christophe Simonis 7abeace770 [MERGE] forward port branch saas-11 up to 5c4744cd1f 2017-03-01 15:17:55 +01:00
Christophe Simonis 5655b43929 [FIX] base: clear cache through model instead of method
This allow cached method to be overwritten.
2017-03-01 12:21:11 +01:00
Raphael Collet 1119fdd8a3 [IMP] mail: reflect inheritance of mail.thread on ir.model (#15107)
The boolean field `is_mail_thread` on `ir.model` allows to create custom models
that inherit from model `mail.thread`.  The selection field `track_visibility`
on `ir.model.fields` allows to add tracking on custom fields.

Also change the order on model `ir.model` to make mail thread models appear first.
2017-02-28 10:49:02 +01:00
Daniel Dico 2a2b64f079 [FIX] base: rename Canadian state
The province was renamed in 2001

Closes #15662
2017-02-28 09:05:07 +01:00
Odoo Translation Bot c224df04a5 [I18N] Update translation terms from Transifex 2017-02-26 04:31:11 +01:00
Jeremy Kersten 5b3d0b3bc8 [IMP] ir_qweb: allow to display only the time from a field datetime.
Can be usefull if we want to split date part (using widget:'date') and time part (new option)
2017-02-24 08:51:26 +01:00
Jeremy Kersten f4ae1a63c7 [FIX] base: fix dev mode when view is no more in addons-path 2017-02-24 08:51:26 +01:00
Christophe Simonis 85368d7f86 [MERGE] forward port branch 10.0 up to 387b2acfcb 2017-02-23 20:15:38 +01:00
Christophe Simonis 387b2acfcb [MERGE] forward port branch saas-11 up to 1730dca101 2017-02-23 19:40:03 +01:00
Raphael Collet c59d79da3c [IMP] models: better argument 2017-02-23 14:48:44 +01:00
Raphael Collet 68c9f1a673 [FIX] models: missing argument 2017-02-23 14:47:20 +01:00
Raphael Collet e78269664d [IMP] tools: use information_schema instead of pg-specific tables 2017-02-22 15:24:08 +01:00
Raphael Collet f8e573db23 [REF] models: refactoring of foreign keys 2017-02-22 15:24:08 +01:00
Raphael Collet dc82ff59ac [REF] models: in _auto_init, delegate field schema updates to fields
The fields objects are responsible for creating their column/table and indexes.
The methods that update the schema are overridden to handle cases specific to
each type of field.
2017-02-22 15:24:07 +01:00
Raphael Collet d024c76021 [REF] tools: add functions for SQL schema manipulation
This helps factoring out a certain number of similar queries, and removing a
few methods from `BaseModel`.
2017-02-22 15:24:07 +01:00
Raphael Collet 8225f36497 [IMP] models: speed up schema update for models
Simply remove most `commit()` statements from code that updates the database
schema.  This improves the performance of the schema update by 30%.
2017-02-22 15:24:06 +01:00
Raphael Collet daa1eb1fc4 [IMP] base: remove ir_model_* tables from base.sql 2017-02-22 15:24:05 +01:00
Raphael Collet 2b46025dd5 [REF] models: use Registry.post_init() for reflecting models, fields, relations and constraints 2017-02-22 15:23:48 +01:00
Raphael Collet b6103d0b1b [REF] models: foreign keys use Registry.post_init() instead of BaseModel._auto_end()
Also use Registry.post_init() for the creation of foreign keys in
`_sql_constraints`.
2017-02-22 15:22:26 +01:00
Raphael Collet a1d061080e [REF] models: improve the API for post-init functions
Add a method to the registry to register function calls that must be done after
methods `_auto_init` and `init` have been invoked on all models.
2017-02-22 15:22:26 +01:00
Raphael Collet d0591c18e5 [REF] base: refactor the API of model, field, constraint and relation reflection
Simplify the API as much as possible, and delegate all the implementation
details to the models `ir.model`, `ir.model.fields`, `ir.model.constraint` and
`ir.model.relation`.
2017-02-22 15:16:35 +01:00
Raphael Collet 3214ca9820 [ADD] test_new_api: add checks on a model's schema 2017-02-22 15:16:34 +01:00
Raphael Collet 3ae219f773 [IMP] base: minimize recomputations triggered by model and field reflection 2017-02-22 15:16:34 +01:00
Raphael Collet c605ffa62a [IMP] base: remove management of deprecated indexes
Those indexes have been removed in version 10.0 or before, dropping them on
module upgrade is no longer necessary.
2017-02-22 15:16:21 +01:00
qsm-odoo c5779ec30d [REF] *: replace uses of "<>" in xml domains by "!=" 2017-02-21 13:33:32 +01:00
Nicolas Martinelli 05810dc7de [FIX] base: default partner email
In a lead:
- Fill in contact information (phone, address, email...)
- Create a new contact

All information is copied to the new contact, except the email.

opw-706711
2017-02-21 11:04:54 +01:00
David Arnold 99f365523b [IMP] base: allow to extend synched of company address
To easily add fields

Closes #15213
2017-02-20 09:27:31 +01:00
Odoo Translation Bot 2ab080bcae [I18N] Update translation terms from Transifex 2017-02-19 04:30:24 +01:00
Luis Ernesto Torres Macías 4cb1750a61 [FIX] base: correct Mexican state code based in SAT catalog
The SAT provide this catalog to state codes:
http://www.sat.gob.mx/informacion_fiscal/factura_electronica/Documents/Complementoscfdi/catNomina.xls

This attribute is required in payroll v1.2.
Previous code version did not match the validation

Closes #15535
2017-02-17 15:04:56 +01:00
Martin Trigaux 9a0aaa9e88 [I18N] export saas-14 source terms 2017-02-15 11:40:28 +01:00
qsm-odoo ba72397fee [FIX] base: decode utf-8 for bundle ir.attachment files
If a bundle contains a file whose URL does not match any file in the
filesystem, its content is searched in the ir.attachment records.
The problem was that the content was base64-decoded but also had to
be utf-8 decoded to make its use work (like it would have been done
if the file was found in the filesystem).
2017-02-14 16:31:36 +01:00
qsm-odoo c248674a5c [IMP] base: handle LESS compilation error a better way
Before this commit, when a LESS bundle compilation failed, web pages
were displayed without any style and the error appeared in the DOM
thanks to a custom ::before style which was ugly and not selectable.

Now the error is displayed like any other error in Odoo: in a dialog
with selectable content. The pages are also displayed with the last
style which was successfuly compiled.
If odoo dialog are not defined (a page without any javascript), a
fallback has been implemented to show the LESS error with a JS alert.
2017-02-14 16:29:27 +01:00
Odoo Translation Bot 4669c103cc [I18N] Update translation terms from Transifex 2017-02-12 04:30:17 +01:00
Fabien Pinckaers c56b746221 [IMP] base_automation: default to write instead of python code 2017-02-10 15:22:45 -08:00
Denis Vermylen d3703ecb4c [IMP] models: avoid searching by id in read_group
When using read_group() and grouping by many2one fields, the many2one groupby
fields get updated from an integer id to a tuple from name_get() at the end
of the method.

e.g.: {'user_id': 1, ...} -> {'user_id': (1, u'Administrator'), ...}

To do this, it reads the many2one field by browsing on self.

When self is a model with _auto = False (typically an SQL view), searching by
id can be costly as the id column may not have usual properties for performance
(in some cases a full computation of the table is required to look up 1 id).
2017-02-10 19:20:25 +01:00
Christophe Simonis a282d4ae7f [MERGE] forward port branch saas-14 up to be9dfb331f 2017-02-10 18:41:06 +01:00
Christophe Simonis cbdd0b20dc [MERGE] forward port branch 10.0 up to ffd4442b06 2017-02-10 13:17:02 +01:00
Christophe Simonis ffd4442b06 [MERGE] forward port branch saas-11 up to 06e9e45d03 2017-02-10 11:49:35 +01:00
mge-odoo bf26445057 [IMP] base: use image_small on res_partner_view
Complement to https://github.com/odoo/odoo/commit/025fa4791c966cc35ad81f5664f25c8bd0502fb5
See #9731
2017-02-09 15:41:54 +01:00