Commit Graph

57 Commits

Author SHA1 Message Date
Cecile Tonglet ad8b76de53 [MERGE] From trunk (second time)
bzr revid: cto@openerp.com-20121217144753-1rboqdw01h8yrehj
2012-12-17 15:47:53 +01:00
Cecile Tonglet 5179507e22 [MERGE] Branch updated with trunk
bzr revid: cto@openerp.com-20121217125902-idtlh4ztyah17bdn
2012-12-17 13:59:02 +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
Xavier Morel 5d3d3868f6 [IMP] use augmented assignments
bzr revid: xmo@openerp.com-20121214131924-bpl48ht21ic4g34b
2012-12-14 14:19:24 +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
Olivier Dony 1565e8c708 [IMP] ir.ui.menu: deleting a menu should orphan its children w/o corrupting the `parent_store` struct: test + fix
ir.ui.menu was recently changed to use _parent_store,
which precludes using ondelete=set null for the parent_id
column. We nevertheless need to be certain that menus
can always be deleted but *never* cascade-deleted,
due the possible presence of user-created menus.
Overriding menu.unlink() is therefore necessary,
and care must be taken to bypass the default menu
visibility (using the `ir.ui.menu.full_list` context
flag while doing so)

bzr revid: odo@openerp.com-20121213145821-u2ipdvffu00rsgdg
2012-12-13 15:58:21 +01:00
Olivier Dony 90c0eea54a [IMP] ir.ui.menu: enable `parent_store` to allow using the `child_of` operator efficiently when loading the menu hierarchy
The menu loading logic in openerp-web was adapted to use
`child_of`.

bzr revid: odo@openerp.com-20121212210451-40ew3lp5wgps64gy
2012-12-12 22:04:51 +01:00
Olivier Dony e493303e18 [REVERT] Undo r.4617, introduced a bug in menu hierarchy retrieval
Browsing the menu data as super-user is not correct
because when we load the children menu the ORM
recursively calls menu.search(), this time as
admin, hence the groups of the admin are applied
or submenus, instead of the groups of the user.
The patch was also un-necessary, so there is no
reason to keep it.

r.4617 = chs@openerp.com-20121129172145-0ionmbffc72hwxoa

bzr revid: odo@openerp.com-20121212210027-i5yn1uyzmfho0jh0
2012-12-12 22:00:27 +01:00
Vo Minh Thu 509a084e79 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121210152723-mv4dykfu6ip1991h
2012-12-10 16:27:23 +01:00
Thibault Delavallée 3446b35874 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20121210125418-l8ntl5o5mnb2dq3h
2012-12-10 13:54:18 +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
Thibault Delavallée 003752f7f1 [REF] ir_ui_menu: needaction_enabled is now stored, because there are no reasons not to be (this is something mainly statically defined). needaction_counter is removed, but a method on the menu allows to have the information back, calling get_needaction_data. A web-side branch will call asynchronously this method with some menu ids, allowing to separate the menu loading from the needaction loading.
bzr revid: tde@openerp.com-20121205102052-pn1uwhrl9mn46c4x
2012-12-05 11:20:52 +01:00
Christophe Simonis cb968eeba0 [FIX] ir.ui.menu: filter menus as SUPERUSER
bzr revid: chs@openerp.com-20121129172145-0ionmbffc72hwxoa
2012-11-29 18:21:45 +01:00
Antonin Bourguignon c0cbbc3b03 [IMP] define a name_get() that includes the complete hierarchy of menus
also improve code style (var names)

bzr revid: abo@openerp.com-20121029104636-6psw5ucyjy3zoyro
2012-10-29 11:46:36 +01:00
Antony Lesuisse 8fa8551f01 [FIX] cleanup ir.xml mess, ir.ui.view name is now optional in xml files
bzr revid: al@openerp.com-20121013120924-xix9cbozm8kda7rj
2012-10-13 14:09:24 +02:00
Raphael Collet 5a971eca90 [FIX] ir: small fix to handle missing models when upgrading
bzr revid: rco@openerp.com-20121005102003-16vbr0aive2mbtid
2012-10-05 12:20:03 +02:00
Olivier Dony e35992cc53 [MERGE] Sync with trunk
bzr revid: odo@openerp.com-20121001144941-16d8mbi5475c3tyb
2012-10-01 16:49:41 +02:00
Thibault Delavallée 12294252d4 [MERGE] Merged with server/trunk.
bzr revid: tde@openerp.com-20120903081949-ucy4e1kpbb30dhko
2012-09-03 10:19:49 +02:00
Stephane Wirtel b3988436cb [REF] Replace the user id 1 by openerp.SUPERUSER_ID
bzr revid: stw@openerp.com-20120831135309-o4plzf5wp0kyuzgf
2012-08-31 15:53:09 +02:00
Thibault Delavallée 2a916edbad [REVIEW] ir_ui_menu: cleaned _get_needaction code.
bzr revid: tde@openerp.com-20120828075321-7emtlqvh5oj6o31r
2012-08-28 09:53:21 +02:00
Fabien Pinckaers 84625969c0 [FIX] needaction on mail.groups
bzr revid: fp@tinyerp.com-20120823143525-28mnbgd015jd8yyd
2012-08-23 16:35:25 +02:00
Fabien Pinckaers 552705494c [IMP] needaction
bzr revid: fp@tinyerp.com-20120822161407-aucl1m2jsa3pe6sv
2012-08-22 18:14:07 +02:00
Fabien Pinckaers 0f63b4a1fb [IMP] need action
bzr revid: fp@tinyerp.com-20120822133406-9ayg228mxfeg16dg
2012-08-22 15:34:06 +02:00
Fabien Pinckaers 03f4b992ad [IMP] need action & mails
bzr revid: fp@openerp.com-20120819145928-5bw5lo6dn4ni4gl7
2012-08-19 16:59:28 +02:00
Xavier Morel 48166edeb8 [FIX] rename ir.actions.url to match action's type
bzr revid: xmo@openerp.com-20120608101710-ncwcmu9u72u7mxcy
2012-06-08 12:17:10 +02:00
Fabien Pinckaers 51d8cfae05 [IMP] new form guidelines
bzr revid: fp@tinyerp.com-20120604213212-bxajvchyzwqvisix
2012-06-04 23:32:12 +02:00
Fabien Pinckaers f83ba4af41 [IMP] reviewed form views following new guidelines
bzr revid: fp@tinyerp.com-20120604183055-3adtk8dtech30amm
2012-06-04 20:30:55 +02:00
Thibault Delavallée 110fbacb2a [REM] Removed comment and now unnecessary code.
bzr revid: tde@openerp.com-20120418115050-jwtyqg9iahakyu13
2012-04-18 13:50:50 +02:00
Thibault Delavallée 3da67c851f [REM] Removed unused field in menus. BTW it solves a GTk client crash.
bzr revid: tde@openerp.com-20120418113706-raesdy1tak5dwkwo
2012-04-18 13:37:06 +02:00
Thibault Delavallée 8d858cf0b0 [TMP] Uncommit temp fix.
bzr revid: tde@openerp.com-20120418111212-j035lajdu2g045kf
2012-04-18 13:12:12 +02:00
Thibault Delavallée c1a4f1f8db [IMP] Updated code (see odo/vmt review). Also removed record_ids storage in menus, to avoid passing too much data to the client.
bzr revid: tde@openerp.com-20120418090735-e5ewk3wcf7bp0bvu
2012-04-18 11:07:35 +02:00
Thibault Delavallée 77a569df69 [DOC] Added some comments.
bzr revid: tde@openerp.com-20120406081726-uusbqse1ty7o2yet
2012-04-06 10:17:26 +02:00
Thibault Delavallée 920c7b4af4 [FIX] Fixed weird bug with search and count=True.
bzr revid: tde@openerp.com-20120405130401-1nebka17459h71cj
2012-04-05 15:04:01 +02:00
Thibault Delavallée 2740f7e474 [FIX] Fixed error in needaction mechanism when calculatin menu functional fields.
bzr revid: tde@openerp.com-20120405123503-4ic48pi7tz943lrq
2012-04-05 14:35:03 +02:00
Thibault Delavallée aa0205c849 [REF] Cleaned model and code: removed classmethods, moved some code to needaction_users, cleaned models.
bzr revid: tde@openerp.com-20120403145426-gjhdwhxb44bme8mi
2012-04-03 16:54:26 +02:00
Thibault Delavallée 87fd9521dd [DOC] Improved help tootips and documentation.
bzr revid: tde@openerp.com-20120402085042-e65y8nsqey1vlvxv
2012-04-02 10:50:42 +02:00
Thibault Delavallée e734648206 [ADD] Added 'needaction_record_ids' field to menu: ids of record requesting the user to perform an action.
bzr revid: tde@openerp.com-20120402083517-1kzxxylr6niczhgw
2012-04-02 10:35:17 +02:00
Thibault Delavallée 8c2b07bf76 [REF] Cleaned ir.needaction code and documentation.
bzr revid: tde@openerp.com-20120402081826-016k0ecbjz3fqnps
2012-04-02 10:18:26 +02:00
Thibault Delavallée 519ebfdd49 [FIX] removed a '+' that probably came from outerspace
bzr revid: tde@openerp.com-20120330130232-u61vt96fl23ss69z
2012-03-30 15:02:32 +02:00
Thibault Delavallée 508d257bcf [IMP] Renamed ir.ui.menu fields, uses_needaction -> needaction_enabled; needaction_uid_ctr -> needaction_counter
bzr revid: tde@openerp.com-20120330125900-0jtpztxk336ugae0
2012-03-30 14:59:00 +02:00
Thibault Delavallée 3ee9f70343 [IMP] Renamed added fields. Added comments and improved help.
bzr revid: tde@openerp.com-20120330101929-18opxctcz1eeyl4u
2012-03-30 12:19:29 +02:00
Thibault Delavallée 2f97bcdf7d [FIX] Removed the store=True (too much access to DB), as this is not necessary. Fixed dict of dict: inner dict instantiation is done for each iteration, because argument management in python made all dicts pointers to the same dict
bzr revid: tde@openerp.com-20120330100337-miqra4q5sjokt7en
2012-03-30 12:03:37 +02:00
Turkesh Patel (Open ERP) 03cd5c47b2 [IMP] store functional fields in database
bzr revid: tpa@tinyerp.com-20120330051038-y7b1vdamhdp4pj3n
2012-03-30 10:40:38 +05:30
Thibault Delavallée 8196c9e1b1 [REF] Refactored needaction mechanism. Added functional fields in ir.ui.menu so the web client only has to manage the values.
bzr revid: tde@openerp.com-20120328163549-4g3dc5mwdagenrq1
2012-03-28 18:35:49 +02:00
Raphael Collet 2c2432ad33 [FIX] ir_ui_menu: do not create a menu binding when field 'action' is False
bzr revid: rco@openerp.com-20120210082637-tn4cyvgfa4jrxpj4
2012-02-10 09:26:37 +01:00
Xavier Morel 3049760fe6 [FIX] race condition in ir.ui.menu leading to incomplete menus in web client
See bug, issue occurs with variable frequency when changing between
simple and extended views in a user account (non-administrator at
least): saving the user account leads to a clearing of the menu cache,
this is followed by two search/read in parallel (one to get the full
menu listing and one to get the list of applications for the home
page), which leads to ir_ui_menu.search (thus
ir_ui_menu._filter_visible_menus) being called concurrently, and this
apparently somehow wrecks havoc on some browse_record's caches
yielding to incoherent behaviors (menus which do have children in db
not having children in the browse_record, and thus being pruned from
the list of menus).

Putting a big lock around 1. clear_cache (just in case) and
2. _filter_visible_menu (to make cache-filling essentially atomic)
seems to solve the issue or at least make it disappear, ideally more
time should be spent understanding what breaks in browse_record.

A reentrant lock is needed as _filter_visible_menu may recurse when
accessing e.g. a menu's child_id (which yield a
search([parent_id=menu.id]) and thus a _filter_visible_menu)

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

bzr revid: xmo@openerp.com-20120125115823-rpu03zdv14t11lp3
2012-01-25 12:58:23 +01:00
Olivier Dony bdce754108 [IMP] cleanup deprecated method=True param for function fields
bzr revid: odo@openerp.com-20120104133027-oaydmngk2dfc22mk
2012-01-04 14:30:27 +01:00
Naresh (OpenERP) 2d67a75338 [FIX]: WARNING:orm:No such field(s) in model ir.values: object: This was probably missed out to be removed with the improvements made at 3560.1.8 odo@openerp.com-20110905141058-xa01o77l1rto6hg9
bzr revid: nch@tinyerp.com-20111124085813-28fbguyklybdq213
2011-11-24 14:28:13 +05:30
Olivier Dony 52f6e15e5c [FIX] ir.ui.menu: typo during merge of simplified cache
bzr revid: odo@openerp.com-20110901143038-dpuehbd8p1e0o3qz
2011-09-01 16:30:38 +02:00