Reputation: 21
I want to add source document 'origin' field from "account.invoice" model to qweb report and I dont know the syntax I only need the syntax to add this field all other code I wrote it Thanks in advance.
class make_fields (models.Model):
_inherit = 'res.partner'
gt_origin = fields.Many2one('account.invoice')
<t t-foreach="o.gt_origin" t-as="line">
`enter code here`<span t-field="line.gt_origin.origin"/>
</t>
Upvotes: 2
Views: 226
Reputation: 9670
You do not need to make a foreach loop. This should be enough:
<t t-if="o.gt_origin">
<span t-field="o.gt_origin.origin" />
</t>
Upvotes: 4