Christophe Simonis
815fc8f84a
[FIX] browse records do not try to prefetch fields user can't read
...
bzr revid: chs@openerp.com-20130819164622-7cre7yqpvlyzsslj
2013-08-19 18:46:22 +02:00
Christophe Matthieu
27b69126d2
[MERGE] from trunk
...
bzr revid: chm@openerp.com-20130726141834-9nroj7wi4fjhd5s4
2013-07-26 16:18:34 +02:00
Thibault Delavallée
f737eb63d0
[IMP] ir_actions_server: added doc + comments + recursion check
...
orm: added _check_m2my_recursion, to check loops in many2many recursive fields
tools: removed sms_send
bzr revid: tde@openerp.com-20130725104914-dutxfon3odp8z167
2013-07-25 12:49:14 +02:00
Christophe Simonis
03381c761d
[FIX] expression: a valid leaf must have a non empty string as first element or be the magic TRUE_LEAF/FALSE_LEAF
...
lp bug: https://launchpad.net/bugs/1197323 fixed
bzr revid: chs@openerp.com-20130719091903-28ez0txxyjh6qiii
2013-07-19 11:19:03 +02:00
Thibault Delavallée
5aad20b9a6
[IMP] fields: date, datetime: added MONTHS variable holding list of (month_number, month_name)
...
bzr revid: tde@openerp.com-20130709123740-18t5yhbtoru6vpne
2013-07-09 14:37:40 +02:00
Christophe Simonis
5a5d9d5941
merge upstream
...
bzr revid: chs@openerp.com-20130702191613-djzicmgpvrhh05zi
2013-07-02 21:16:13 +02:00
Christophe Simonis
5a58a48ef5
[MERGE] forward port of branch saas-1 up to revid 4893 chs@openerp.com-20130701153735-xnbb8zauabf1k63u
...
bzr revid: chs@openerp.com-20130702144745-763n9cdphkppshxl
2013-07-02 16:47:45 +02:00
Antony Lesuisse
b0a348d24e
fields_view_get view_id
...
bzr revid: al@openerp.com-20130701130258-52nvw8aj6s8bcjaf
2013-07-01 15:02:58 +02:00
Antony Lesuisse
3b0935325e
fields_view_get apply post processing even for default views
...
bzr revid: al@openerp.com-20130701122626-9g2uo6ox3p74e55q
2013-07-01 14:26:26 +02:00
Antony Lesuisse
05c9b607f8
fix rng validation, fields_view_get, qweb t-esc t-raw default
...
bzr revid: al@openerp.com-20130630213515-go5qr2dmo0xlazvr
2013-06-30 23:35:15 +02:00
Antony Lesuisse
932efea388
untangle inheritance and postprocessing
...
bzr revid: al@openerp.com-20130629213516-pqcl6oz1g3o5tpgn
2013-06-29 23:35:16 +02:00
Denis Ledoux
9f4397fc85
[MERGE]forward port of latest 7.0 bugfixes, up to rev 5017
...
rev 5017 = launchpad_translations_on_behalf_of_openerp-20130626061833-drxvzosffezp089g
bzr revid: dle@openerp.com-20130627120342-znttbs00q5bkf4ov
2013-06-27 14:03:42 +02:00
Stefan Rijnhart
216f4d5e66
[FIX] Do not search for model = table name in previous commit
...
bzr revid: stefan@therp.nl-20130626140439-3emprb4ewc2xlcsy
2013-06-26 16:04:39 +02:00
Stefan Rijnhart
126b49075d
[FIX] Export creates xml id based on wrong table name
...
lp bug: https://launchpad.net/bugs/1194893 fixed
bzr revid: stefan@therp.nl-20130626135842-sdbvopuen0s7liv9
2013-06-26 15:58:42 +02:00
Christophe Simonis
c0115e7597
[FIX] orm: Do not prefetch custom fields.
...
When installing or updating a module, custom fields referring custom model
(many2one) cannot be read because custom model are not loaded at this stage
(they are only loaded after all modules because they can refer any model).
Not prefetching them avoid crash when computing stored function fields.
bzr revid: chs@openerp.com-20130626091332-231rqg5ouhnc3d2x
2013-06-26 11:13:32 +02:00
Antony Lesuisse
f4332b9b60
[MERGE] trunk
...
bzr revid: al@openerp.com-20130625162755-d6552p98m5jiw941
2013-06-25 18:27:55 +02:00
Quentin (OpenERP)
bcac5bd834
[FIX] ir_property: fixes in property fields related to multi company use cases
...
bzr revid: qdp-launchpad@openerp.com-20130624085731-fthhdpdm4ldi3220
2013-06-24 10:57:31 +02:00
Antony Lesuisse
4f76c69b76
[MERGE] trunk
...
bzr revid: al@openerp.com-20130620151512-p5ysov21an6ogbtv
2013-06-20 17:15:12 +02:00
Olivier Dony
9a5e317618
[FIX] OPW 592482: browse_record should not prefetch binary fields
...
This was apparently a long-standing issue due to a
strange handling of the _prefetch attribute on
columns: accessing a column would only trigger
the prefetching if its _prefetch attribute was
True, but the prefetching itself would also
prefetch columns that had _prefetch False.
We clearly want it the other way around, or
at least we want _prefetch to decide whether
a column is included in any given prefetching
pass. We can skip the prefetching pass when
the only field being accessed has _prefetch
False because it is likely the other fields
have already been prefetched separately.
This last subtlety should not make any
noticeable performance difference.
lp bug: https://launchpad.net/bugs/1177965 fixed
bzr revid: odo@openerp.com-20130620131057-v7s4qfqj976j3ufo
2013-06-20 15:10:57 +02:00
Quentin (OpenERP)
31d05360b2
[REF] fields: removed deprecated view_load attribute and removed useless first argument in property fields definition
...
bzr revid: qdp-launchpad@openerp.com-20130619091332-29pisdnyfemn1u3d
2013-06-19 11:13:32 +02:00
niv-openerp
7822665429
added search_read
...
bzr revid: nicolas.vanhoren@openerp.com-20130621091332-s37ma5gbg88999xv
2013-06-21 11:13:32 +02:00
niv-openerp
a94bbf8e5e
[FIX] Merge fix in saas1 for the problem that made the server crash when install a db
...
bzr revid: nicolas.vanhoren@openerp.com-20130610144915-0nj8vpk7n84ocj3f
bzr revid: nicolas.vanhoren@openerp.com-20130610150657-3xddn91gm0iq0ubp
bzr revid: nicolas.vanhoren@openerp.com-20130610154514-oee6s4f9g17bx63z
2013-06-10 17:45:14 +02:00
Vo Minh Thu
8d0a477644
[IMP] ir_ui_view: do not use _logger.exception() (because there is no exception), add a check on `model`.
...
bzr revid: vmt@openerp.com-20130605121143-u2nkmcmeifphr54h
2013-06-05 14:11:43 +02:00
Vo Minh Thu
0019a86ecf
[MERGE] orm: add _sql_contraints only when _auto.
...
bzr revid: vmt@openerp.com-20130604115402-4cf07eq53o6ocs39
2013-06-04 13:54:02 +02:00
Olivier Dony
b16935efdc
[IMP] orm: include forbidden IDs when logging ir.rules violations, to make troubleshooting easier
...
bzr revid: odo@openerp.com-20130604111354-1x5yc305okhx5ujk
2013-06-04 13:13:54 +02:00
Amit Dodiya
244c82fe4f
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130604110137-jclbsmkohs5mm66w
2013-06-04 16:31:37 +05:30
Vo Minh Thu
6f1531f1d3
[MERGE] orm: add __iter__ method on browse_null.
...
Otherwise Python falls back to __getitem__ when trying to loop over it
or when trying to test `in`.
bzr revid: vmt@openerp.com-20130604081706-z79vqj36ls2adw09
2013-06-04 10:17:06 +02:00
Amit Dodiya
f7d2e495fd
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130531120925-s10hwscv2gexh27a
2013-05-31 17:39:25 +05:30
Amit Dodiya
f1db39aab1
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130531115736-ecrpaer2f2yhnvs5
2013-05-31 17:27:36 +05:30
Amit Dodiya
bfa4ab09f6
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130531101249-1w17yuoklhmiv2cc
2013-05-31 15:42:49 +05:30
Amit Dodiya
99d4732f04
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130527115951-7zssei2fnxyqzrpq
2013-05-27 17:29:51 +05:30
Amit Dodiya
b7e1be5539
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130527114601-tqzlrna1n9jssou2
2013-05-27 17:16:01 +05:30
Thibault Delavallée
1d5068b63e
[FORWARD] Forward port of server 7.0 until revision 4988
...
bzr revid: tde@openerp.com-20130528102733-bsszxp6nvy8yws3t
2013-05-28 12:27:33 +02:00
c01e2fe122
[FIX]ir_property: If we add a property on a many2one field with multicompany the value of main company is replaced in all companies value
...
bzr revid: ado@tinyerp.com-20130520090111-h20jboltev763mj6
2013-05-20 14:31:11 +05:30
Martin Trigaux
8ecd022348
[IMP] clean permissions and shebang in files
...
bzr revid: mat@openerp.com-20130514103333-puuj4kmxq3bwzwec
2013-05-14 12:33:33 +02:00
Ronald Portier
4634dd6f8e
[FIX] Add __iter__ method to browse_null to prevent server hang.
...
lp bug: https://launchpad.net/bugs/1172292 fixed
bzr revid: ronald@therp.nl-20130424142958-u5r2mxtxqj9v431h
2013-04-24 16:29:58 +02:00
Xavier Morel
73ac06ea51
[MERGE] from trunk because ???
...
bzr revid: xmo@openerp.com-20130424142412-hk38mnzkafyigh00
2013-04-24 16:24:12 +02:00
Xavier Morel
c08513763c
[NOTSURE] move __view_look_dom_arch into ir.ui.view
...
Also alter BaseModel._view_look_dom_arch to proxy to method above.
bzr revid: xmo@openerp.com-20130424135825-grjfgbjuc4ozzdqy
2013-04-24 15:58:25 +02:00
Xavier Morel
66121aaec7
[IMP] try to make __view_look_dom_arch independent from model
...
bzr revid: xmo@openerp.com-20130424133716-6qm0n00yiussz1ra
2013-04-24 15:37:16 +02:00
Xavier Morel
fb492d98ba
[ADD] behavior and tests for default & ancestors, fallback handling in read_combined
...
bzr revid: xmo@openerp.com-20130424130907-6d6lkrkrgqv0hsfq
2013-04-24 15:09:07 +02:00
Xavier Morel
8715746672
[IMP] move stuff around, try building flatter top-down API with read_combined as utility 'do all the things' hook
...
bzr revid: xmo@openerp.com-20130424095114-4nw0nfuxzx4n1ltv
2013-04-24 11:51:14 +02:00
Christophe Simonis
261dea6fec
[MERGE] forward port of server v7 up to revision 4954
...
bzr revid: qdp-launchpad@openerp.com-20130422093655-txqmbalod6qmw1s6
bzr revid: chs@openerp.com-20130423183723-9kiexdyzdew8iuzm
2013-04-23 20:37:23 +02:00
Christophe Simonis
60f0bd08ee
[FIX] expression: allow creating child_of expression even if "id" field has been redefined, courtesy of Gustavo Adrian Marino
...
lp bug: https://launchpad.net/bugs/1030942 fixed
lp bug: https://launchpad.net/bugs/1131992 fixed
bzr revid: chs@openerp.com-20130423181926-yk628txd6yiybtko
2013-04-23 20:19:26 +02:00
Xavier Morel
dfc1800305
[MERGE] from trunk to match addons
...
bzr revid: xmo@openerp.com-20130423155233-c7tyowoqsfzzdjv8
2013-04-23 17:52:33 +02:00
Xavier Morel
3ac47a587e
[IMP] remove deprecated explicit setting of type on views
...
bzr revid: xmo@openerp.com-20130423154456-wt4aeb6yr963jbye
2013-04-23 17:44:56 +02:00
Xavier Morel
d40ec67c2d
[IMP] move application of view inheritance outside of fields_view_get and into View.
...
change get_root_ancestor to return just the id of the ancestor view
bzr revid: xmo@openerp.com-20130423150844-eubxue9vbtc6jhof
2013-04-23 17:08:44 +02:00
Xavier Morel
dd43214fe1
[ADD] tests to get_root_ancestor
...
use a default view_type of form in the tests, because whatever
bzr revid: xmo@openerp.com-20130423132523-upbgbt2a3r7cgs08
2013-04-23 15:25:23 +02:00
Xavier Morel
aef4ce51a7
[IMP] move fetching of root view into ir.ui.view
...
bzr revid: xmo@openerp.com-20130423124657-zkogrodgdw0ymf2f
2013-04-23 14:46:57 +02:00
Xavier Morel
c212710f25
[IMP] move resolution of view_ref outside of root-ancestor-searching loop
...
bzr revid: xmo@openerp.com-20130423111929-fs49v0xrahqsi48u
2013-04-23 13:19:29 +02:00
Xavier Morel
e996f92e6c
[REF] move apply_inheritance_specs to ir.ui.view
...
also moved raise_view_error utility function
bzr revid: xmo@openerp.com-20130423105856-558rl6ankd4g3qb0
2013-04-23 12:58:56 +02:00
Xavier Morel
b0f2d3044a
[FIX] don't 'double tap' when applying view inheritance
...
iter(exclude_base=False) would add the base view (being extended) to the sequence, and thus start by extending the base view with itself.
bzr revid: xmo@openerp.com-20130423100845-ryumkx12cwv60pc1
2013-04-23 12:08:45 +02:00
Xavier Morel
980e01d386
[IMP] attempt to remove lexical dependencies from fvg's nested functions
...
should allow moving most of the view inheritance application into
ir.ui.view, where it should belong.
bzr revid: xmo@openerp.com-20130422142444-f09sw841jop3t4a4
2013-04-22 16:24:44 +02:00
Xavier Morel
edf1f23a6e
[ADD] depth-first iterator on views, refactor apply_view_inheritance to use it
...
bzr revid: xmo@openerp.com-20130422125000-pg60ovrxejegenka
2013-04-22 14:50:00 +02:00
Xavier Morel
aa9406e28b
[IMP] move locate inner function to ir.ui.view method
...
bzr revid: xmo@openerp.com-20130419141409-a2jqq5maszc53e6s
2013-04-19 16:14:09 +02:00
Quentin (OpenERP)
d621d26516
[FIX] orm, _generate_order_by(): allow to order by LOG_ACCESS_COLUMNS even if the column is not defined again in self._columns. Raising an error instead of silently skipping the order_by
...
bzr revid: qdp-launchpad@openerp.com-20130419145417-2tix8ynmx51qiqkf
2013-04-19 16:54:17 +02:00
Olivier Dony
8efd16f25a
[FIX] res.partner, orm._check_recursion: prevent recursive partner structures + fix false positives in check_recursion()
...
- res.partner must prevent creating loops in partner
hierarchies, and this can be done easily with an
extra _constraint using the ORM's builtin _check_recursion
- _check_recursion's implementation incorrectly
assumed that the provided 'ids' were unrelated
(not part of a common hierarchy).
- add tests for _check_recursion via extra
tests on res.partner structure
(explains why both patches are in the same
commit)
bzr revid: odo@openerp.com-20130415171732-aj3j2e2mycvzf4kp
2013-04-15 19:17:32 +02:00
Xavier Morel
bbe0fbe2b9
[IMP] use ORM reads when loading views
...
direct SQL query in core ORM means we can't override view loading to
get them from other sources than the database. By using read() this
can be done by overriding ir_ui_view.read.
bzr revid: xmo@openerp.com-20130415100858-ucm97f318mjn5ugq
2013-04-15 12:08:58 +02:00
Raphael Collet
05851d21ba
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20130411073017-x6e4h8xbvmy3ofdw
2013-04-11 09:30:17 +02:00
Thibault Delavallée
2ab15ddeaf
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20130405110750-1dd4y02xz3wb6ill
bzr revid: tde@openerp.com-20130405133237-n7k66b3w0b3a17o3
2013-04-05 15:32:37 +02:00
Vo Minh Thu
307ca374d6
[MERGE] forward merge 7.0 until revision 4919.
...
bzr revid: vmt@openerp.com-20130404130704-24vsmczw34cssytd
2013-04-04 15:07:04 +02:00
Raphael Collet
09be864f1d
[IMP] replace all tests like 'registry.get(X)' by 'X in registry' where X is non static
...
bzr revid: rco@openerp.com-20130329140723-dnrl02saky570xg0
2013-03-29 15:07:23 +01:00
Thibault Delavallée
655ef77092
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20130328092414-htawc7j3jrxte866
2013-03-28 10:24:14 +01:00
Thibault Delavallée
5c091dd8e2
[CLEAN] BaseModel: moved get_empty_list_help method to a better place in the code; added some comments.
...
bzr revid: tde@openerp.com-20130328092357-v3grmw9brp9wtfj0
2013-03-28 10:23:57 +01:00
Chris Biersbach
15bd42f5e5
[FIX] Removes the limit of 64 characters from additional text fields added via the interface
...
lp bug: https://launchpad.net/bugs/1053511 fixed
bzr revid: cbi@openerp.com-20130327132335-tro1p1n5at042jfb
2013-03-27 14:23:35 +01:00
Vo Minh Thu
2829882389
[IMP] orm: added a print_report() method.
...
bzr revid: vmt@openerp.com-20130325143256-f8hw66j09310cgjo
2013-03-25 15:32:56 +01:00
Thibault Delavallée
4e74279576
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20130322090938-xoh67sg08m3ylcrk
2013-03-22 10:09:38 +01:00
Olivier Dony
41598ef041
[FIX] orm.expression: `=?` domain operator broken after 7.0 refactoring ; + added tests
...
lp bug: https://launchpad.net/bugs/1095635 fixed
bzr revid: odo@openerp.com-20130321173737-a0j330ro4i223fkb
2013-03-21 18:37:37 +01:00
Christophe Matthieu
491c3b73f3
[IMP] code cleaning for get_empty_list_help
...
bzr revid: chm@openerp.com-20130321133207-j4tiibjev6lkeuxa
2013-03-21 14:32:07 +01:00
Vo Minh Thu
067cd7d15a
[FIX] ir_model_data: create the _inherits parent external ID prior to the child.
...
This is needed so the uninstall process can simply go through
the installed data by using the ir_model_data entries in reverse
order (when ordered by IDs), so that parents are deleted before
children.
bzr revid: vmt@openerp.com-20130321133202-igea1vxlszfpk6pe
2013-03-21 14:32:02 +01:00
Christophe Matthieu
45cc77dbcb
[MERGE] from trunk
...
bzr revid: chm@openerp.com-20130320133155-qn27q8aek7zp1ls4
2013-03-20 14:31:55 +01:00
Xavier Morel
9494f21ea8
[FIX] __getattr__ implementation on BaseModel
...
object has no __getattr__, in the usual case super(BaseModel,
self).__getattr__ will blow up with an AttributeError (but the wrong
one).
On the other hand, if a BaseModel descendant class is used in MI
alongside a non-BM descendant (e.g. res_partner inheriting from Model
and format_address) and the non-BM descendant also implements
__getattr__, we want to forward the failed attr search to the other
__getattr__ implementation.
So check if super() has a __getattr__, call it if it does otherwise
AttributeError right there.
bzr revid: xmo@openerp.com-20130315115302-z7jla334gb9a5e43
2013-03-15 12:53:02 +01:00
Vo Minh Thu
c79c23d26e
[REF] orm:
...
- isinstance(ids, dict) is done at the end, but not at the beginning,
so if ids was a single dict, it would break in the map(lambda).
- The loop to convert None to False can be done in _read_flat instead
of read (there is already plenty of loops in _read_flat)
- The __getattr__ was breaking the stacktrace.
bzr revid: vmt@openerp.com-20130314154418-0wmxfw1ot92kjmzf
2013-03-14 16:44:18 +01:00
Chris Biersbach
6b80f5bdff
[FIX] orm: moves the access_rule check to the end of the create method to avoid getting errors when trying to create and m2m values are passed, which can cause the rules to fail
...
bzr revid: cbi@openerp.com-20130314092017-agwzvwwbxev531kk
2013-03-14 10:20:17 +01:00
Christophe Matthieu
a37aea3a85
[MERGE] from trunk
...
bzr revid: chm@openerp.com-20130313141600-pyazzzanowtrfjja
2013-03-13 15:16:00 +01:00
Guewen Baconnier
c377140650
[FIX] add SQL constraints only for models stored in database (not on AbstractModel)
...
lp bug: https://launchpad.net/bugs/1151703 fixed
bzr revid: guewen.baconnier@camptocamp.com-20130307085826-omhoc3clix41zydl
2013-03-07 09:58:26 +01:00
Quentin (OpenERP)
d97916a063
[IMP] expression.py: added a clue to debug fuzzy tracebacks related to domain badly written
...
bzr revid: qdp-launchpad@openerp.com-20130306152328-qdlil19diks4mvkt
2013-03-06 16:23:28 +01:00
Olivier Dony
db81edc287
[FIX] *: fix/rationalize db logging to avoid incorrect values during logging
...
The setting/clearing of the tracking were not done
consistently, causing log messages that appeared
to come from one database while coming from another
one or none at all.
The tracker is now set at the earliest points
of request handling where we can:
- in web client, when creating WebRequests (dbname, uid)
- at RPC dispatching in server (uid)
- at cron job acquisition in CronWorker (dbname)
- at Registry acquisition in RegistryManager (dbname)
The tracker is cleared at the very entrance of
the request in the WSGI `application`, ensuring
that no logging is produced with an obsolete
db name. (It cannot be cleared at the end of
the request handling because the werkzeug
wrapper outputs more logging afterwards)
bzr revid: odo@openerp.com-20130301120744-jfitcmze2jldecod
2013-03-01 13:07:44 +01:00
Vo Minh Thu
f1adca94c0
[MERGE] netsvc/service.model: added missing/removed unnecessary `except` clauses.
...
bzr revid: vmt@openerp.com-20130225155828-a364gk3ii2prxe0b
2013-02-25 16:58:28 +01:00
Fabien Pinckaers
b831c5aa15
[iMP] error message simplified for required values
...
bzr revid: fp@openerp.com-20130224135248-wdxg8d3fi79lp88z
2013-02-24 14:52:48 +01:00
Olivier Dony
a961e5e377
[MERGE] search: when count=True, execute main query as a subquery to avoid side effects with offset and limit
...
Granted, calling search() with both count=True and
offset or limit is not extremely useful, but
it is still better to accept it and apply it
to the inner query rather than have silly
errors
bzr revid: odo@openerp.com-20130220174416-yoos2py8dc9jc3md
2013-02-20 18:44:16 +01:00
Vo Minh Thu
9412351315
[IMP] Only unhandled exceptions are logged to the console by the netsvc layer.
...
bzr revid: vmt@openerp.com-20130220115337-6319hshm4vfwlr1o
2013-02-20 12:53:37 +01:00
Olivier Dony
bd02d21f2d
[MERGE] osv: automatically retry transactions that failed due to a transient concurrent transaction conflict
...
lp bug: https://launchpad.net/bugs/992525 fixed
bzr revid: odo@openerp.com-20130219173813-ldrx8l1hlegi2e3y
2013-02-19 18:38:13 +01:00
Raphael Collet
0f43032b82
[FIX] search: when count=True, execute main query as a subquery to avoid side effects with offset and limit
...
bzr revid: rco@openerp.com-20130218145100-4q24j8ko9j9elwpw
2013-02-18 15:51:00 +01:00
Quentin (OpenERP)
0a27066e54
[REF] code review
...
bzr revid: qdp-launchpad@openerp.com-20130215143503-6a6x53gdeb6j33tm
2013-02-15 15:35:03 +01:00
Antonin Bourguignon
74ba45d1fc
[MERGE] trunk
...
bzr revid: abo@openerp.com-20130214173522-2ama9xjn4c2hloap
2013-02-14 18:35:22 +01:00
Raphael Collet
70bda50f7d
[IMP] rename model method 'trigger_workflow' into 'step_workflow' (less confusing)
...
bzr revid: rco@openerp.com-20130213150134-wocd9ey2pubpa3xn
2013-02-13 16:01:34 +01:00
Raphael Collet
f78eb868fd
[IMP] remove model methods _workflow_trigger and _workflow_signal, and replace calls to new workflow methods
...
bzr revid: rco@openerp.com-20130213140046-84aa1xtlndltlhzy
2013-02-13 15:00:46 +01:00
Cecile Tonglet
2346b0d88c
[FIX] osv: Bad error message
...
bzr revid: cto@openerp.com-20130213133345-ovhlrfd2g5sb2tts
2013-02-13 14:33:45 +01:00
Cecile Tonglet
8d491afca5
[FIX] osv: Automatically retry the typical transaction serialization errors
...
lp bug: https://launchpad.net/bugs/992525 fixed
bzr revid: cto@openerp.com-20130213125255-ct0bf90pky2n6w3c
2013-02-13 13:52:55 +01:00
Antonin Bourguignon
f929ebc73b
[MERGE] trunk
...
bzr revid: abo@openerp.com-20130213105620-xyez3q7ddgc0x5x8
2013-02-13 11:56:20 +01:00
Raphael Collet
6f045b48e8
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20130213082352-t3wbhkxfh3z10ukt
2013-02-13 09:23:52 +01:00
Raphael Collet
e76befd6c6
[MERGE] trunk-service-thu (remove the class openerp.netsvc.ExportService)
...
bzr revid: rco@openerp.com-20130212154230-y54s2rbetllwnh4q
2013-02-12 16:42:30 +01:00
Vo Minh Thu
c99c4091ce
[REM] Deleted .apidoc lines.
...
They were probably used by some tools. How sad.
bzr revid: vmt@openerp.com-20130212142410-zqdjd8jw3gtvxab0
2013-02-12 15:24:10 +01:00
Antonin Bourguignon
fbb51ee106
[MERGE] trunk
...
bzr revid: abo@openerp.com-20130212125650-3r8lsai6p5c8ls2h
2013-02-12 13:56:50 +01:00
Antonin Bourguignon
e274ccc7cb
[MERGE] trunk
...
bzr revid: abo@openerp.com-20130211150920-c5yam3yykht1qdpn
2013-02-11 16:09:20 +01:00
Xavier Morel
4a9d82621e
[IMP] don't log from import when converting psycopg exceptions to output messages
...
add conversion for unique constraints, test behavior on unique constraint failure
bzr revid: xmo@openerp.com-20130211143647-l16ssw9z73stbgyc
2013-02-11 15:36:47 +01:00
Xavier ALT
4db48cc102
[MERGE] BUG 1082003: orm: _rec_name should be checked on _all_columns not _columns
...
bzr revid: xal@openerp.com-20130211092411-3eeo2ann5jnttliq
2013-02-11 10:24:11 +01:00
Vo Minh Thu
6b459a1f27
[DOC] orm: documented workflow-related methods.
...
bzr revid: vmt@openerp.com-20130206150244-hs67hhe35okl42ei
2013-02-06 16:02:44 +01:00
Christophe Matthieu
3da294f56a
[IMP] ir_action: averwrite read to add a dynamic_help on model
...
bzr revid: chm@openerp.com-20130204145824-mq423czac9k2inzo
2013-02-04 15:58:24 +01:00
Anand Patel (OpenERP)
a52d21e1cb
[IMP]Improved code for the base_import requirde field
...
bzr revid: pan@tinyerp.com-20130201102750-ozxa3xwqa4rsnt60
2013-02-01 15:57:50 +05:30
Vo Minh Thu
a57b655e43
[REF] object_proxy is no longer used by audittrail (which patches directly openerp.service.model).
...
bzr revid: vmt@openerp.com-20130131161442-17rwinwygte6usfg
2013-01-31 17:14:42 +01:00
Vo Minh Thu
e86f90b0c7
[FIX] osv.object_service must be called osv.object_proxy.
...
bzr revid: vmt@openerp.com-20130130135859-vy96niq19fjsp8g4
2013-01-30 14:58:59 +01:00
Vo Minh Thu
674056c4a5
[REF] services: somewhat clean use of openerp exceptions.
...
bzr revid: vmt@openerp.com-20130130134451-yft2y56hkpnoxgwa
2013-01-30 14:44:51 +01:00
Vo Minh Thu
19b0315f68
[REF] model service: removed the unneeded object_service class.
...
bzr revid: vmt@openerp.com-20130130113646-pviw5d6gnohk7wrb
2013-01-30 12:36:46 +01:00
Vo Minh Thu
271aafd8de
[IMP] added create_workflow, delete_workflow,redirect_workflow as ORM methods.
...
bzr revid: vmt@openerp.com-20130129122710-ypvk9x7ndq84mq8r
2013-01-29 13:27:10 +01:00
Vo Minh Thu
200d008fc4
[FIX] orm: call super in __getattr__.
...
bzr revid: vmt@openerp.com-20130125165314-66j55mtobvt61c7r
2013-01-25 17:53:14 +01:00
Vo Minh Thu
ad7d846106
[IMP] orm: expose a signal_xxx() method to call workflow.trg_validate().
...
bzr revid: vmt@openerp.com-20130125155132-nhyntobe5xm1g7h0
2013-01-25 16:51:32 +01:00
Antonin Bourguignon
11dbed0fb7
[IMP] only call ir.translation when necessary
...
bzr revid: abo@openerp.com-20130123153722-iijbl8hvesstneq3
2013-01-23 16:37:22 +01:00
Antonin Bourguignon
0b65aa2231
[IMP] fix a comment's indentation, remove a few whitespaces
...
bzr revid: abo@openerp.com-20130123152234-g2ou48xajxsq8sqj
2013-01-23 16:22:34 +01:00
Antonin Bourguignon
8214854b79
[IMP] doc
...
bzr revid: abo@openerp.com-20130117144755-r9oboeaw8rr1seqa
2013-01-17 15:47:55 +01:00
Olivier Dony
8e5f0e2ce2
[FIX] fields.date[time]: context_today()/context_timestamp() should fallback to user TZ if context TZ is missing
...
This takes care of cases where the context is missing,
e.g. for workflow-based operations, and is similar
to the way tools.translate._() falls back to the user
language.
lp bug: https://launchpad.net/bugs/949516 fixed
bzr revid: odo@openerp.com-20130111175717-u8r1t7s8872bz2rx
2013-01-12 06:57:17 +13:00
Christophe Simonis
c10d28e4e6
[FIX] orm: SUPERUSER is not restricted by groups on fields
...
bzr revid: chs@openerp.com-20130116164025-qns65cb78p8p57m1
2013-01-16 17:40:25 +01:00
Fabien Pinckaers
aa86fb2bc1
[IMP] custom model allowed
...
bzr revid: fp@tinyerp.com-20121227172825-lny2fobb5g89edca
2012-12-27 18:28:25 +01:00
Raphael Collet
c9bc74c5c9
[MERGE] lp:~therp-nl/openobject-server/ronald@therp.nl_trunk_lp1009014_new (improve transient models vacuum)
...
bzr revid: rco@openerp.com-20121221153122-q6j8vatd2xfmqr3n
2012-12-21 16:31:22 +01:00
Raphael Collet
8ead65d82a
[IMP] orm: fix vacuum of transient model
...
bzr revid: rco@openerp.com-20121221152914-qs1s9h1zwnyzft1m
2012-12-21 16:29:14 +01:00
Raphael Collet
e7ce4a4529
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20121221134259-scc92nby1dn91pe8
2012-12-21 14:42:59 +01:00
Thibault Delavallée
919c0d1152
[REV] Reverted last improvement, because this was messing with the menus.
...
bzr revid: tde@openerp.com-20121221095934-ocbnwz2zvbdbmfug
2012-12-21 10:59:34 +01:00
Thibault Delavallée
e2728306b3
[IMP] OROM: order_spec is overidden by self._order only if None (aka, not specified at all). False or void order_spec allows to avoid having any order_by clause. This is used now in needaction, to speedup the search.
...
bzr revid: tde@openerp.com-20121220205102-lx9ftf3l8qg0xqcu
2012-12-20 21:51:02 +01:00
Thibault Delavallée
36e5b6e88e
[FIX] _search not uniquifies the results, because when using _auto_join we could have duplicates in the 'left part' of the result, i.e. a lead with several unread messages. This is done using a custom method instead of a set, because sets are unordered.
...
bzr revid: tde@openerp.com-20121220141842-or3bigz11qkb13qn
2012-12-20 15:18:42 +01:00
Raphael Collet
95b41b40e9
[IMP] register_hook: improve a bit the code
...
bzr revid: rco@openerp.com-20121219132138-npf12n5l5ug6ujvx
2012-12-19 14:21:38 +01:00
Raphael Collet
fd5dee2267
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20121219130750-3ljqo3dyz05zww08
2012-12-19 14:07:50 +01:00
Olivier Dony
9f77d2e2f4
[FIX] orm,registry: properly check m2o FKs during model update + fix some models `auto_init`ed multiple times
...
The case where no constraint existed at all was not working,
and after fixing it, the ORM started to re-create the same
constraints multiple times for some modules. This was for
models that are split within a module (such as res.users in
base, which is made of several small classes): all the
partial models were going through _auto_init instead
of only the final one - doing useless extra work.
Unfortunately establishing the FK happens before the
XML data files are loaded, so a number of FK and
NOT NULL constraints failed to apply due to missing
tables/records. base.sql had to be extended a bit
to cover these cases in a minimalist fashion
bzr revid: odo@openerp.com-20121217214645-av9n003yzterhujw
2012-12-17 22:46:45 +01:00
Raphael Collet
39fe69babe
[FIX] expression: avoid delitem on a tuple
...
bzr revid: rco@openerp.com-20121217134559-cjc0b4ncs1drupn7
2012-12-17 14:45:59 +01:00
Raphael Collet
3040114651
[MERGE] trunk-style-improvements-xmo (Python stylistic improvement)
...
bzr revid: rco@openerp.com-20121217110150-4ijt04ic17miktq7
2012-12-17 12:01:50 +01:00
Raphael Collet
2679a49af4
[FIX] orm: replace incorrect usage of 'in' by '=='
...
bzr revid: rco@openerp.com-20121217104721-miqmtw2zm7r7lxrs
2012-12-17 11:47:21 +01:00
Raphael Collet
eecc7de437
[MERGE] trunk-acl-thu (check read/write access restrictions on fields with a groups attribute)
...
bzr revid: rco@openerp.com-20121217101528-nt5hsjvvodaap57m
2012-12-17 11:15:28 +01:00
Antony Lesuisse
f6fe592152
[MERGE] trunk
...
bzr revid: al@openerp.com-20121216014404-oonymtva4uww7bwk
2012-12-16 02:44:04 +01:00
Antony Lesuisse
0a35f78974
[MERGE] remove res.partner.address by chs
...
it also removes an ugly hack in the orm.
bzr revid: al@openerp.com-20121215182836-y15v2mwgdg9wyubi
2012-12-15 19:28:36 +01:00
Vo Minh Thu
91ee5eae52
[IMP] orm/acl: proper message instead of `TODO`.
...
bzr revid: vmt@openerp.com-20121214155313-76lncslpx7ugrp6x
2012-12-14 16:53:13 +01:00
Vo Minh Thu
08a082f63f
[FIX] registry: Set the fields_by_model attribute in __init__(), use None to flag non-existing fields-per-model cache.
...
bzr revid: vmt@openerp.com-20121214141114-em9r66e3sfy21t2r
2012-12-14 15:11:14 +01:00
Xavier Morel
d0a377cb1c
[FIX] incorrect docstrings or docstring param names not matching actual param names
...
bzr revid: xmo@openerp.com-20121214130758-a2wp963w4djmb02k
2012-12-14 14:07:58 +01:00
Xavier Morel
b6ece5d65f
[REM] trailing semicolons
...
bzr revid: xmo@openerp.com-20121214124310-wfdkhmcwxnyqu30m
2012-12-14 13:43:10 +01:00
Xavier Morel
c6079dd6bb
[REM] unnecessary parens
...
bzr revid: xmo@openerp.com-20121214123803-6xu2s1ndnoyj4i3e
2012-12-14 13:38:03 +01:00
Xavier Morel
a5cb8460c6
[FIX] __init__ can't return values
...
bzr revid: xmo@openerp.com-20121214122525-bd5207viiz4vqi8x
2012-12-14 13:25:25 +01:00
Xavier Morel
4cb3685f70
[IMP] compare to None by identity
...
bzr revid: xmo@openerp.com-20121214121638-6k5h0ztg94i4f5t6
2012-12-14 13:16:38 +01:00
Vo Minh Thu
3667e3c619
[IMP] module loading: removed unnecessary indentation, added comments.
...
bzr revid: vmt@openerp.com-20121214105820-9nlgzu9pm7cvh1pz
2012-12-14 11:58:20 +01:00
Olivier Dony
e660b70ecb
[IMP] orm: do not warn about missing ondelete cascade rule if ondelete is restrict - that's safe as well
...
bzr revid: odo@openerp.com-20121212210247-emrz5rf9ewcwdggu
2012-12-12 22:02:47 +01:00
Vo Minh Thu
eb0fcc35d2
[FIX] check_field_access_rights: ignore nonexisting fields
...
It seems name_alias is requested but does not exist.
bzr revid: vmt@openerp.com-20121212151509-22494edob4e3fqaf
2012-12-12 16:15:09 +01:00
Vo Minh Thu
1a4fd71880
[FIX] test_fields: _all_columns must be modified similarly to _columns.
...
(Because of the newly added method check_field_access_rights().)
bzr revid: vmt@openerp.com-20121212134755-ykfdykqepwzti5uf
2012-12-12 14:47:55 +01:00
Vo Minh Thu
9d2afcae3f
[IMP] orm: check groups-based access rights on model fields in read() and write().
...
The commented-out tests present in test_acl.py now pass.
Other tests now fail :-(.
bzr revid: vmt@openerp.com-20121212113647-11y3buulifg6tyhj
2012-12-12 12:36:47 +01:00
Christophe Simonis
74b431298e
[FIX] remove res.partner.address model
...
bzr revid: chs@openerp.com-20121211182934-up3sxi0pcw20qrit
2012-12-11 19:29:34 +01:00
Vo Minh Thu
f668a123d9
[IMP] Reduce considerably the loading time of a new registry.
...
Loading time was mesured on the loading of a second database (identical to the
first one), i.e. by passing -d xx,yy on the command line, using cProfile. The
databases were installed with sale, mrp, and the crm.
The cProfile code is commited as part of this patch and should be removed (or
maybe guarded by some command-line flag) (just as the commenting-out of the
cron startup).
The patch was also applied on top of the trunk-simple-table-stats-vmt branch
which provides SQL queries counters.
Results indicate that the number of SQL queries are reduced from about 2100 to
27. Loading time is reduced from 1.3s to 0.26s (i.e. improved by 5).
Changes:
All calls to ir_model_fields to fetch manual (custom) fields are done in a
single call (prior to instanciate all models).
Checks for empty module descriptions are not done unless we are in init or
update mode. (The behavior was the opposite, which was probably a mistake).
Some calls to ir_translation, passing en_US because there was no lang in the
context, are not done anymore.
The improved time is also a result of a change in the decimal_precision module
where precision_get fetches all digits/applications instead of one at a time
(and thus implements its own caching instead of relying on
openerp.tools.ormache).
bzr revid: vmt@openerp.com-20121211105954-lwgs5js7yw3tzghs
2012-12-11 11:59:54 +01:00
Thibault Delavallée
bd0bae6625
[MERGE] Perform auto-join and mailboxes+needaction speed udpate. Server-side branch, holding a refactoring of expression.parse and the addition of _auto_join feature on relational fields.
...
expression.parse: refactored the main parsing loop, now using source and result stacks. Leaf elements are encapsulated into a specific object, allowing to delegate the join condition formation, working table management and table aliases generation to them. The parsing is now a simple loop taking a leaf, doing one action on it, and putting the result back to be analyzed or in the results. This allows to avoid having nested loops and uncontrolled results.
Other modifications :
- updated the generation of order_by to take into account the table now referred using aliases
- updated Query object to use the aliases
- fixed an outstanding bug about _order, now handled as order. This means that putting direct SQL into _order of models will not be supported anymore, because of the computing complexity now that we have multiple joins in queries. The branch holds the patch from Paulius Sladkevičius
- updated and added tests
- added a basic documentation for the freature
lp bug: https://launchpad.net/bugs/1070757 fixed
bzr revid: tde@openerp.com-20121210154652-6sab9usb38i7adlh
2012-12-10 16:46:52 +01:00
Thibault Delavallée
f0abd6f49e
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20121210083805-1t45n6xxmptpo28o
2012-12-10 09:38:05 +01:00
Antony Lesuisse
2f1f17ead9
[IMP] fields warning display args to locate them
...
bzr revid: al@openerp.com-20121209193952-ukk0aie3d8fg18q2
2012-12-09 20:39:52 +01:00
Antony Lesuisse
d7d1fe562c
[IMP] dbname on localthread for logging
...
bzr revid: al@openerp.com-20121209034910-0iv3mek8860yts3i
2012-12-09 04:49:10 +01:00
Antony Lesuisse
a6700e0e3f
[MERGE] multiprocess signaling
...
trying trunk, feature branch fails with Address already in use
bzr revid: al@openerp.com-20121208210954-pi55sib4x7eyamem
2012-12-08 22:09:54 +01:00
Antony Lesuisse
3d2a09a973
multiprocessing signaling manually backported from 6.1
...
bzr revid: al@openerp.com-20121208181151-lfy956ysnok5b5hf
2012-12-08 19:11:51 +01:00
Christophe CHAUVET
82b17c82a4
[IMP] Remove completly the OIDS, cause WITHOUT OIDS is activate by default
...
bzr revid: christophe.chauvet@syleam.fr-20121207162110-75hbq71zc6ufeby9
2012-12-07 17:21:10 +01:00
Thibault Delavallée
bb598cd105
[CLEAN] orm: added quote around a forgottent table name; cleaned a bit some code and added comments, removed dead code.
...
bzr revid: tde@openerp.com-20121207162019-ec1x7a38vw2rrqze
2012-12-07 17:20:19 +01:00
Thibault Delavallée
9381a82715
[IMP] Added an assert on the alias length.
...
bzr revid: tde@openerp.com-20121207160933-1ivbkkv6tgg5a7x3
2012-12-07 17:09:33 +01:00
Thibault Delavallée
61a2a82174
[MERGE] Merged branch holding a proposal to solve the generate_order_by issue (see lp:1070757). As requested by Olivier Donny, this fix has been moved into generate_order_by. Deleted previous workaround done in this branch. Patch courtesy of Paulius Sladkevičius
...
bzr revid: tde@openerp.com-20121207155825-9bjvuxhyr0x937l7
2012-12-07 16:58:25 +01:00
Thibault Delavallée
50cf6d4008
[CLEAN] Query: cleaned a bit the code. All joins now goes through the same method, either implicit or explicit. Will have to be upgraded in future versions, but at least this is a bit centralized. Updated ORM accordingly. Updated tests. Added a get_alias_from_query method in expression that find the table and the alias from a 'full alias' statement.
...
bzr revid: tde@openerp.com-20121207154204-mx036lpj3vdclu77
2012-12-07 16:42:04 +01:00
Thibault Delavallée
390ff1540f
[CLEAN] expression.py: cleaned and added comments, var names (table -> model notably).
...
bzr revid: tde@openerp.com-20121207123727-md65da41863y827e
2012-12-07 13:37:27 +01:00
Thibault Delavallée
e36b44e82f
[IMP] [WIP] order_by: now using aliases in _generate_order_by, _generate_o2m_order_by, _inherits_join_add, ... added some tests. Next comits will clean a bit the code, because currently it is a bit messy.
...
bzr revid: tde@openerp.com-20121207115424-x8gkjcqpi8dz96g2
2012-12-07 12:54:24 +01:00
Christophe CHAUVET
3d3534ca39
[IMP] Don't use WITH OIDS when create a table
...
lp bug: https://launchpad.net/bugs/1087332 fixed
bzr revid: christophe.chauvet@syleam.fr-20121206163711-5jvrhrg8w5le4zay
2012-12-06 17:37:11 +01:00
Thibault Delavallée
bb57752f0a
[IMP] [CLEAN] [REVIEW] expression: udpated domain management. Added pop and push methods in parse to hide the internal plumbery. Cleaned some comments, deleted dead/unnecessary code, updated some comments. to_ids and childof_domain back in parse. Added generate_table_alias, method that should be used everywhere if possible when generating table name or aliases for sql conditions and things like that.
...
bzr revid: tde@openerp.com-20121206162128-1qol201os1xztlz5
2012-12-06 17:21:28 +01:00
Thibault Delavallée
a0b8a58174
[IMP] [REVIEW] _auto_join on many2many now raises a NotImplementedError; added a test case for that.
...
bzr revid: tde@openerp.com-20121206092745-a8t62khs4x37db1g
2012-12-06 10:27:45 +01:00
Thibault Delavallée
df4665fcd2
[IMP] [CLEAN] [REVIEW] field._properties -> isinstance(field, fields.function).
...
bzr revid: tde@openerp.com-20121206091648-vmy2ghr293reoxn6
2012-12-06 10:16:48 +01:00
Thibault Delavallée
02c200844c
[CLEAN] Removed some forgotten print statements.
...
bzr revid: tde@openerp.com-20121205153535-lfs6yrokyk0wfm0w
2012-12-05 16:35:35 +01:00
Thibault Delavallée
ea01dfe9dd
[CLEAN] fields.py: added auto_join in one2many and many2one __init__, binded on _auto_join. Added some short explanations in fields.py about the attribute.
...
bzr revid: tde@openerp.com-20121205153410-07vo3j1c641xgmda
2012-12-05 16:34:10 +01:00
Thibault Delavallée
1652bb1e83
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20121205092215-g6a8fpxtd1fq3nwn
2012-12-05 10:22:15 +01:00
Vo Minh Thu
93ae934963
[ADD] added comment in _validate() explaining why the context is not passed around when calling _constraints functions.
...
bzr revid: vmt@openerp.com-20121205082840-2ww34gbs7nl56952
2012-12-05 09:28:40 +01:00
Thibault Delavallée
a8359924c2
[IMP] expression.parse: added the support of domain on one2many fields when _auto_true is activated. Leaf creation from an existing leaf moved as a method in expression object. Added some comments. Added / updated some tests.
...
bzr revid: tde@openerp.com-20121204170744-rv8e0zlteqoyj60o
2012-12-04 18:07:44 +01:00
Arnaud Pineux
133d581273
[FIX] _register_hook & loader
...
lp bug: https://launchpad.net/bugs/944197 fixed
bzr revid: api@openerp.com-20121204161029-3gagt4lcci93g5lk
2012-12-04 17:10:29 +01:00
Thibault Delavallée
9e6c2805ab
[REF] [IMP] expression.parse: refactored the main parsing loop, now using source and result stacks. Leaf elements are encapsulated into a specific object, allowing to delegate the join condition formation and aliases generation, as well as working_table management to them. The main parsing loop is now a loop taking a leaf, doing one action on it, and putting the result back to be analyzed or in the results. This allows to avoid having while loops inside a main while loop with some weird corner effects.
...
bzr revid: tde@openerp.com-20121204142650-gkhmjdeu5upi25kp
2012-12-04 15:26:50 +01:00
Olivier Dony
b624267457
[FIX] translate,orm: remember local Model [_sql]_constraints, and keep only those when exporting translations
...
Previously all _*constraints leaked upstream and
downstream, and were duplicated in all the exported
terms for all modules inheriting from a given model.
bzr revid: odo@openerp.com-20121204082947-tdpiu71ryxzuredb
2012-12-04 09:29:47 +01:00
Thibault Delavallée
638fc20618
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20121130093658-uvm0gbo90su88psh
bzr revid: tde@openerp.com-20121203131657-4gcp4wreylnmw2or
bzr revid: tde@openerp.com-20121204082427-7zdzn6f21xzvxby9
2012-12-04 09:24:27 +01:00
ajay javiya (OpenERP)
61639fd491
[FIX]:Issue of add custome field on object
...
bzr revid: aja@tinyerp.com-20121203132713-298spxst191htlh7
2012-12-03 18:57:13 +05:30
Thibault Delavallée
681d783234
[IMP] expression.parse: added some asserts about non supported cases.
...
bzr revid: tde@openerp.com-20121129165032-nnlnf1k0iwal24ny
2012-11-29 17:50:32 +01:00
Thibault Delavallée
47fda82264
[FIX] expression.parse: fixed indentation error preventing leafs to be correctly replaced in auto_join.
...
bzr revid: tde@openerp.com-20121128181258-cgmm7wqgv657iptb
2012-11-28 19:12:58 +01:00
Thibault Delavallée
ac587f68fe
[IMP] expression.py: added support of _auto_join in parse. The purpose is to add join clauses to queries instead of replacing many2one or one2many fields by id in ... equivalent leafs. This should lessen the number of executed queries, as well as the time required for some queries like mailboxes queries. Updated the generation of full table aliases when generating SQL, to avoid having a table having it own name as alias.
...
bzr revid: tde@openerp.com-20121128095042-x5rzgwydv0g9uy0m
2012-11-28 10:50:42 +01:00
Thibault Delavallée
9b196638cb
[IMP] expression: replaced field paths now use an alias.field leaf style to prepare the inclusion of joins. In leaf_to_sql, handle this case accordingly.
...
bzr revid: tde@openerp.com-20121127170117-qlhfs0r1ned5uz3c
2012-11-27 18:01:17 +01:00
Thibault Delavallée
873d6cd5b1
[CLEAN] expression.py: self.__exp -> self.exp, because too much underscores kill my eyes. Added a bit of comments. Please note that the behavior has still not changed.
...
bzr revid: tde@openerp.com-20121127164531-hbsyhshmefdw0f93
2012-11-27 17:45:31 +01:00
Thibault Delavallée
07f26441bb
[IMP] expression.parse: improved code about extracting inherits\'d fields. I do not like while True statements, I prefer having a clear condition. Behavior should still be the same as before.
...
bzr revid: tde@openerp.com-20121127163758-tddhbglygcbkvzed
2012-11-27 17:37:58 +01:00
Thibault Delavallée
48138c9d26
[IMP] [DOC] expression.py: renamed field_obj to relational_table, that make more sens to me. Added comments in the code to understand the algorithm. Please note that currently, no logic has been altered.
...
bzr revid: tde@openerp.com-20121127163014-5ww5mre6j7opmzp1
2012-11-27 17:30:14 +01:00
Thibault Delavallée
53efed664d
[IMP] expression.py: _leaf_to_sql now uses a table_alias instead of table._table for query generation. Currently table_alias equals table._table, so the behavior has not changed.
...
bzr revid: tde@openerp.com-20121127161354-fskwsmfvx3j8nto6
2012-11-27 17:13:54 +01:00
Thibault Delavallée
8163c0027b
[IMP] [TEST] orm: updated order_by generation by adding the root table name to the order by condition generated based on self._order. Added a mockup of where_calc in test_expression, to be able to track generated Query objects. Added a first test on a one2many query, to track current behavior.
...
bzr revid: tde@openerp.com-20121127160627-qs1tupvgr8ypexoo
2012-11-27 17:06:27 +01:00
Thibault Delavallée
1bda6f44db
[ADD] fields.py: added _auto_join attribute. This attribute will be used to automatically generate join queries, instead of doing sub-queries returning an 'id in' domain.
...
bzr revid: tde@openerp.com-20121127153432-3ttqm8pmgk3l7a77
2012-11-27 16:34:32 +01:00
Thibault Delavallée
e147a5483f
[CLEAN] expression.py: table_aliases now holds a list of aliases (names), and table_aliases_mapping does the mapping between a name and a table. The parsing algorithm now uses some accessors instead of directly accessing the data structures.
...
bzr revid: tde@openerp.com-20121127151113-zregov1i2isoll9z
2012-11-27 16:11:13 +01:00
Thibault Delavallée
c1c5a85231
[CLEAN] expression.py: renamed some variables of expression; cleaned a bit the coding style (mainly spaces after commas).
...
bzr revid: tde@openerp.com-20121127150159-su9x00m7tc8tc6dj
2012-11-27 16:01:59 +01:00
Olivier Dony
7f5ad72429
[MERGE] Forward-port 6.1 bugfixes up to rev. 4307
...
rev.4307 = rev-id launchpad_translations_on_behalf_of_openerp-20121125065030-g5if5pybr61la4yj
bzr revid: odo@openerp.com-20121126160320-t2suuik6lhk6wl0x
bzr revid: odo@openerp.com-20121126161836-mv8yymzgbnmif4ve
bzr revid: odo@openerp.com-20121126162023-ejvsapwouyudw6c6
bzr revid: odo@openerp.com-20121126181527-d4yx15372bis77qj
2012-11-26 19:15:27 +01:00
Arnaud Pineux
084371b51b
[FIX] Automated action rules
...
bzr revid: api@openerp.com-20121126112205-bf80xlf1ja5o2f7i
2012-11-26 12:22:05 +01:00
Quentin (OpenERP)
18b7592b8d
[FIX] osv/orm: fixed the use of 'order' argument given to a search function in order to allow to order by 'ID DESC' and by '<another valid order> + ID ASC/DESC'
...
bzr revid: qdp-launchpad@openerp.com-20121121130736-guj7np9nk65zx3o1
2012-11-21 14:07:36 +01:00
Olivier Dony
caa51abb34
[MERGE] fields_view_get: avoid messing up selection fields' _domain attributes, courtesy of Stefan Rijnhart (Therp)
...
lp bug: https://launchpad.net/bugs/1081092 fixed
bzr revid: odo@openerp.com-20121120132230-7xb6d2xxwcgn7ipn
2012-11-20 14:22:30 +01:00
Olivier Dony
f0ef9bda04
[IMP] Model.default_get: allows setting user default values of x2m to False (for consistency with write())
...
bzr revid: odo@openerp.com-20121120131839-1kdzevubi74ibthy
2012-11-20 14:18:39 +01:00
Stefan Rijnhart
d924cec182
[FIX] Append view domain (in case of selection widget) to a copy of the field's domain
...
lp bug: https://launchpad.net/bugs/1081092 fixed
bzr revid: stefan@therp.nl-20121120121936-8b1wiho0q96ckeqk
2012-11-20 13:19:36 +01:00
Christophe Matthieu
248f81277f
[FIX] fields.html: behave as fields.text for empty values: store NULL
...
bzr revid: chm@openerp.com-20121119104332-bqm81nuik6pqsbf9
2012-11-19 11:43:32 +01:00
Thibault Delavallée
8b5a7c49a4
[REM] osv: removed temporary override of raise, added for debug purpose.
...
bzr revid: tde@openerp.com-20121114112021-trre94clvs8nuo43
2012-11-14 12:20:21 +01:00
Thibault Delavallée
d52fdd0ab3
[MERGE] Sync with trunk.
...
bzr revid: tde@openerp.com-20121112160536-63tx1u3c6yr2u8x9
2012-11-12 17:05:36 +01:00
Olivier Dony
2a1381a8af
[FIX] orm: make sure superuser mode always bypasses access rules filtering - one case was not covered after recent refactoring
...
Caused by refactoring in rev.4200
revid:odo@openerp.com-20120618094327
bzr revid: odo@openerp.com-20121112120453-axiul7k6y0o67hgb
2012-11-12 13:04:53 +01:00
Xavier Morel
be03940d64
[FIX] temperate error message in case of missing required field
...
The message worked (ish) for a missing field directly on the model,
but completely broke if the missing field was on an o2m and had the
same name as a field on the model, then it was complete
misinformation.
bzr revid: xmo@openerp.com-20121112084804-zcgtpml3a19uv909
2012-11-12 09:48:04 +01:00
Xavier Morel
35c44e7e20
[IMP] savepoint rollbacks after error transformation/logging of pg errors to still have original query on cursor
...
bzr revid: xmo@openerp.com-20121112084202-4nl94x2omlb4w2jr
2012-11-12 09:42:02 +01:00
Olivier Dony
fd6946f24a
[IMP] orm: make error handling more consistent when accessing deleted/filtered records
...
Previous behavior was unspecified and untested - leading to random results
when performing operations on a mix of deleted and ir.rule-filtered records.
The behavior is now clarified and explicitly tested.
One suprising case remains: read() on a deleted record
returns an empty result instead of raising an error,
in order to avoid spurious errors when a client
performs a sequence of search(), read() while
another user is deleting records.
bzr revid: odo@openerp.com-20121109171451-z2m6oqs910103lcz
2012-11-09 18:14:51 +01:00
Thibault Delavallée
62c419e66f
[IMP] tools: mail: improved append_content_to_html, including plaintext2html. Updated tests.
...
bzr revid: tde@openerp.com-20121109123521-e04g4zrhtv947l1r
2012-11-09 13:35:21 +01:00
Xavier Morel
4a4fc38d5e
[FIX] nuke ir.model.data caches before starting imports
...
Otherwise a previous validation (or 2) will poison the cache and the
import itself will fail even though the validation succeeeded (and
importing with no validation would have succeeded), as the orm cache
doesn't take DB rollbacks in account.
bzr revid: xmo@openerp.com-20121109113951-p3qgg6m5g7poay5e
2012-11-09 12:39:51 +01:00
Thibault Delavallée
ee6e9894a4
[MERGE] Sync with server/trunk.
...
bzr revid: tde@openerp.com-20121107083807-12i51iax0imkhjf1
2012-11-07 09:38:07 +01:00
Olivier Dony
0357fddc61
[FIX] orm,web_services: properly return results of workflow triggers
...
bzr revid: odo@openerp.com-20121106181507-ss1w425c1omsn3sb
2012-11-06 19:15:07 +01:00
Thibault Delavallée
8a1a612fba
[FIX] fields.py: html_sanitize now in mail file.
...
bzr revid: tde@openerp.com-20121106122758-iwyxmedgnznpjyna
2012-11-06 13:27:58 +01:00
Xavier Morel
18f885b10f
[FIX] recursive conversion of o2ms in import
...
added new test cases from gkr
bzr revid: xmo@openerp.com-20121106084206-1cckepflh9h4g1yv
2012-11-06 09:42:06 +01:00
Xavier Morel
f02c4266d6
[IMP] better logging during import failure
...
bzr revid: xmo@openerp.com-20121105100717-pqexs7j710s2ea2i
2012-11-05 11:07:17 +01:00
Raphael Collet
750ef9d931
[IMP] fields.related._fnct_read: small improvements
...
bzr revid: rco@openerp.com-20121105131712-sc70thn3wpyq6o7y
2012-11-05 14:17:12 +01:00
Raphael Collet
52c29ae1c0
[FIX] fields.related._fnct_read: fix handling of type many2one
...
bzr revid: rco@openerp.com-20121105094929-oz7trjzwlqw90499
2012-11-05 10:49:29 +01:00
Raphael Collet
401dd57f30
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20121105083756-jdr9fxp32djpifqk
2012-11-05 09:37:56 +01:00
Raphael Collet
db13e8591a
[FIX] fields.related._fnct_write: handle the case where ids is a single id
...
bzr revid: rco@openerp.com-20121105082259-rcmcjs5n1eimtcpl
2012-11-05 09:22:59 +01:00
Divyesh Makwana (Open ERP)
8047c51575
[Merge] Merge with trunk.
...
bzr revid: mdi@tinyerp.com-20121102102812-qqaob1uo3aj8jpim
2012-11-02 15:58:12 +05:30
Olivier Dony
485e437440
[FIX] orm: _validate should not immediately rollback
...
For some obscure reason _validate used to immediately
rollback the current transaction as soon as a constraint
failed anywhere. This is completely incorrect and
violates the transaction abstraction: the responsibility
of creating and closing transactions belongs to the
RPC dispatch layer, or whatever takes its place (e.g. the
test setup/teardown for tests). Rolling back or committing
in the middle of a transaction precludes special
error treatment and can have very bad side effects.
bzr revid: odo@openerp.com-20121029180742-2gw08kobdh7w5njc
2012-10-29 19:07:42 +01:00
Raphael Collet
7e7d877e17
fields.related: simplify read and write methods
...
bzr revid: rco@openerp.com-20121029153504-157ss9948o86uv6z
2012-10-29 16:35:04 +01:00
Raphael Collet
42f0962f99
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20121029153047-sd8i97sfkdy1wcb1
2012-10-29 16:30:47 +01:00
Purnendu Singh (OpenERP)
1a910d71d6
[IMP] added a comment line
...
bzr revid: psi@tinyerp.com-20121025062346-ud9m02ah4m9om1vf
2012-10-25 11:53:46 +05:30
Purnendu Singh (OpenERP)
6080eadb4b
[MERGE]
...
bzr revid: psi@tinyerp.com-20121023071213-dd5mu9oce4s3vh9i
bzr revid: psi@tinyerp.com-20121025062105-tkhiybwv77tbqwpr
2012-10-25 11:51:05 +05:30
Ronald Portier
2747e5bef2
[FIX] Correct both age based as count based vacuum cleaning.
...
lp bug: https://launchpad.net/bugs/1009014 fixed
bzr revid: ronald@therp.nl-20121024140119-hv72ffxmf1gvf2sj
2012-10-24 16:01:19 +02:00
Paulius Sladkevičius
d9c7febf49
Fixed sorting for m2o
...
bzr revid: paulius@hacbee.com-20121024100321-tqjm4pyk9y392qur
2012-10-24 13:03:21 +03:00
Ronald Portier
d41a234599
[FIX] Fix vacuum cleaning both for time and count based cleaning,
...
adding a safeguard against cleaning recently used rows.
bzr revid: ronald@therp.nl-20121024072807-vsvhub1m0y3j5ude
2012-10-24 09:28:07 +02:00
Quentin (OpenERP)
e6e4e8d4c1
[REV] osv/orm: revert of a previous patch that was unifying the behavior for fields.related and fields.function at creation time because it's a bit dangereous to treat it right now, and may need the add of a new field attribute. "I'll be back", said the patch
...
bzr revid: qdp-launchpad@openerp.com-20121022123100-wwr7lnmpqebddxon
2012-10-22 14:31:00 +02:00
Quentin (OpenERP)
7c91102e87
[MERGE] trunk
...
bzr revid: qdp-launchpad@openerp.com-20121019121308-uwqg1em4hdn10xev
2012-10-19 14:13:08 +02:00
Mayur Maheshwari (OpenERP)
cfaff8a85a
[IMP]orm : improve multi tag when multi=true action display in tree and when flase action display in form
...
bzr revid: mma@tinyerp.com-20121019094303-p4mlf9oxlxhuvc48
2012-10-19 15:13:03 +05:30
Olivier Dony
361c0acd2a
[FIX] expression: negative operators (e.g. NOT IN) where not working on o2m fields - tests added
...
bzr revid: odo@openerp.com-20121018124750-bkea51a7zkvwwygi
2012-10-18 14:47:50 +02:00
Quentin (OpenERP)
38067dffc9
[FIX] osv/orm: compute the _fct_inv() of stored functional fields at the record creation. Compute also the _fct_inv() of related fields (because there is no reason not to do it). That last patch revert a 'fix' of lp bug 544087 introduced in revision 4182, i don't get the purpose of it but that bug is not repdocutible anymore...
...
bzr revid: qdp-launchpad@openerp.com-20121017102821-tjx7gqiz86v7sn54
2012-10-17 12:28:21 +02:00
Vo Minh Thu
7878f9c7b6
[MERGE] babel: use babel for locale-aware read_group date formatting.
...
When grouping on a date or datetime field, read_group groups by (year, month),
and formats that pair to have a displayable result (as a group title).
This is currently done with strftime and the pattern `%B %Y` (complete word
month, long year), which is problematic as — at best — it uses the server's
locale for its formatting. This means if the server works in an english locale
e.g. russian users are going to see the month name in english, instead of their
own language.
This proposal makes use of `babel.dates.format_date`, which is locale-aware
(and to which a locale can be provided directly) and the locale present in the
request context to format the month, year pair according to the user's
language.
bzr revid: vmt@openerp.com-20121012144634-spaqze7d4jc8l00l
2012-10-12 16:46:34 +02:00
niv-openerp
dcae3b64a3
[REVERT] removed server-side evaluation of field options
...
bzr revid: nicolas.vanhoren@openerp.com-20121011122214-ab1mqyz9h8jnq7ql
2012-10-11 14:22:14 +02:00
Xavier Morel
7a7876d4a8
[MERGE] from trunk
...
bzr revid: xmo@openerp.com-20121010154605-u16f57fnck148ued
2012-10-10 17:46:05 +02:00
Quentin (OpenERP)
f4f3d6fa15
[REF] code review by odo
...
bzr revid: qdp-launchpad@openerp.com-20121010104220-nqi6c12ua7tnaejt
2012-10-10 12:42:20 +02:00
Quentin (OpenERP)
90fc4d6651
[IMP] use of literal_eval from ast instead of const_eval from tools, as per Olivier recommendation
...
bzr revid: qdp-launchpad@openerp.com-20121009152828-3bdxpatkrl1qmyfi
2012-10-09 17:28:28 +02:00
Quentin (OpenERP)
c98de15a09
[IMP] osv/orm.py: evaluate in python the 'options' attribute of a field in an xml view, before enclosing it in json. This allow to use python instead of json syntax in the definition of the options of a widget, which is a much more consistent behavior
...
bzr revid: qdp-launchpad@openerp.com-20121009142607-rk3l00atu3w3kksp
2012-10-09 16:26:07 +02:00
Xavier Morel
510eea5305
[CHG] make empty cells clear out the corresponding field on import, rather than skip them
...
bzr revid: xmo@openerp.com-20121009092519-ge86yp3nnkqe9gic
2012-10-09 11:25:19 +02:00
Xavier Morel
e8af13f0e8
[IMP] don't pass in a default lang to _get_source if no value is provided in the context, caught by odo
...
bzr revid: xmo@openerp.com-20121008133823-vhypgddiicztai3a
2012-10-08 15:38:23 +02:00
Xavier Morel
350d365ba0
[IMP] remove docstring for cr, uid following odo review
...
bzr revid: xmo@openerp.com-20121008131407-5hnxkn17lycfoqzu
2012-10-08 15:14:07 +02:00
Raphael Collet
4f235060a7
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20121005124845-suonokozsufyicg2
2012-10-05 14:48:45 +02:00
Xavier Morel
601568f5f9
[FIX] don't import empty cells at all rather than set them to False, to allow defaults handling to do its job before actually creating the record
...
bzr revid: xmo@openerp.com-20121004064215-fqgir3ovmte2v438
2012-10-04 08:42:15 +02:00
Xavier Morel
1e4a677f05
[MERGE] from trunk
...
bzr revid: xmo@openerp.com-20121010154436-wz29sdkbs9vvhjba
2012-10-10 17:44:36 +02:00
Christophe Simonis
b7e5519b4c
[FIX] orm: handle fields.char() with not size correctly
...
bzr revid: chs@openerp.com-20121001153753-um68vpz1caojm17r
2012-10-01 17:37:53 +02:00
Christophe Simonis
5763e40506
[IMP] orm: remove trailing spaces
...
bzr revid: chs@openerp.com-20121001151421-vdfkzuf864rz8q20
2012-10-01 17:14:21 +02:00
Christophe Simonis
273904d103
[IMP] orm: be more vebose when accessing an invalid field of browse_record objects
...
bzr revid: chs@openerp.com-20121001150305-recozdvfc68wc766
2012-10-01 17:03:05 +02:00
Xavier Morel
84332d8aad
[FIX] type error when providing a non-integer for a default database id
...
bzr revid: xmo@openerp.com-20121001130530-yf6pzuxdi3s09tji
2012-10-01 15:05:30 +02:00
Raphael Collet
a6e30d305c
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20120928124403-aht90hi49yxwrcmz
bzr revid: rco@openerp.com-20121001073112-xbxdturd27bwscg1
2012-10-01 09:31:12 +02:00
Raphael Collet
0d878dc99e
[FIX] orm: fix the method copy() when an 'inherits' field is given in parameter default
...
bzr revid: rco@openerp.com-20120928120202-6fbayrwb1iszwfwv
2012-09-28 14:02:02 +02:00
Xavier Morel
879886decd
[ADD] some import doc
...
bzr revid: xmo@openerp.com-20120928091519-ksdprqdq0tpklggw
2012-09-28 11:15:19 +02:00
Xavier Morel
aaff4459c4
[DOC] fixes and cleanups
...
bzr revid: xmo@openerp.com-20120928065654-jj3ot17dz8vd3wum
2012-09-28 08:56:54 +02:00
Xavier Morel
def7e61901
[IMP] reimplement BaseModel.import_data on top of BaseModel.load
...
adapt tests to assert the corrected behavior of load instead of import_data's broken behavior
bzr revid: xmo@openerp.com-20120927154244-e56ygz2yytullg2l
2012-09-27 17:42:44 +02:00
Xavier Morel
87af7a6365
[FIX] replace warnings capture by explicitly returning a list of warnings from converters
...
makes converter code noisier, but ultimately simpler without having access to dynamically scoped variables
bzr revid: xmo@openerp.com-20120927144341-j1dx3e0epf3i5ja6
2012-09-27 16:43:41 +02:00
Xavier Morel
9d175bdfd6
[FIX] postgres 9.2 added data at the end of 23502's error message, only use prefix matches not fullstring
...
bzr revid: xmo@openerp.com-20120927095038-m2vm663nqj1s1pne
2012-09-27 11:50:38 +02:00
Olivier Dony
bd31b7c553
[API/IMP] fields: cleanup field_to_dict + make @deprecated available in fields_get()
...
Renamed the m2m extra info keys, as their names
were quite confusing (third_table?), + removed
the "func_obj" key for function fields, as
it was a duplicate of the "relation" kay that
is already present for all relationship fields.
These renames should not break anything, as this
info should only be used for debug, but they still
constitute an API backwards-incompatible change.
bzr revid: odo@openerp.com-20120926130942-doauqgh6v35vhi29
2012-09-26 15:09:42 +02:00
Xavier Morel
e61dc50934
[IMP] convert empty import fields to False values without going through converters
...
simplifies the converter methods by avoiding redundant emptiness checks
bzr revid: xmo@openerp.com-20120925155915-82p2s6stpww37p5n
2012-09-25 17:59:15 +02:00
Xavier Morel
d5c69fa87e
[FIX] use lists instead of iterators in BaseModel._extract_records
...
* although it does use an explicit external index, it turns out the
code is less complex
* the rewrapping of (many) iterators on top of one another ended up
blowing Python's stack during ``next`` calls, which Python does
*not* like
* added a 900-ish import test file to check for these things
bzr revid: xmo@openerp.com-20120925135955-oielhopegnefyctm
2012-09-25 15:59:55 +02:00
Xavier Morel
359b4a44aa
[ADD] ability to convert postgres error messages to human-readable ones
...
also convert 'violates not-null constraint' to something about fields being required
bzr revid: xmo@openerp.com-20120925100232-bfmxcxda65cki5kv
2012-09-25 12:02:32 +02:00
Xavier Morel
9f2e7ba7ef
[IMP] return a dict from Model.load for easier future extensibility (if needed) rather than a tuple.
...
also easier/cleaner to unpack on the JS side
bzr revid: xmo@openerp.com-20120924151502-4robe639ctpuvb94
2012-09-24 17:15:02 +02:00
Xavier Morel
f143902d1a
[IMP] allow converters to add data to import messages, formalize message keys
...
bzr revid: xmo@openerp.com-20120924150417-c2y7g7vdsfz66363
2012-09-24 17:04:17 +02:00
Xavier ALT
c24639180a
[FIX] OPW 575909: orm: fix order_by for special 'id' field not respecting order direction
...
bzr revid: xal@openerp.com-20120924140007-rnsw4nw8owzqx4ia
2012-09-24 16:00:07 +02:00
Xavier Morel
877e21ffde
[IMP] return fields_get-style translated field strings (if available) in user-readable warning and error messages from import, rather than logical field names
...
bzr revid: xmo@openerp.com-20120924105230-1b7157xbruy2e5zr
2012-09-24 12:52:30 +02:00