Commit Graph

318 Commits

Author SHA1 Message Date
Raphael Collet f2e4a10e1a [IMP] use model._fields instead of model._all_columns to cover all fields
The old-api model._all_columns contains information about model._columns and
inherited columns.  This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...

This commit contains the following changes:

 - adapt several methods of BaseModel to use fields instead of columns and
   _all_columns

 - copy all semantic-free attributes of related fields from their source

 - add attribute 'group_operator' on integer and float fields

 - base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
   payment_acquirer, share, website, website_crm, website_mail: simply use
   _fields instead of _all_columns

 - base, decimal_precision, website: adapt qweb rendering methods to use fields
   instead of columns
2014-11-04 13:47:57 +01:00
Christophe Simonis 262eb662de [MERGE] forward port of branch 8.0 up to d80376a 2014-10-21 14:33:36 +02:00
Christophe Simonis 22c390285f [MERGE] forward port of branch 7.0 up to 78a29b3 2014-10-21 13:06:27 +02:00
Julien Legros b00122ad99 [FIX] res_partner: add parent_name related field
In some cases (e.g. with record rules), the name_get might not have access
to the parent name. Therefore a parent_name related field solves the
issue (as it read with as superuser).
2014-10-20 15:50:49 +02:00
Raphael Collet 2ad092b5e5 [ADD] doc: new documentation, with training tutorials, and new scaffolding 2014-08-22 17:51:20 +02:00
Denis Ledoux 1bb219907f [MERGE] forward port of branch saas-5 up to 655a5b9 2014-08-04 16:56:10 +02:00
Denis Ledoux 8c0c74300f [MERGE] forward port of branch saas-3 up to ebf317a 2014-08-04 16:14:05 +02:00
Denis Ledoux ebf317a3b0 [MERGE] forward port of branch 7.0 up to e07bc5d 2014-08-04 16:10:06 +02:00
Denis Ledoux 4a27880974 [FIX] res_partner: commercial partner sync
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
2014-08-04 14:34:08 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Olivier Dony 34bfa1b44f [MERGE] Forward-port saas-5 up to d9cda97 2014-07-05 01:45:45 +02:00
Olivier Dony 5ceded9d69 [MERGE] Forward-port saas-3 up to 4fa30f5 2014-07-05 01:04:19 +02:00
Olivier Dony f3880a8a09 [MERGE] Forward-port of 7.0 up to 64ac1b0 2014-07-04 17:07:53 +02:00
Martin Trigaux bf353998f2 [FIX] res_partner: backport of rev 37bf72a
Correctly take the 'use parent address' into account in the onchange. Slightly updated the view that was weird with this parameter. opw 609344
2014-07-03 12:30:48 +02:00
Olivier Dony 5b83e88c25 [MERGE] Fwd-port of 7.0 up to 3d31341 2014-07-01 12:28:55 +02:00
Jacques-Etienne Baudoux df40926d2a [IMP] res_partner: more fault tolerant name_create
In case of invalid format such as 'name email@server' (missing chevrons), the parsing would be failing due to a strict behaviour of getaddresses (returns nameemail@server).
With the patch this format is accepted.
opw 607312
2014-06-27 16:48:40 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Thibault Delavallée 222e26628a [FIX] crm, crm_partner_assign, res_partner, mail, project: removed deprecated fields, deprecated methods + references to it; also removed deprecated tags on things that are not deprecated anymore. Everything is under control. 2014-06-11 08:44:40 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Thibault Delavallée 726fad8832 [IMP] res_partner: added a hook to be sure the website is correctly formated.
Otherwise the website may consider the website field as local for address like
www.odoo.com
2014-05-16 16:09:27 +02:00
Darshan Kalola 37bf72aca5 [MERGE] [IMP] res_partner: correctly take the 'use parent address'
into account in the onchange. Slightly updated the view that was weird with this parameter.

bzr revid: tde@openerp.com-20140417145522-yte3976um2a1t0dr
2014-04-17 16:55:22 +02:00
Darshan Kalola (OpenERP) 19d2466b0f [MERGE]sync with trunk.
bzr revid: dka@tinyerp.com-20140417102052-b84zv8e1m32jo19j
2014-04-17 15:50:52 +05:30
Darshan Kalola (OpenERP) d75405572f [IMP]removed use_company_address method, added same feature in single method, to achive this added new parameter 'empty_fields' to empty all address field when use compny address is unchecked.
bzr revid: dka@tinyerp.com-20140417101219-gs68pfe64a7l97hc
2014-04-17 15:42:19 +05:30
Richard Mathot (OpenERP) 96417099b3 [MERGE] Sync with trunk
bzr revid: ypa@tinyerp.com-20140404114223-zalha5tvp2l0ov8f
bzr revid: rim@openerp.com-20140414091137-icatnn1humn7kisc
2014-04-14 11:11:37 +02:00
Darshan Kalola (OpenERP) 6ef7aa5134 [MERGE]sync with trunk.
bzr revid: dka@tinyerp.com-20140409084452-w1e499j21i3eli9d
2014-04-09 14:14:52 +05:30
Christophe Simonis 120342d537 [MERGE] forward port of branch 7.0 up to revid 5274 chs@openerp.com-20140404141611-qi1yagltvkd9q8ji
bzr revid: chs@openerp.com-20140404155858-mvupqmuvi8ime2tl
2014-04-04 17:58:58 +02:00
Christophe Simonis 53d8055cd8 [FIX] res.partner: name_search: respect unaccent flag
bzr revid: chs@openerp.com-20140404141611-qi1yagltvkd9q8ji
2014-04-04 16:16:11 +02:00
Olivier Dony 27be515eab [FIX] res.partner: missing index on `parent_id` column
bzr revid: odo@openerp.com-20140403143717-dy2bszaevsyivryo
2014-04-03 16:37:17 +02:00
Olivier Dony a6ed98c4c4 [FIX] res_partner: missing index on `display_name`
bzr revid: odo@openerp.com-20140402091804-v5g7g8ys4zv562uk
2014-04-02 11:18:04 +02:00
Yogesh Parekh (OpenERP) bfaa95a9e0 [Merge]: Merge with Parent branch
bzr revid: ypa@tinyerp.com-20140331094847-6pytp2gl19vhk5c8
2014-03-31 15:18:47 +05:30
Yogesh Parekh (OpenERP) 2d4bd20bb0 [IMP]: Improve reference terms for partner
bzr revid: ypa@tinyerp.com-20140311100400-yea73bg8z3ohmqhv
2014-03-11 15:34:00 +05:30
Darshan Kalola (OpenERP) d93f32aa08 [MERGE]sync with trunk.
bzr revid: dka@tinyerp.com-20140306084224-t04yh1k0upd9uqh9
2014-03-06 14:12:24 +05:30
Thibault Delavallée bff00ec6df [FIX] res_partner: avoid duplicating users when duplicating partners, because
I think your database wil hate you.

bzr revid: tde@openerp.com-20140224121004-lgy2rsszsomy7mji
2014-02-24 13:10:04 +01:00
Olivier Dony 6a8ce77426 [FIX] res.partner: prevent `show_email` context option from polluting display_name
bzr revid: odo@openerp.com-20140212080331-diit15a9sz7do4cu
2014-02-12 09:03:31 +01:00
Darshan Kalola (OpenERP) 75b6bbdda0 [MERGE]sync with trunk.
bzr revid: dka@tinyerp.com-20140207045417-8chx8psmp9ipp4na
2014-02-07 10:24:17 +05:30
Olivier Dony 171408280c [FIX] res.partner: properly (re)compute display_name and commercial_partner_id on inactive partners
bzr revid: odo@openerp.com-20140130192848-orv1glg2j26wdpml
2014-01-30 20:28:48 +01:00
Olivier Dony 7e6be99a63 [IMP] res.partner: more selective child_of _search() hack
Makes the conditions for disabling the `active` test
on res.partner.search() more selective, to avoid
triggering it when we are not actually searching for
the children of specific parents.
(Broke base tests now that data includes an deactivated
partner)

bzr revid: odo@openerp.com-20140130162419-09tit4cyef570aze
2014-01-30 17:24:19 +01:00
Fabien Meghazi 53098c666c [MERGE] trunk's CORS support (merge with changes)
bzr revid: chs@openerp.com-20140130120448-tj9pu30o7dj74zid
bzr revid: fme@openerp.com-20140130125425-j1yn6p4lr7lincr3
2014-01-30 13:54:25 +01:00
Olivier Dony 4b746826b2 [IMP] res.partner: unused imports
bzr revid: odo@openerp.com-20140130093012-ytrx2i2xoc23npfg
2014-01-30 10:30:12 +01:00
Christophe Simonis a69f789b41 [MERGE] forward port of branch 7.0 up to revid 5224 chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
bzr revid: dle@openerp.com-20140205105045-j95kduyjiq83e57z
bzr revid: dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: dle@openerp.com-20140116161158-u95vcs3os4tk2zob
bzr revid: dle@openerp.com-20140121172737-gzawfi3ssg7xifef
bzr revid: chs@openerp.com-20140129094554-c3abc8x3qz9mpszr
bzr revid: chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140206110220-myn57cryam1y4k9v
2014-02-06 12:02:20 +01:00
Martin Trigaux e6ee1947f8 [FIX] better test, add missing parentheses in query, return empty list in case of no idea (instead of triggering super)
bzr revid: mat@openerp.com-20140129123404-8hs786n64briqyta
2014-01-29 13:34:04 +01:00
Martin Trigaux f71a381b81 [ref] move up!
bzr revid: mat@openerp.com-20140129114102-tk4fotnb28mtaz9x
2014-01-29 12:41:02 +01:00
Martin Trigaux 5d38e40e6b [FIX] revert previous rev for better where and add test
bzr revid: mat@openerp.com-20140129113938-517gqfi1kzcf64fz
2014-01-29 12:39:38 +01:00
Martin Trigaux 7dedf4ec45 [IMP] remove useless variable, where_clause at least '' as created from a str.join()
bzr revid: mat@openerp.com-20140129111959-7y9su01ooneu0mco
2014-01-29 12:19:59 +01:00
Martin Trigaux 05ec12692f [FIX] res_partner: name_search search in one pass
The original query did two passes (SQL query and orm search). This was a problem due to the limit parameter where the second query could reduce the number of results to a smaller number than the asked limit.

This code reproduces the orm _search behaviour to execute only one SQL query mixing both the ACL clauses and the complexe name_search without degrading the performances (removing the limit in the first query would have).

lp bug: https://launchpad.net/bugs/1203727 fixed

bzr revid: mat@openerp.com-20140129105548-dd6zmy9uc2cuowpq
2014-01-29 11:55:48 +01:00
Darshan Kalola (OpenERP) f97e51b6c7 [IMP]Rename parent variable with parent_company.
bzr revid: dka@tinyerp.com-20131003073515-y3xt3qqymgourcn1
2013-10-03 13:05:15 +05:30
Thibault Delavallée 54933118a4 [MERGE] Sync with trunk until revision 4957.
bzr revid: tde@openerp.com-20131002133820-8xomdumexexqp3pk
2013-10-02 15:38:20 +02:00
Fabien Pinckaers 4b5d3e4a40 [IMP] priority on views
bzr revid: fp@openerp.com-20130929085000-p2pcmkdubqw1lfbj
2013-09-29 10:50:00 +02:00
Fabien Pinckaers 1db512092f [IMP] events
bzr revid: fp@openerp.com-20130928164336-6exrohfc2ek4d2y5
2013-09-28 18:43:36 +02:00
Darshan Kalola (OpenERP) 2868f916c5 [IMP]improve attrs on use_parent_address.
bzr revid: dka@tinyerp.com-20130927123020-nk04nr8o621xw31b
2013-09-27 18:00:20 +05:30