Commit Graph

228 Commits

Author SHA1 Message Date
Xavier Morel e06f5b414b [IMP] inherit_option_id -> application 2014-05-27 12:13:51 +02:00
Xavier Morel e2f41d09ba [IMP] prevent changing a view from application: always to application: disabled
not sure that's actually useful, and can still go always -> enabled -> disabled...
2014-05-27 11:57:07 +02:00
Xavier Morel d82ffb8728 [ADD] application field & check during inheriting views read 2014-05-27 11:57:07 +02:00
Xavier Morel da345aaa2d [ADD] use of explicit primary mode in read_combined 2014-05-27 11:57:02 +02:00
Xavier Morel 4e3dbb96b3 [FIX] default_view should be based on mode=primary, not on inherit_id=False 2014-05-27 11:57:01 +02:00
Xavier Morel 434be479f9 [ADD] mode attribute to views
Not used yet, only defined its relation to inherit_id:

not inherit_id + primary -> ok
not inherit_id + extension -> error
inherit_id + primary -> ok
inherit_id + extension -> ok
2014-05-27 11:57:01 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Christophe Simonis bb26dea60b [MERGE] forward port of branch saas-3 up to revid 38abc8a 2014-05-20 19:00:50 +02:00
Xavier Morel 9cefa76988 [ADD] hasclass() xpath function
Server-side, view extension is done via xpath. This includes "template" views
full of HTML.

HTML elements often have a bunch of classes, sometimes even semantic
(!). XPath is generally great, but specifically lousy at dealing with
space-separated values: in standard XPath 1.0 to know if an element has a
class 'foo' the predicate is:

    contains(concat(' ', normalize-space(@class), ' '), ' foo ')

and this has to be fully duplicated if there's a second class involved.

Things are slightly better with EXSLT/XPath 2.0 and tokenize, but still not
great:

    tokenize(@class, '\s+') = 'foo'

and the equality check is very weird when unaware of XPath's evaluation rules.

``hasclass`` makes this much simpler to deal with: to get any ``foo`` node
with the class ``bar`` is as simple as:

    //foo[hasclass('bar')

and it can take multiple class, as with e.g. jquery it will return elements
with all specified classes.

Beware though, the predicate function will be called once for each element to
check, since it's implemented in pure python and not profiled elements should
be filtered as much as possible before this point.
2014-05-19 08:32:23 +02:00
Xavier Morel 66d8934802 [FIX] correctly handle get_inheriting_views_arch when uid=None 2014-05-19 08:32:10 +02:00
Martin Trigaux fc7a31f842 [FIX] ir_ui_view: remove undetermist order on search for views as the _order on the model is more specific (opw 607262)
This was problematic on some views where two views with the same priority could be chosen depending on the server, postgresql version and the age of the captain
2014-05-12 14:56:30 +02:00
Martin Trigaux 4f5cc00420 Forward-port of latest saas-4, up to revision 5211 (revid fme@openerp.com-20140509164408-rtml4brrhpiv4zz9) 2014-05-12 10:05:23 +02:00
Fabien Pinckaers bcbd263214 [IMP] Adding fields
bzr revid: fp@tinyerp.com-20140511074755-5b3iy2b1xk7cjxmf
2014-05-11 09:47:55 +02:00
Fabien Meghazi f506fc45a3 [MOV] ir.ui.view#write() forced noupdate moved in `website` (RTE only)
bzr revid: fme@openerp.com-20140509141106-vbokuh0prptxavvg
2014-05-09 16:11:06 +02:00
Jitendra Prajapati 9b15769a71 [MERGE] [IMP] Misc view improvements using better name_get / name_search.
bzr revid: tde@openerp.com-20140509094920-94z2i7hfao3xxu4n
2014-05-09 11:49:20 +02:00
Jitendra Prajapati (OpenERP) 49a7338b00 [IMP]improve code: call super method instead of manual search
bzr revid: jpr@tinyerp.com-20140508052730-5oztw3um6h42osvd
2014-05-08 10:57:30 +05:30
Fabien Meghazi cea5591742 [FIX] runbot color
bzr revid: fme@openerp.com-20140507074310-bt0r1vt6rsgy9wqe
2014-05-07 09:43:10 +02:00
Fabien Meghazi 15380fd5d2 [ADD] modules global rendering variable
This is temporary

bzr revid: fme@openerp.com-20140506163204-u63n3wv1yv6yohd3
2014-05-06 18:32:04 +02:00
Jitendra Prajapati (OpenERP) e418d2b2f6 [IMP]override name_search method
bzr revid: jpr@tinyerp.com-20140506102333-c8nrun01dxgjel22
2014-05-06 15:53:33 +05:30
Jitendra Prajapati (OpenERP) d5e9847b0d [IMP]remove unnecessary check on ids
bzr revid: jpr@tinyerp.com-20140506083630-i1o5flr7p8apgrym
2014-05-06 14:06:30 +05:30
Jitendra Prajapati (OpenERP) 1bb22f2ddd [MERGE]with main branch
bzr revid: jpr@tinyerp.com-20140505095333-v514kj2dz0advdf8
2014-05-05 15:23:33 +05:30
Antony Lesuisse 7e25b9ae55 [MERGE] saas-4 report_webkit missing dependency on report
bzr revid: al@openerp.com-20140501152604-4cobh5ui47dt4pem
bzr revid: al@openerp.com-20140501155633-gefnc3zqcsr2rhaz
bzr revid: al@openerp.com-20140501161156-4wbsvhh8gz4r22h3
2014-05-01 18:11:56 +02:00
Christophe Simonis c16780df83 [MERGE] forward port of branch saas-3 up to revid 5120 chs@openerp.com-20140424125338-26k5atvtqwmmfv4e
bzr revid: chs@openerp.com-20140424131405-4oannh1102x42m8b
2014-04-24 15:14:05 +02:00
Stephane Wirtel 2ce61258ad [FIX] Importing dateutil.relativedelta.relativedelta
bzr revid: stw@openerp.com-20140424092828-j8l6j1re9sa94m85
2014-04-24 11:28:28 +02:00
Jitendra Prajapati (OpenERP) 39312207d7 [MERGE]with main branch
bzr revid: jpr@tinyerp.com-20140415053250-r784vpfu9x8gnfll
bzr revid: jpr@tinyerp.com-20140424045737-h6pshjslqw8xqyvm
2014-04-24 10:27:37 +05:30
Antony Lesuisse 56d2df71d3 [FIX] ir.ui.view missing time libraries in qweb rendering context
bzr revid: al@openerp.com-20140423162827-zw1fjysgkshgamwa
2014-04-23 18:28:27 +02:00
Christophe Simonis 981f683f0f [FIX] ir.ui.view: when post-validating views of a module, only validate updated views (left out old views that will be deleted at the end of the update)
bzr revid: chs@openerp.com-20140423145639-whfipjobbxgfzqvx
2014-04-23 16:56:39 +02:00
Fabien Meghazi 8370d3f60e [MERGE] upstream
bzr revid: fme@openerp.com-20140423123808-q58dtl8a0bb2ymlf
2014-04-23 14:38:08 +02:00
Christophe Simonis 618fbde36f [MERGE] forward port of branch saas-4 up to revid 9365 chs@openerp.com-20140422143249-3cfh18tenn3a5ry1
bzr revid: chs@openerp.com-20140422144651-840zze7p5549k88s
bzr revid: chs@openerp.com-20140422144933-0su8g7pgrcloijco
2014-04-22 16:49:33 +02:00
Christophe Simonis c3cf8000e6 [FIX] module loading: mark module as initialized *after* the data files have been loaded
When the registry is updating, the view verification only validates the views 
from initialized modules. Not taking the current module allow update of views
that have also an inherited view in the same module. The verification of the base view
must not try to apply the old inherited view against it as it may not be applicable
anymore. 

After module update, we re-validate all the views of this module. This is needed because
a module can declare two (or more) inherited views that are correct when applyed alone,
but not when combined with others.

bzr revid: chs@openerp.com-20140418141550-7b57b1xl4fx0rgqq
2014-04-18 16:15:50 +02:00
Darshan Kalola 7cd07d0c1f [MERGE] [IMP] ir_ui_view: kanban view: also add action_enabled information
about the columns in kanban view. This allows to display the 'create a new column', as well as 'edit' or 'delete'
options on column in kanban view, based on the users' access rights.

bzr revid: tde@openerp.com-20140417114033-39rez93cmcwask69
2014-04-17 13:40:33 +02:00
Darshan Kalola (OpenERP) 2f9c0ad1af [MERGE]sync with trunk.
bzr revid: dka@tinyerp.com-20140415091644-v0kfy7qiybm2uccl
2014-04-15 14:46:44 +05:30
Fabien Meghazi c1dc467701 [WIP] AssetsBundle
bzr revid: fme@openerp.com-20140409161758-3hye6u21rjmoiio9
2014-04-09 18:17:58 +02:00
chm@openerp.com 64462173c1 [IMP] ir_qweb, ir_ui_view: can use id insead of xml_id; can render ir.ui.view many2one with widget='qweb' in template
bzr revid: chm@openerp.com-20140409124626-ccxnfef7bb7h1gm6
2014-04-09 14:46:26 +02:00
Jitendra Prajapati (OpenERP) 911552c2e7 [IMP]optimized code for name_get method
bzr revid: jpr@tinyerp.com-20140403111445-lej57pocr2d0qokm
2014-04-03 16:44:45 +05:30
Darshan Kalola (OpenERP) f1eb31b758 [MERGE]sync with trunk.
bzr revid: dka@tinyerp.com-20140331092919-1o6xipu5ld4g5n2k
2014-03-31 14:59:19 +05:30
Christophe Simonis 30490699bd [FIX] ir.ui.view: correct `model_data_id` function field to return a value for every id passed as argument. Also correct recomputation triggers
bzr revid: chs@openerp.com-20140319144138-vmihcs029g21nf7t
2014-03-19 15:41:38 +01:00
Darshan Kalola (OpenERP) 16f358d9e2 [IMP]]hide the link add a new column,edit and delete in kanban if the user has not the right to do it.
bzr revid: dka@tinyerp.com-20140304122148-732fgfqmbpi8cpol
2014-03-04 17:51:48 +05:30
Fabien Meghazi 6df317c546 [FIX] website's translation problems on multiple inheritance
bzr revid: fme@openerp.com-20140224103235-2s9de5k71xfa2qko
2014-02-24 11:32:35 +01:00
Xavier Morel a67cd4c049 [FIX] t-ignore should remove injected sub-view branding below the ignore flag
bzr revid: xmo@openerp.com-20140225114706-j8q44cubs59tuwby
2014-02-25 12:47:06 +01:00
Xavier Morel 1b2be9be76 [IMP] unbrand t-raw and t-esc as keeping them branded makes very little sense
they can't be edited in any situation

bzr revid: xmo@openerp.com-20140225110046-90rdevm13pp4m51s
2014-02-25 12:00:46 +01:00
Xavier Morel 198640434f [FIX] injected views need branding distribution too
forgot to set it up after installed injected view skipping during distribution of injectee

bzr revid: xmo@openerp.com-20140224170301-b4ta04zqsd5d2956
2014-02-24 18:03:01 +01:00
Fabien Meghazi d1bbeb21a1 [FIX] website's translation problems on multiple view inheritance
bzr revid: fme@openerp.com-20140224104301-n8dqg0lx4oijf66b
2014-02-24 11:43:01 +01:00
Xavier Morel 325ad57a00 [FIX] branding distribution to generate correct xpath even after injection of inherited view contents
bzr revid: xmo@openerp.com-20140213164546-xor2k3tat8d216wq
2014-02-13 17:45:46 +01:00
Raphael Collet 9f7c687dec [FIX] ir_ui_view: in context dict, put model name instead of model itself
bzr revid: rco@openerp.com-20140211162736-hgkwjk336ldkjej6
2014-02-11 17:27:36 +01:00
Fabien Meghazi 297781df08 [IMP] Move some qweb rendering context vars from website#ir.qweb to server#ir.ui.view
bzr revid: fme@openerp.com-20140206161204-vp6kydvdxhg5qykx
2014-02-06 17:12:04 +01:00
Christophe Simonis 73d675a73d [FIX] ir.ui.view: avoid infinite loop when applying multiple inheritance inside a single view (use of <data> tag)
bzr revid: chs@openerp.com-20140206130349-19v4ah0lwy87t50o
2014-02-06 14:03:49 +01:00
Fabien Meghazi 4b70011c12 [FIX] ir_ui_view#read_template() bring back old behavious, raises ValueError if xmlid not found
bzr revid: fme@openerp.com-20140130210154-llo2tjl323k0yxyr
2014-01-30 22:01:54 +01:00
Olivier Dony 5908a45e47 [FIX] ir.ui.view: better error message upon missing model for non-qweb views, misc cleanup
bzr revid: odo@openerp.com-20140130154349-rnwjz0bgxp6vdxwu
2014-01-30 16:43:49 +01:00
Olivier Dony 5bb31b70d8 [FIX] ir.ui.view: one2many to ir.model.data needs domain otherwise it matches entries from other models
bzr revid: odo@openerp.com-20140130120109-0z6kpzv5t155haog
2014-01-30 13:01:09 +01:00