Commit Graph
3175 Commits
Author SHA1 Message Date
Christophe Simonis ea675d8b76 [MERGE] forward port branch saas-12 up to ff7f3d6 2016-11-18 18:03:47 +01:00
Jeremy Kersten a55ee3858c [FIX] *: convert action server to new syntax
Use record / records instead of deprecated locals
2016-11-18 10:03:48 +01:00
Devendra Kavthekar 8872800e75 [IMP] sql_db: Improve error message logging on database querries
Purpose:

When we have a SQL error, it's not very easy to identify the root of the crash. For example if a mandatory field is not set on a row creation, it difficult to see which field isn't correctly set as a lot of fields are not required and a lot a NULL values are present in the INSERT querry.

Specification:

Show a proper log message, with the reason (cause) of the sql error.

Behavior Modification Examples:
Some sample log after applied fix. The new line are those beginning by '+'

2016-10-25 09:59:40,208 21161 INFO ent_master odoo.sql_db: bad query: INSERT INTO "res_partner_category" ("id", "active", "color", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('res_partner_category_id_seq'), true, 10, 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
+REASON: null value in column "name" violates not-null constraint
+DETAIL:  Failing row contains (27, null, null, 1, null, 10, 1, null, 2016-10-25 09:59:40.207202, t, 2016-10-25 09:59:40.207202).

2016-10-25 10:00:29,710 21161 INFO ent_master odoo.sql_db: bad query: UPDATE "res_partner" SET "parent_id"=1001,"type"='contact',"name"='Course Script',"company_name"=NULL,"write_uid"=1,"write_date"=(now() at time zone 'UTC') WHERE id IN (1)
+REASON: insert or update on table "res_partner" violates foreign key constraint "res_partner_parent_id_fkey"
+DETAIL:  Key (parent_id)=(1001) is not present in table "res_partner".

2016-10-25 10:23:28,690 21336 INFO ent_master odoo.sql_db: bad query: DELETE FROM res_country WHERE id IN (235)
+REASON: null value in column "country_id" violates not-null constraint
+DETAIL:  Failing row contains (9, 1, AL, Alabama, null, 1, 2016-10-24 10:19:58.765552, 2016-10-21 09:32:26.939607).
+CONTEXT:  SQL statement "UPDATE ONLY "public"."res_country_state" SET "country_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "country_id""
2016-11-17 16:33:57 +01:00
Christophe Simonis e2fcace05e [MERGE] forward port branch 10.0 up to 13dc704 2016-11-17 15:27:29 +01:00
Christophe Simonis 13dc7041a6 [MERGE] forward port branch saas-12 up to 1ef4061 2016-11-17 15:24:36 +01:00
Christophe Simonis bcddba4e4b [FIX] fields: set attributes before accessing them
If renamed attributes are used, a warning is emit with `repr` of the
culprit field, which need attributes to be set.

Fixes #14036
2016-11-17 13:40:24 +01:00
Jeremy Kersten 9a8975be46 [FIX] base: add record, records in context of ir.actions
Purpose is to remove old variables in next version:
    - obj
    - object
    - cr
    - user
    - uid
    - context
    - pool
    - workflow

record = model.browse(env.context['active_id'])
records = model.browse(env.context['active_ids'])

obj, object => record
user => env.user
cr => env.cr
uid => env.user.id
context => env.context
pool => env
workflow => record.signal_workflow()
2016-11-16 18:46:01 +01:00
Denis Ledoux 4ea356110e [FIX] base: crons Work Days option
As you can see from the code,
choosing "Work days" or "days" as internval
has exactly the same behavior.

Users might nevertheless expect the interval
"work days" option to avoid running the
action on non-working days, such as
Saturdays and Sundays.

It may have been intended, but it never
worked, since revision 1:
https://github.com/odoo/odoo/blob/004a0b996ff8f269451e07346f71a129a1f3fbaf/bin/addons/base/ir/ir_cron.py#L49-L50

opw-693882
2016-11-16 17:05:14 +01:00
Christophe Simonis dece72d010 [MERGE] forward port branch saas-12 up to ca20038 2016-11-15 13:58:55 +01:00
Uku Lagle f701311f72 [FIX] cli: correct link to module categories file
As the folder openerp no longer exists

Closes #14263
2016-11-14 17:07:44 +01:00
Martin Trigaux 014a6e283f [I18N] export 10.0 source terms 2016-11-14 16:57:46 +01:00
David Arnold a35d8895b1 [FIX] base: es_CO date format
Closes #14065
2016-11-14 16:39:37 +01:00
Yenthe V.G 3f605d18ba [FIX] cli: correct templates for scafold
Convert openerp to odoo

Closes #14129
2016-11-14 16:26:23 +01:00
Odoo Translation Bot 7a800427df [I18N] Update translation terms from Transifex 2016-11-13 03:42:40 +01:00
Raphael Collet f825f415f8 [FIX] registry: ensure that all non-abstract models have a table (#14194)
After modifying the database schema, if some models do not have a table/view,
attempt to recreate it by calling their method `init()`, following inter-model
dependencies.

Fix the model `board.board` by making it an abstract model.

Add the missing model dependencies on report `crm.partner.report.assign` to make
it depend on report `account.invoice.report`.
2016-11-10 13:50:04 +01:00
David Monjoie ca11d35a62 [FIX] base: enforce deterministic view inheritance
If multiple views had the same name and same priority, the order
of application of their xpath was not deterministic. That may be a
big deal if both of them were doing xpath with position = inside.
2016-11-09 10:51:09 +01:00
Mansi Gandhi 5cb307170d [IMP] base, auth_signup: rename technical users to avoid confusion
* default user > Default User Template
 * Template User > Portal User Template
2016-11-09 10:48:33 +01:00
Moisés López cc444338ed [FIX] base: change Mexican city name
'Distrito Federal' is renamed 'Ciudad de México'
English news:
https://www.theguardian.com/world/2016/jan/29/mexico-city-name-change-federal-district-df
Official reference (spanish):
http://www.dof.gob.mx/nota_detalle.php?codigo=5424565&fecha=05/02/2016

Closes #14034
2016-11-08 15:37:46 +01:00
Christophe Simonis 7eb8ed2769 [MERGE] forward port branch 10.0 up to 3d085f6 2016-11-08 15:13:05 +01:00
Christophe Simonis 3d085f632d [MERGE] forward port branch saas-12 up to 6386037 2016-11-08 15:01:20 +01:00
fwi-odoo ce91c5b6f5 [FIX] base: partner's default to company instead of individual for sales menu (make clearbit feature visible for on boarding)
Fix commit 69b641d6bc
2016-11-07 15:04:24 +01:00
Odoo Translation Bot 7cfbdd57b4 [I18N] Update translation terms from Transifex 2016-11-07 11:09:10 +01:00
Moises Lopez 6665a6a6e1 [IMP] base: add search on 'vat' field in name_search() of res.partner.
Courtesy of Vauxoo
2016-11-07 11:06:51 +01:00
Raphael Collet 530909405d [FIX] base: allow write() on ir.model as long as values are not changed
This should enable the re-import of model exported to XML.
2016-11-07 10:25:50 +01:00
Odoo Translation Bot 9da2f44587 [I18N] Update translation terms from Transifex 2016-11-06 03:41:11 +01:00
Fabien Pinckaers 69b641d6bc [IMP] base: partner's default to company instead of individual for sales menu (make clearbit feature visible for on boarding) 2016-11-04 12:07:48 +05:30
David Arnold 5b90152951 [IMP] base: add Colombian states
Signed-off-by: David Arnold <dar@devco.co>
This commits closes #14067
2016-11-03 13:20:10 +01:00
David Arnold bed36bb160 [FIX] base: Add address format for Colombia
This commit closes #14066
2016-11-03 13:20:10 +01:00
Christophe Simonis 4d9f5bbf5b [MERGE] forward port branch 10.0 up to ab98523 2016-11-02 18:02:11 +01:00
Christophe Simonis ab98523315 [MERGE] forward port branch saas-12 up to 0ca99ff 2016-11-02 17:56:37 +01:00
Odoo Translation Bot 9d243ae9ea [I18N] Update translation terms from Transifex 2016-10-30 03:37:27 +01:00
Christophe Simonis 97debd09c0 [MERGE] forward port branch saas-12 up to 57774ef 2016-10-28 17:05:21 +02:00
Christophe Simonis ea479ce6f3 [MERGE] forward port branch 10.0 up to 3bb022d 2016-10-27 18:23:44 +02:00
Christophe Simonis 3bb022d57c [MERGE] forward port branch saas-12 up to 6f8e40c 2016-10-27 18:17:59 +02:00
qdp-odoo f430736b79 [FIX] base, base_vat: constrains decorator does support only directs fields 2016-10-27 16:28:18 +02:00
Raphael Collet cae04ba1d3 [IMP] fields: add warning for field attributes select and digits_compute 2016-10-24 12:27:33 +02:00
Raphael Collet bb786944de [REF] base: make view.model_data_id a non-stored computed field (#13918)
This fixes the problem of recomputing that field in a much better way.  The
field was stored for the sake of searching; instead we implemented a search
method for it.
2016-10-24 12:26:22 +02:00
Odoo Translation Bot e45d402396 [I18N] Update translation terms from Transifex 2016-10-23 03:38:54 +02:00
Jeremy Kersten 9f9ca39dc0 [FIX] base: fix typo in log function in action server
Migration in new api, remove user_id in the request.
This commit avoid to have traceback: 'ValueError: : tuple index out of range'

This commit closes #13860
2016-10-20 11:09:06 +02:00
Christophe Simonis 938ffb92da [MERGE] forward port branch 10.0 up to 6466aa4 2016-10-19 18:16:14 +02:00
Christophe Simonis 6466aa499f [MERGE] forward port branch saas-12 up to 00f4547 2016-10-19 18:09:53 +02:00
Simon Lejeune ecac88dcc0 [ADD] pylint: using variable before assignment 2016-10-19 15:18:58 +02:00
Jeremy Kersten 23c3bc1a59 [FIX] web: really remove traceback on unlink_if_refcount
Previous commit was just stupid: #4128ab641 - Mea Culpa
2016-10-18 18:11:42 +02:00
Jeremy Kersten 4128ab641c [FIX] base: fix unlink_if_refcount traceback
Before this commit, a traceback was raised with 'local variable
referenced before assigment'

This commit closes #13848
2016-10-18 14:18:11 +02:00
Odoo Translation Bot a40c3bf792 [I18N] Update translation terms from Transifex 2016-10-18 11:50:34 +02:00
Christophe Simonis 96d84f1b6f [MOV] test_new_api: move file in the right directory 2016-10-17 16:10:59 +02:00
Christophe Simonis 53d8f76a40 [MERGE] forward port branch saas-12 up to e8e4145 2016-10-17 16:00:39 +02:00
Odoo Translation Bot a9abce09c0 [I18N] Update translation terms from Transifex 2016-10-16 03:22:38 +02:00
Simon Lejeune e018fd8b2b [REF] config: 'ODOO_RC' environment variable
Look for an environment variable named 'ODOO_RC' to locate an rc file,
similar to the 'OPENERP_SERVER' one.
2016-10-14 18:02:30 +02:00
Sébastien BEAU f72c7c3adf [REF] models: rename __export_rows to _export_rows to make it inheritable
Closes #10270.
2016-10-14 15:00:37 +02:00