Commit Graph

250 Commits

Author SHA1 Message Date
Antony Lesuisse 2d296cb779 [MERGE] ir-ui-view split active and show_customize
Split the ternary field application in active and show_customize, all four
possible value are now needed for the customize theme popup.
2014-08-31 16:56:44 +02:00
Christophe Simonis 5dff035878 [MERGE] forward port of branch saas-5 up to 39bee35 2014-08-20 20:33:17 +02:00
Fabien Meghazi c0132100ce [FIX] website translation bug
Sometimes a node can't be translated using the website Translate
mode. The translation is added to the Application term list but
the id of the view is not correct.

This happen when a translatable node is a children of a inherited
node whose branding could not be kept. data-oe-source-id was left
over because it was not registered in MOVABLE_BRANDING
2014-08-20 17:16:29 +02:00
Olivier Dony 868a77616d [FIX] ir.translation: export/import of QWeb terms
Fixes the translation term import/export logic to
support terms inside QWeb templates.

Refactored a bit the export code so the babel-based
QWeb terms extractor for ./static/src/*.xml files
uses the same logic as the regular extractor for
ir.ui.views with type QWeb.

Server-side QWeb rendering uses a mix of the native
 view inheritance mechanism and the template inclusion
(t-call) mechanism. During rendering the translations
are only applied at "template" level, *after* the
view inheritance has already been resolved.
As a result translations are local to a template,
not to the inherited view in which they are actually
written.
In terms of exporting PO[T] files, this is done by
resolving the "root" QWeb template a view belongs
to, and using it as the location of the translated term.

During import there is one extra quirk for QWeb
terms: they need to be linked to the `website` model
rather than the actual `ir.ui.view` model they
are really pointing to, so the rendering phase can
properly recognize them.
2014-08-13 11:08:02 +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
Fabien Meghazi 4042135bc4 Merge remote-tracking branch 'odoo/master' into master-sass-in-bundles-fme 2014-07-01 14:26:40 +02:00
Fabien Meghazi a49ebae676 [IMP] Lazy module_boot() loading
Removed 'modules' item in ir.ui.view rendering context.
Replaced by lazy helper get_modules_order
2014-07-01 14:22:56 +02:00
Fabien Meghazi 9fa77980d7 Merge remote-tracking branch 'odoo/master' into master-sass-in-bundles-fme 2014-06-27 19:40:02 +02:00
Fabien Meghazi 0d1d225249 Remove ir.ui.view last_update collection and use checksum on rendered bundle 2014-06-26 18:18:12 +02:00
Christophe Simonis 1eaa69d342 [MERGE] forward port of branch saas-5 up to 9e8e365 2014-06-25 12:44:13 +02:00
Christophe Simonis 9e8e3653f2 [MERGE] forward port of branch saas-4 up to f68c835 2014-06-25 12:43:41 +02:00
Christophe Simonis f68c83545a [MERGE] forward port of branch saas-3 up to a66f3dd 2014-06-25 12:33:17 +02:00
Fabien Meghazi aa97aaa9d7 [ADD] Assets Bundle versioning and better cache handling
An asset bundle is now versionned with the dates of the
ir.ui.views that compose it and also with the dates of
the files and ir.attachments linked inside the bundle.

This new behavior is reflected in the bundle's lru cache
managment.
2014-06-24 18:52:38 +02:00
Denis Ledoux 8e83dbff5d [MERGE] Forward-port of 7.0 bugfixes up to 7d3453d119 2014-06-24 12:27:09 +02:00
Fabien Meghazi daf8bdf688 [ADD] support for multiple value query args in keep_query() 2014-06-17 11:35:29 +02:00
Fabien Meghazi ba3ce4753b Set form views default @version="7.0" 2014-06-11 14:03:20 +02:00
Xavier Morel b973e27da5 [IMP] views: don't prevent always -> disabled writes in views, is confusing and not very useful 2014-06-05 12:22:37 +02:00
Christophe Simonis e16233217c [MERGE] Replace inherit_option_id by a selection field (PR #229) 2014-05-27 17:57:33 +02:00
Xavier Morel abc50d1041 [IMP] application field doc 2014-05-27 12:26:38 +02:00
Xavier Morel ab7dd57771 [IMP] make mode handling more regular
Before this commit, @mode=primary would be sorta-ignored[0] if the current
view and its parent had the same model: the current view would *still* get
applied (as an extension) when asking OpenERP for its parent. This commit
makes mode=primary views behave regularly, they are *never* applied when
asking for their parent, only when asking for them or their children.

This allows "forking" views, and using extended views in some contexts without
breaking or duplicating the original view

[0] there was actually a problem when asking for the current view directly,
    first its parent would be resolved by applying it, then it would be
    applied to resolve itself, the view would thus get applied twice (oops)
2014-05-27 12:23:02 +02:00
Xavier Morel 0f5424eac4 [IMP] replace check_mode python-level constraint by an SQL CHECK constraint 2014-05-27 12:21:52 +02:00
Xavier Morel 9555b32c7b [IMP] add some more explanations for the behavior of the mode attribute on views 2014-05-27 12:20:04 +02:00
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