Community mailing list archives

community@mail.odoo.com

Re: variable is not reachable

by
Mohamed Magdy
- 09/28/2015 07:44:17
Hi,
I am not sure about the answer, but let me try.
You may need to add 'single quotes' to the last 'partner'.

<t t-foreach="partners" t-as="partner">
    <t t-set="p_inovices" t-value="list(l.number for l in docs if l.partner_id.name == 'partner')" />
</t>


Best Regards,

Mohamed Magdy
Odoo Technical Team Leader
Mob 1: +201114347478
Mob 2: +201095179215

On Mon, Sep 28, 2015 at 1:09 PM, Khalid Saeed <khaled@centrivision.com> wrote:
Hello

I am trying to create a qweb report and I used the following snippet however I get an error that "global name 'partner' is not defined" while evaluating


<t t-foreach="partners" t-as="partner">
    <t t-set="p_inovices" t-value="list(l.number for l in docs if l.partner_id.name == partner )" />
</t>



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