diff options
| author | Martin Geubelle <mge@odoo.com> | 2017-05-19 17:25:59 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-05-24 08:25:23 +0200 |
| commit | fc82e1e40abd8092e6a044dc4e78432beffb5149 (patch) | |
| tree | 1000b8c86df671f84f9446655443155dd59f2031 /addons/mrp/static/src/xml/mrp.xml | |
| parent | 460c21f76578cceec364f0431d03e4f4515d6acc (diff) | |
[FIX] mrp: correctly replace inputs in pdf_viewer widget
In the extended template `HiddenInputFile` there are actually two inputs
(one for image only and another one).
This widget needs to replace both of them otherwise the file selector will
be opened twice.
Diffstat (limited to 'addons/mrp/static/src/xml/mrp.xml')
| -rw-r--r-- | addons/mrp/static/src/xml/mrp.xml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/mrp/static/src/xml/mrp.xml b/addons/mrp/static/src/xml/mrp.xml index 54b1bb6fc9b..5a1c9353084 100644 --- a/addons/mrp/static/src/xml/mrp.xml +++ b/addons/mrp/static/src/xml/mrp.xml @@ -16,8 +16,10 @@ </div> </t> <t t-extend="HiddenInputFile" t-name="HiddenInputPDFFile"> - <t t-jquery="input[type='file']:first" t-operation="replace"> - <input type="file" class="o_input_file" name="ufile" accept="application/pdf" /> + <!-- remove the inputs and put a new one for pdf only --> + <t t-jquery="input[type='file']" t-operation="replace"/> + <t t-jquery="form" t-operation="append"> + <input type="file" class="o_input_file" name="ufile" accept="application/pdf"/> </t> </t> </templates> |
