Commit Graph

104 Commits

Author SHA1 Message Date
Olivier Dony 8b12d1c566 [MERGE] Forward-port of 7.0 up to 85d2b45 2014-08-14 04:11:33 +02:00
Vo Minh Thu 680214c47e [FIX] tools.translate: when loading entries from a PO file, use also the POT.
On Launchpad, as commented on bug 933496, PO entries (and their comments) are
shared between series. This mean that e.g. the 7.0 series can have the wrong
`reference` comments (those beginning with #:) as they would be copied from say
the trunk series. Those `reference` comments are used to import translations
and look them up.

This patch adds a few lines of code to tools.translate so that targets
defined in the POT `reference` comments are used in addition to those from the
PO file.

Also adds a test module to validate the new behavior.

This patch stems from:
 - the 6.1 branch by Vo Minh Thu:
    https://code.launchpad.net/+branch/~openerp-dev/openobject-server/6.1-fix-po-targets-933496-vmt
 - the 7.0 port by Numerigraphe:
    https://code.launchpad.net/~numerigraphe-team/openobject-server/7.0-fix-po-targets-933496-vmt
2014-08-13 23:07:40 +02:00
Christophe Simonis c7d114d9a9 [MERGE] forward port of branch saas-2 up to revid 5020 chs@openerp.com-20140312174526-a5rhh83g0fw8djuc
bzr revid: chs@openerp.com-20140312180614-8yb454s3mkjwnk2q
2014-03-12 19:06:14 +01:00
Olivier Dony 07fbbe288c [MERGE] Forward-port of 7.0 bugfixes, up to rev. 5251 revision-id: odo@openerp.com-20140304152927-havybom9x1jgdzae
bzr revid: odo@openerp.com-20140305213115-w55dqs3xra6ejmni
2014-03-05 22:31:15 +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
Christophe Matthieu 8460122209 [MERGE] sync with trunk
bzr revid: chm@openerp.com-20131202150856-fzrfcoa8pmsjutau
2013-12-02 16:08:56 +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
Xavier Morel 71b25c5add [ADD] relative datetime qweb widget
bzr revid: xmo@openerp.com-20131129085256-dwpcy0rd5v6bls9d
2013-11-29 09:52:56 +01:00
Xavier Morel ea56dece85 [ADD] duration widget
bzr revid: xmo@openerp.com-20131128153630-pouwmygw6vgyuj1l
2013-11-28 16:36:30 +01:00
Christophe Simonis 8a1a3e996f [FIX] add missing access rules for `test_workflow` test module
bzr revid: chs@openerp.com-20131127212618-rbd0v6nnxx2u68jp
2013-11-27 22:26:18 +01:00
Stefan Rijnhart 62ea0bb383 [FIX] Update test for external id
bzr revid: stefan@therp.nl-20131024214735-emciqtcm6vrs9xda
2013-10-24 23:47:35 +02:00
Xavier Morel fc8ab0df05 [FIX] numbers formatting to correctly apply user locales
bzr revid: xmo@openerp.com-20131022085436-5845r3q51g9pl2ct
2013-10-22 10:54:36 +02:00
Xavier Morel b9dfef2fab [ADD] formatting of date and datetime t-field
bzr revid: xmo@openerp.com-20131021152639-2o2j2knhuppdlbzm
2013-10-21 17:26:39 +02:00
Xavier Morel 55c38976c0 [ADD] cr, uid, context to qweb.render & qweb rendering context
bzr revid: xmo@openerp.com-20131018144546-p693x1iur5gm98ez
2013-10-18 16:45:46 +02:00
Xavier Morel a720eec77c [FIX] monetary field rounding, QWebContext in tests
bzr revid: xmo@openerp.com-20131014093657-wl00zhbgk5b1zs0o
2013-10-14 11:36:57 +02:00
Xavier Morel 29d10fd8ea [REM] conversion in monetary widget, turns out to be a misunderstood need
bzr revid: xmo@openerp.com-20131011142512-3j5vuik1o4k6q6jj
2013-10-11 16:25:12 +02:00
Xavier Morel df0fc4afc2 [IMP] test conversions correctly applied, remove unnecessary fields
bzr revid: xmo@openerp.com-20131011114703-rgg9nsyrm6k92uak
2013-10-11 13:47:03 +02:00
Xavier Morel 20f89a8d85 [IMP] change monetary t-field options, make them more sensible and flexible
bzr revid: xmo@openerp.com-20131011111620-sitjaxoykgjp2175
2013-10-11 13:16:20 +02:00
Xavier Morel ef848653af [FIX] rename currency widget to monetary to match views
bzr revid: xmo@openerp.com-20131008122006-k7xjv2lkd0t7lza7
2013-10-08 14:20:06 +02:00
Xavier Morel 273f62bc78 [IMP] move translate flag out of base qweb rendering
bzr revid: xmo@openerp.com-20131008092207-m27ox8pebl36a45p
2013-10-08 11:22:07 +02:00
Xavier Morel 47fc0a1093 [ADD] apply currency's rounding to currency widget values
bzr revid: xmo@openerp.com-20131008064226-ry22z6w23d88szr8
2013-10-08 08:42:26 +02:00
Xavier Morel a6e4951886 [ADD] currency prefix symbol
bzr revid: xmo@openerp.com-20131007150330-sys0320gaui2crtt
2013-10-07 17:03:30 +02:00
Xavier Morel 727b0e27c5 [ADD] currency qweb field widget, postfix currency
bzr revid: xmo@openerp.com-20131007145346-a3hlb6xjdwroyvzb
2013-10-07 16:53:46 +02:00
Xavier Morel 5ca6feb3fb [IMP] split out HTML export tests into a bunch of classes
bzr revid: xmo@openerp.com-20131007132554-4vq2u80zhst8n1ei
2013-10-07 15:25:54 +02:00
Xavier Morel a30a4640c2 [IMP] add some docstrings, split out fetching the converter model in ir.qweb in its own method
This way, it's possible to inherit from ir.qweb and override converter discovery

bzr revid: xmo@openerp.com-20131007125155-5j0xeov213sz4ccq
2013-10-07 14:51:55 +02:00
Xavier Morel 7a8ea1eb75 [IMP] move image serialization to image widget, not all binary fields
bzr revid: xmo@openerp.com-20131007113133-y0xcj0tgp8ionrzo
2013-10-07 13:31:33 +02:00
Xavier Morel cd31b4af4d [IMP] move field conversion around
ir.fields architecture turns out not to be a very good or simple fit,
especially as different widgets/fields need different granularity of
customizations. Having objects dedicated to each field type/widget
makes things simpler as it allows a conversion pipeline which can be
plugged into at any point.

bzr revid: xmo@openerp.com-20131007091556-03azc2mdhcb7kmwo
2013-10-07 11:15:56 +02:00
Xavier Morel e1f3f0566e [ADD] float field digits handling
bzr revid: xmo@openerp.com-20130927113424-lt23wpzs7px7k6mc
2013-09-27 13:34:24 +02:00
Xavier Morel 789c0d8a6b [ADD] Conversions from field values to "html" content
> many2one --> mettre <br/> si multi-line, html escape le reste (ex:
> adresse sur un event, on a du mettre dans un <pre> mais ce n'est pas
> bien)

> text --> mettre <br/> si multi-line, html escape le reste (ex:
> description d'un produit, à droite)

> char --> normalement pas de multi-line

> fields.binary --> t-field on image field ne semble pas fonctionner
> en écriture (la photo d'une fiche produit)

(validates that the binary field's content is image data by opening it
with PIL, then generates an <img> tag)

TODO:

> fields.float --> utiliser le digits pour formatter les decimals
> correctement (ex: prix d'un produit, à deux décimales)

> On aura aussi besoin d'un widget="currency", un peu comme dans la
> vue form du client web.

bzr revid: xmo@openerp.com-20130926133850-ab14h241q878jbom
2013-09-26 15:38:50 +02:00
Christophe Matthieu f6172723d0 [MERGE] from trunk
bzr revid: chm@openerp.com-20130801124635-yj8xny76sl5ea0r2
2013-08-01 14:46:35 +02:00
Vo Minh Thu 07f5e9a4d6 [REM] workflows: removed temporary run.py script from the tests.
bzr revid: vmt@openerp.com-20130731151104-mxo8qu5x12krto0h
2013-07-31 17:11:04 +02:00
Vo Minh Thu fc435af428 [FIX] workflows: fixed the non-deterministic workflow K, added workflow L in tests.
bzr revid: vmt@openerp.com-20130726103600-t58rshix01q7vpot
2013-07-26 12:36:00 +02:00
Vo Minh Thu 68ff38763a [ADD] workflows: some split_mode tests.
I am not sure if the Workflow K is determinist though
so it could maybe end up in activity c instead of b
(and thus fail the tests).

bzr revid: vmt@openerp.com-20130725143056-p6oic1m9jjke9j8r
2013-07-25 16:30:56 +02:00
Vo Minh Thu 64ddf5f264 [ADD] workflows: more tests.
bzr revid: vmt@openerp.com-20130725104327-l7onjhipi6fdnrj6
2013-07-25 12:43:27 +02:00
Vo Minh Thu ae01b6ab21 [ADD] workflows: added some tests.
bzr revid: vmt@openerp.com-20130725094246-4v2p0sgzocnt5vwf
2013-07-25 11:42:46 +02:00
Vo Minh Thu 0568f5c653 [ADD] test_workflow: added some tests for the workflows.
bzr revid: vmt@openerp.com-20130722151740-mucw6i5vn38blh66
2013-07-22 17:17:40 +02:00
Xavier Morel 2e8c9a48e1 [IMP] move testing of xml conversion alongside test data to ensure tests only run if module on addons_path/loaded
bzr revid: xmo@openerp.com-20130429122317-yzv4prie9hc7f7l6
2013-04-29 14:23:17 +02:00
Xavier Morel 45bb6ec7f1 [ADD] file field type in xml_convert, tests
bzr revid: xmo@openerp.com-20130429112459-ol1ayn2z34j32r54
2013-04-29 13:24:59 +02:00
Vo Minh Thu a51b6912bd [FIX] safe_eval: better exception handling:
- the re-raising of exceptions ignored the "legal" exceptions
(the one used to early abort RPC calls and generate pop-ups)
- re-raising the exception was attempting to re-use the original
exception type but it does not always take only one argument
so it was breaking.

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

bzr revid: vmt@openerp.com-20130320132238-qzo3jptww59ndlch
2013-03-20 14:22:38 +01:00
Vo Minh Thu 62579b2094 [FIX] Previous `[iMP]` was broken.
bzr revid: vmt@openerp.com-20130225105523-12pnud4oa41tx3cx
2013-02-25 11:55:23 +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
Antonin Bourguignon 13afc3b9e2 [IMP] use another xml_menu_id that leads directly to the tests wizard
bzr revid: abo@openerp.com-20130220145613-2tnid02oatds2gmy
2013-02-20 15:56:13 +01:00
Antonin Bourguignon ff80a156c2 [IMP] use a better xml id for the example
bzr revid: abo@openerp.com-20130212160302-6nty4c18wsiw62d4
2013-02-12 17:03:02 +01:00
Antonin Bourguignon fbb51ee106 [MERGE] trunk
bzr revid: abo@openerp.com-20130212125650-3r8lsai6p5c8ls2h
2013-02-12 13:56:50 +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
Anand Patel (OpenERP) 8f91937bab [IMP]: Improve test case
bzr revid: pan@tinyerp.com-20130204125642-fyf2r3uubk16md4t
2013-02-04 18:26:42 +05:30
Antonin Bourguignon 195be49479 [IMP] add a new test for the new exception type
bzr revid: abo@openerp.com-20130201171742-axfcg7y99uxpersw
2013-02-01 18:17:42 +01:00
Antonin Bourguignon 8d5340a27d [IMP] fix a typo, even if it doesn't matter
(odo would probably say something like 'stop acting nitpicky !' ;))

bzr revid: abo@openerp.com-20130201165015-l3dtvil3u59kqzf7
2013-02-01 17:50:15 +01:00
Fabien Meghazi 69a09cc2fb [FIX] Ensure timzone is unset before testing
bzr revid: fme@openerp.com-20121128174318-wg0oygtj3eipozp2
2012-11-28 18:43:18 +01:00