Community mailing list archives

community@mail.odoo.com

Re: one2many qweb report display

by
moulay rachid
- 09/06/2015 13:39:40
thanks luck

the problem that i'm having is this

i'm having pictures that i want  to print in sale.oder report

basicly i did this

 <span t-field="o.product_id.images.image" t-field-options="{&quot;widget&quot;: &quot;image&quot;, &quot;class&quot;: &quot;img-rounded&quot;}"/>

this works if i have one pictur per product but if i have more than one

i got this message



File "/home/odoo/odoo/openerp/fields.py", line 1768, in __get__
    return record.ensure_one()._ids[0]
  File "/home/odoo/odoo/openerp/models.py", line 5196, in ensure_one
    raise except_orm("ValueError", "Expected singleton: %s" % self)
QWebException: ('ValueError', 'Expected singleton: product.image(6, 8, 7)')

On Sun, Sep 6, 2015 at 5:34 PM, Luke Branch <odoocommunitywidgets@gmail.com> wrote:
without any details of what you've tried it's difficult to know where you went wrong. Take a look at this post, it might help you understand:

https://www.odoo.com/forum/help-1/question/how-do-you-use-variables-in-a-qweb-loop-67687

On Mon, Sep 7, 2015 at 12:58 AM, moulay rachid Hachimi <moulayrachidhachimi@gmail.com> wrote:
i did the loop but did not work

On Sun, Sep 6, 2015 at 4:22 PM, Luke Branch <odoocommunitywidgets@gmail.com> wrote:
Hi,

you need a foreach loop. Check out the QWeb documentation here:



Regards,

Luke

On 6 Sep, 2015, at 11:53 pm, moulay rachid Hachimi <moulayrachidhachimi@gmail.com> wrote:

hi 

how to display one2many field in qweb reports

thanks you

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
212654039440