Fabien Meghazi
d7a7ac404d
Support for Sass in debug mode
2014-06-26 18:51:55 +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
Fabien Meghazi
36e5b418d8
Sass: pull up @imports and remove file imports
2014-06-26 17:40:30 +02:00
Fabien Meghazi
653113094f
[ADD] Sass support in bundles
2014-06-26 16:49:51 +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
Fabien Meghazi
146d7b2886
[IMP] refactor assets bundle for future features
2014-06-19 18:09:01 +02:00
Christophe Simonis
5206eb16d5
merge upstream
2014-06-19 13:13:27 +02:00
Christophe Matthieu
a6185caa18
[FIX] website_sale: display in currency of the user
2014-06-19 13:12:06 +02:00
xmo-odoo
3160eb74c4
Merge pull request #584 from xmo-odoo/master-qweb-groups-xmo
...
`@groups` attribute in qweb views
2014-06-18 09:37:02 +02:00
xmo-odoo
c949509b5e
Merge pull request #463 from xmo-odoo/qweb-foreach
...
Qweb foreach
2014-06-17 15:56:09 +02:00
Xavier Morel
dda18249c0
[FIX] @groups attribute should not disappear when editing
...
The @groups attribute in qweb views was not rendered (even when matched by the
user), so editing a template with an @groups would either remove the whole
section (if the user didn't have the groups, fixed in previous commit) or only
removed the attribute itself making it visible to everybody (which ought be
fixed-ish by this commit).
2014-06-17 12:22:15 +02:00
Xavier Morel
79e10200d5
[IMP] prevent edition of page if groups which current user doesn't have
...
If the current view uses @groups attributes (possibly in called templates),
the corresponding elements are rendered to a void (empty string in qweb). If
said user can edit the page, does so and saves a view section in which there's
a @groups to which he has no access, the element[@groups] is completely
removed from the template once saved, losing it.
If QWeb encounters an @groups to which the current user has no right during
rendering, have it request a no-RTE page, so the user can not RTE-edit the
page (or drop snippets in it).
2014-06-17 12:01:52 +02:00
Olivier Dony
f15cbd6520
[MERGE] Forward-port saas-4 bugfixes up to ad4c6ca
2014-06-12 18:54:36 +02:00
Olivier Dony
6b85d80f23
[FIX] Wrap werkzeug.utils.escape() to accomodate signature change in 0.9
...
We always want to escape quotes (") as part of the process of
generating HTML output. This option (quote=True) turned into
an implicit flag with a DeprecationWarning in werkzeug 0.9.0
It is likely to disappear in a future release of werkzeug too.
A wrapper avoids this warning without loss of compatibility
2014-06-10 18:46:40 +02:00
Xavier Morel
0de6710c3c
[IMP] guard for None enum, remove 1 level of indent
2014-06-05 12:05:24 +02:00
Xavier Morel
7f0db3c257
[IMP] use Sized for iterable size and remove support for count
2014-06-05 12:03:16 +02:00
Xavier Morel
03b75477ec
[IMP] use enumerate instead of explicit index thing
2014-06-05 12:01:44 +02:00
Xavier Morel
0b3abaf4ce
[FIX] _even/_odd were reversed, also some reformatting thing
2014-06-05 12:01:04 +02:00
Xavier Morel
34097b4f88
[IMP] mandate a variable name in foreach
2014-06-05 11:46:56 +02:00
Olivier Dony
d1b0d2586b
[FIX] ir.qweb: rendering non-string attributes could cause unicode errors (Issue #282 )
...
This occurs because werkzeug.utils.escape() auto-casts
non-basestring values to unicode, while we expect to be
working with bytestrings only.
So when evaluating attribute values, make sure we always
return bytestring values, never int, bool or unicode.
2014-06-05 10:11:23 +02:00
kevin wang
9bfa02386c
[FIX]t-field wrong outputs when precision is 0
2014-05-26 17:06:49 +08:00
Christophe Simonis
a756b82372
[MERGE] forward port of branch saas-4 up to revid bb26dea
2014-05-20 20:19:55 +02:00
Thibault Delavallée
f99785e29d
[IMP] ir_qweb: contact widget: handle website info in the contact widget.
2014-05-19 18:15:32 +02:00
Richard Mathot (OpenERP)
f5368a1bad
[FIX] ir_qweb: Duration widget now displays something
2014-05-19 17:37:00 +02:00
Xavier Morel
8a73978063
[FIX] use format_date for date fields
2014-05-19 08:23:15 +02:00
Fabien Meghazi
522dec2fcd
[IMP] assets bundle: allow to filter on type of assets
...
bzr revid: fme@openerp.com-20140508115157-ngtf46vasmygvt7n
2014-05-08 13:51:57 +02:00
Fabien Meghazi
540b753bf8
[ADD] Support for ir.attachments in assets bundles
...
bzr revid: fme@openerp.com-20140505160953-yk6688ey7eoz5579
2014-05-05 18:09:53 +02:00
Fabien Meghazi
45d64640f8
[REV] defer
...
bzr revid: fme@openerp.com-20140505131012-owp0qucjbnesp4ee
2014-05-05 15:10:12 +02:00
Fabien Meghazi
33ad1076e9
[TRY] defer
...
bzr revid: fme@openerp.com-20140505121036-044ecvq8s3d669b2
2014-05-05 14:10:36 +02:00
Antony Lesuisse
6c950dc970
[FIX] ir_qweb revert async script attribute
...
bzr revid: al@openerp.com-20140501212023-x9r57i05nrr0g29f
2014-05-01 23:20:23 +02:00
Antony Lesuisse
e6532d91ba
[FIX] ir_qweb set js assets to async
...
bzr revid: al@openerp.com-20140501205153-ko00g1vyyrmc21k8
2014-05-01 22:51:53 +02:00
Antony Lesuisse
8c6cbebc0e
[IMP] ir_qweb improve css minify
...
bzr revid: al@openerp.com-20140501190544-egvc85ctdxs69cmr
2014-05-01 21:05:44 +02:00
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
Fabien Meghazi
a1b46eb0d2
[FIX] Disable inherit_branding for t-call-assets
...
bzr revid: fme@openerp.com-20140430081042-f77suergc85qemnn
2014-04-30 10:10:42 +02:00
Fabien Meghazi
677de74fef
[REM] @filename from WebAsset constructor
...
bzr revid: fme@openerp.com-20140430073537-lk4i126urhfkjdtz
2014-04-30 09:35:37 +02:00
Fabien Meghazi
5d13ad7ee8
[REM] query additional params for bundles
...
`translatable` has been removed from assets templates, no need for this anymore
bzr revid: fme@openerp.com-20140428124431-3b5rvyejjosftpq3
2014-04-28 14:44:31 +02:00
Fabien Meghazi
4b3212c076
[IMP] better exception handling in case of missing asset
...
bzr revid: fme@openerp.com-20140425132804-e0dbsl5t2sod7kv5
2014-04-25 15:28:04 +02:00
Simon Lejeune
cebd89c148
[FIX] QWeb contact widget: fixed double escaping: only the address part needs to be escaped as it is shown in a t-raw (other parts are shown in t-esc).
...
bzr revid: sle@openerp.com-20140424144329-vj51bt0y269f1pwo
2014-04-24 16:43:29 +02:00
Fabien Meghazi
8370d3f60e
[MERGE] upstream
...
bzr revid: fme@openerp.com-20140423123808-q58dtl8a0bb2ymlf
2014-04-23 14:38:08 +02:00
Fabien Meghazi
f4a37244ca
[ADD] query to assets bundle html
...
bzr revid: fme@openerp.com-20140422134613-8652pfbrdso1qoqd
2014-04-22 15:46:13 +02:00
Fabien Meghazi
d2f51a75d5
[FIX] asset debug shall bypass cache
...
bzr revid: fme@openerp.com-20140422112732-1p94f77ymusmsan2
2014-04-22 13:27:32 +02:00
Fabien Meghazi
1cde3cb02b
[ADD] debug mode in asset bundle
...
bzr revid: fme@openerp.com-20140422111548-5htr1gfj7x3ioval
2014-04-22 13:15:48 +02:00
Xavier Morel
4c5b1d9484
[FIX] comment: we've already removed @charset movements entirely
...
bzr revid: xmo@openerp.com-20140418133017-1cyq5wkxj4opygww
2014-04-18 15:30:17 +02:00
Xavier Morel
59b8b7ede0
[IMP] preclude unbounded growth by using an LRU cache for asset bundle compressed content
...
bzr revid: xmo@openerp.com-20140418132929-qnyh3zoarjuo9q6a
2014-04-18 15:29:29 +02:00
Xavier Morel
24512edac9
[IMP] don't reimplement lazy_property by hand when we already have one
...
bzr revid: xmo@openerp.com-20140418130603-ekgsfsi1c07y7wuo
2014-04-18 15:06:03 +02:00
Xavier Morel
424f03c172
[REV] datetime for source-only WebAsset
...
thinking about it, this is the *inline* data taken directly from the template,
probably makes more sense if it does not change the coalesced asset's
last_modified
bzr revid: xmo@openerp.com-20140417143656-upgj5b0syi10c9ve
2014-04-17 16:36:56 +02:00
Xavier Morel
d9f26840af
[IMP] don't alter call-assets's template_attributes in-place, create fake one for sub-call
...
bzr revid: xmo@openerp.com-20140417143525-0qyqddd1niwsg7ad
2014-04-17 16:35:25 +02:00
Xavier Morel
5b081731cc
[FIX] remove existing sourcemaps in CSS files
...
bzr revid: xmo@openerp.com-20140417142012-mhi8saeofkon5pe5
2014-04-17 16:20:12 +02:00
Xavier Morel
f8964db435
[IMP] @import regex
...
bzr revid: xmo@openerp.com-20140417131249-gbvnq2zb09kzdifv
2014-04-17 15:12:49 +02:00
Xavier Morel
a2889a1cf8
[FIX] @charset in CSS files
...
* there should be *at most* one per file, not 12
* use existing @charset to know file encoding when reading files (before
concatenation)
* remove existing @charset while reading, if any
* werkzeug's default output charset is UTF-8 and CSS algo uses content-type
encoding or assumes UTF-8, so don't put any @charset back in
bzr revid: xmo@openerp.com-20140417125213-8c9z2d7eu900kkyw
2014-04-17 14:52:13 +02:00
Xavier Morel
23eb006772
[IMP] style, default last_modified
...
* replaced type is other by isinstance
* used generators instead of list when applicable
* removed unused methods, useless parameters
* not sure why explicit call to dict() instead of literal, fixed it
bzr revid: xmo@openerp.com-20140416153536-84s01gbnjfu6hysl
2014-04-16 17:35:36 +02:00
Kersten Jeremy
73bbf079c7
[MERGE] qweb-m2o-view - Allow to use many2one for qweb template (work also with view_id)
...
bzr revid: jke@openerp.com-20140416085407-krltmt3jhw802a5c
2014-04-16 10:54:07 +02:00
Fabien Meghazi
93073dff94
[FIX] exclude /web/[css|js] in parsing
...
bzr revid: fme@openerp.com-20140410174025-74hmzzalkxux3tvb
2014-04-10 19:40:25 +02:00
Fabien Meghazi
4cc3ed6fab
[MERGE] trunk
...
bzr revid: fme@openerp.com-20140410173630-eq1uh58nba7yptf8
2014-04-10 19:36:30 +02:00
Fabien Meghazi
cc722b62a2
[ADD] cache
...
bzr revid: fme@openerp.com-20140410164744-i7fr4bqax88430ao
2014-04-10 18:47:44 +02:00
Fabien Meghazi
71d1a7f6e3
[ADD] checksum
...
bzr revid: fme@openerp.com-20140410155412-64h843qo6k9vcwbz
2014-04-10 17:54:12 +02:00
Thibault Delavallée
24e5270347
[IMP] ir_qweb: added country flag management in contact widget
...
bzr revid: tde@openerp.com-20140411091621-q0c2ndzv9xpptzqo
2014-04-11 11:16:21 +02:00
Fabien Meghazi
b8e9e0e8f4
[ADD] last modified date
...
bzr revid: fme@openerp.com-20140410143224-rb8892vn0yqmr56g
2014-04-10 16:32:24 +02:00
Fabien Meghazi
8e878a8e01
[WIP] bundle minify
...
bzr revid: fme@openerp.com-20140410101847-srs54wvf39rjjf2j
2014-04-10 12:18:47 +02:00
chm@openerp.com
9d187f9915
[IMP] ir_qweb: first tag 't' template of a view is added to qwebcontext.templates with id of ir_ui_view
...
bzr revid: chm@openerp.com-20140410080058-tx59gwh8nsefria3
2014-04-10 10:00:58 +02:00
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
Fabien Meghazi
cbb5488f97
[ADD] t-call-assets
...
bzr revid: fme@openerp.com-20140408075205-9v8fxg786jj0fj77
2014-04-08 09:52:05 +02:00
Christophe Simonis
0161666e8b
[MERGE] forward port of branch saas-3 up to revid 5112 chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
...
bzr revid: chs@openerp.com-20140407160548-ttuc877kknuycoqw
2014-04-07 18:05:48 +02:00
Simon Lejeune
2599ff5590
[MERGE] trunk
...
bzr revid: sle@openerp.com-20140407133627-36iijkx89552bwa0
bzr revid: sle@openerp.com-20140407174628-24wysrr3g8x0fijd
bzr revid: sle@openerp.com-20140408135137-0ficpzark3mjys9r
2014-04-08 15:51:37 +02:00
Simon Lejeune
9e1f395c23
[IMP] ir_qweb: added t-esc-options to allow customization of a t-esc; added an ir.qweb.widget model to format the t-esc value depending on the 'widget' key of t-esc-options; added ir.qweb.widget.monetary
...
bzr revid: sle@openerp.com-20140407131145-a6357u6tdbu6v2ix
2014-04-07 15:11:45 +02:00
Olivier Dony
e98131e0cd
[FIX] ir.qweb: avoid errors with function fields of type datetime
...
bzr revid: odo@openerp.com-20140403162005-i6lbbj6uco6dnrkq
2014-04-03 18:20:05 +02:00
Simon Lejeune
43beb0e752
[FIX] ir_qweb groups: in order to compute the groups of a user, we are using cr and uid from request. In case we are rendering the template in a non-request context (for instance, automated tests), we have no cr and uid ; do not compute the user groups in this case.
...
bzr revid: sle@openerp.com-20140401153114-blxgbyp8zgx120r3
2014-04-01 17:31:14 +02:00
Simon Lejeune
48f785d786
[REF] Moved qweb contact from website to base and removed the from_html method (it never worked)
...
bzr revid: sle@openerp.com-20140324135723-2f8owtcotk3n9jt8
2014-03-24 14:57:23 +01:00
Xavier Morel
a2ef044c47
[IMP] skip injection of data-oe-* attributes outside of editable mode
...
bzr revid: xmo@openerp.com-20140317110904-k8bptgv7y2yhhh8s
2014-03-17 12:09:04 +01:00
Denis Ledoux
80ba313bbe
[FIX] base: qweb display correct traceback on exception
...
bzr revid: dle@openerp.com-20140305110435-ekhperp8jwusrzu0
2014-03-05 12:04:35 +01:00
Kersten Jeremy
7917c495e9
[IMP] Add options hide_seconds in widget datetime. If this option is set with another value that False, seconds are removed from pattern to display only hours and minuts
...
bzr revid: jke@openerp.com-20140227164611-0tolnpzmaywhs15l
2014-02-27 17:46:11 +01:00
Fabien Meghazi
fa61a1e5a7
[REV] Bring back QWebException, rename QWebException#inner to 'cause'
...
bzr revid: fme@openerp.com-20140131113515-ahcix3h6uzzdz8ix
2014-01-31 12:35:15 +01:00
Antony Lesuisse
f119c818c7
[REV] never change exceptions types
...
bzr revid: al@openerp.com-20140131010802-5zh9m5jc1ajnp5wj
2014-01-31 02:08:02 +01:00
Fabien Pinckaers
849125efd2
[FIX] removing test that commits and small fix
...
bzr revid: fp@tinyerp.com-20140131002701-4eaggu8tszph4vl5
2014-01-31 01:27:01 +01:00
Fabien Meghazi
6be5db45b0
[IMP] QWeb exceptions shall not shadow original exceptions
...
bzr revid: fme@openerp.com-20140130211708-5i9lpi4ddn7a2xbe
2014-01-30 22:17:08 +01:00
Olivier Dony
3d1b879049
[IMP] qweb.render: t-esc/t-raw rendered as `False` or `None` replaced by empty strings
...
bzr revid: odo@openerp.com-20140129180600-0c155g520gpvnqqf
2014-01-29 19:06:00 +01:00
Christophe Matthieu
d546e0db2f
[fIX] ir_qweb: fix groups inside t-call (use request.cr and request.uid and don't use None, None)
...
bzr revid: chm@openerp.com-20140129171138-zwuj2vyzu7l853np
2014-01-29 18:11:38 +01:00
Fabien Meghazi
38e651cbd2
[REM] Removed t-href|t-action|t-src from server's ir.qweb. Restor add_template for template preprocessing
...
bzr revid: fme@openerp.com-20140128201235-iv2gwjt1jn00bwoo
2014-01-28 21:12:35 +01:00
Fabien Meghazi
0ffa561bbf
[FIX] QWebException
...
bzr revid: fme@openerp.com-20140127145728-o3cxjoifut31s011
2014-01-27 15:57:28 +01:00
Fabien Meghazi
4138c1211c
[IMP] Reworked qweb exceptions
...
bzr revid: fme@openerp.com-20140127113921-7u3gfzm7ykb3ruud
2014-01-27 12:39:21 +01:00
Fabien Meghazi
76144806af
[IMP] If t-field can't get/use the resource, set it's content to None
...
bzr revid: fme@openerp.com-20140124132137-7m8840py82nlib40
2014-01-24 14:21:37 +01:00
Thibault Delavallée
3cad7c9812
[FIX] ir_qweb: fixed a forgotten av -> attribute_value
...
bzr revid: tde@openerp.com-20140123162552-akydzhiu0ckushy2
2014-01-23 17:25:52 +01:00
Stephane Wirtel
f566d20c74
[REF] Replace g_att -> generated_att, t_att template_att, an -> att_name, av -> att_value, v = qcontext
...
bzr revid: stw@openerp.com-20140123124651-wi4l32q0x4cy5o6s
2014-01-23 13:46:51 +01:00
Jojo le bricolo
6a4ea0f9a4
QWeb cleanups
...
bzr revid: jojo_le_bricolo-20140119174437-kjrr9p1smpdxhd3u
2014-01-19 18:44:37 +01:00
Thibault Delavallée
f4bb798cb8
[CLEAN] ir_qweb: removed commented and now dead BUILTINS
...
bzr revid: tde@openerp.com-20140116183315-g5ootf670kwx1z1z
2014-01-16 19:33:15 +01:00
Thibault Delavallée
c76a3aba8f
[CLEAN] ir_qweb: simplified and cleaned QWebcontext implementation
...
- now using openerp.tools.safe_eval, instead of a custom eval with custom builtins
- removed undefined_handler, hardcoded to a lambda function that returns None for
a missing attribute
tools.safe_eval: added a parameter locals_builtins. This allows to copy the builtins
in the locals. This hack is due to the fact that the locals always returns None, allowing
to simplify templates. Otherwise we would have to test the existence of each variable
before actually using it.
However as the locals always return None for every key, the globals are never checked.
Copying the builtins inside the local allows to have a complete locals, but sligtly
break the globals/locals separation.
To be reviewed and approved.
bzr revid: tde@openerp.com-20140116182750-1rnw8iljt5a9gb4u
2014-01-16 19:27:50 +01:00
Fabien Meghazi
130fff6241
[REM] Removed QWeb's useless t-escf and t-rawf
...
bzr revid: fme@openerp.com-20140115183346-qhifdt2ta9am7tj7
2014-01-15 19:33:46 +01:00
Xavier Morel
58ff276887
[FIX] pillow-compatible import
...
bzr revid: xmo@openerp.com-20140114124843-zpg2qzua90uq1pxu
2014-01-14 13:48:43 +01:00
Xavier Morel
4a3a7130fb
[IMP] replace setattr with direct attribute setting
...
bzr revid: xmo@openerp.com-20140108102118-virpiwarr0t0ojek
2014-01-08 11:21:18 +01:00
Christophe Matthieu
3d618cd6b4
[IMP] ir_qweb: add groups evaluation when a qweb view is rendered
...
bzr revid: chm@openerp.com-20140107151227-837ecc075be2prp8
2014-01-07 16:12:27 +01:00
Fabien Meghazi
51c53cb396
[IMP] QWeb: set template information on 'iterator not found' exception
...
bzr revid: fme@openerp.com-20140107105452-qrthkboh5wearljb
2014-01-07 11:54:52 +01:00
Fabien Meghazi
b72b74864a
[IMP] QWeb: set template information on template not found exception
...
bzr revid: fme@openerp.com-20131217135618-0l1emdsz6brviosm
2013-12-17 14:56:18 +01:00
Xavier Morel
f6a5800d59
[ADD] ability to disable fields escaping
...
bzr revid: xmo@openerp.com-20131216092330-2v50c8uzzsb3qp8q
2013-12-16 10:23:30 +01:00
Thibault Delavallée
806c6866bd
[FIX] ir_qweb: do not perform dict operation on context without being sur it is not None (next one)
...
bzr revid: tde@openerp.com-20131206102714-7lrhyk156sywvvea
2013-12-06 11:27:14 +01:00
Thibault Delavallée
0926b1717f
[FIX] ir_qweb: do not perform dict operation on context without being sur it is not None
...
bzr revid: tde@openerp.com-20131206102555-rys582neghxi2x21
2013-12-06 11:25:55 +01:00
Xavier Morel
745ecc9d25
[FIX] qweb: incorrect propagation of t-field options through rendering methods
...
bzr revid: xmo@openerp.com-20131205111530-nj26muxxep1yey79
2013-12-05 12:15:30 +01:00
Fabien Pinckaers
dc35f14d32
[IMP] Removed 1 SQL query for each t-field monetary or float
...
bzr revid: fp@tinyerp.com-20131203211903-p5uo3shhon8i4umw
2013-12-03 22:19:03 +01:00
Xavier Morel
103cea2da0
[FIX] change ManyToOne converter to use read on parent record and pass the browse_record's context through
...
avoids access rights issue, can be used for automagical formatting of address on res.partner
bzr revid: xmo@openerp.com-20131202095638-hoj7sxvax5808irc
2013-12-02 10:56:38 +01:00
Xavier Morel
228938ccba
[ADD] formats support to date and datetime converters
...
bzr revid: xmo@openerp.com-20131202073313-tu79esduu5bvyaai
2013-12-02 08:33:13 +01:00