Purchase orders - variables


Just did an update to v5.4.10-C88. Something seems to be wrong.

Variables in Purchase order details does not seem to work anymore.



@david any thoughts?


Would the variable need to be $purchase_order.custom1 etc?

$invoice would not be available inside the purchase order


It doesn’t seem to be looking at correct EDIT DESIGN template.

I change it to purchase_orders in edit template, but it’s the same in Purchase order preview.

Edit design template:

Purchase order preview:

Also, there is no custom fields for Purchase orders in Settings/Custom Fields.

I think the invoice designer assumes a invoice for the preview. I’m not sure we could support previewing a purchase order in the invoice designer as it would require knowing the context of the entity we wish to preview. cc @hillel

I think this would be a feature request.

@david if the backend can support it I’m happy to add the UI changes needed.

No no. It’s the Purchase order preview. Not designer’s preview.


Had a few days off. Just updated to latest version 5.5.1-C88.

It still does not pick up the right template. Something is broken.

Editing the template:

Checking in Purchase orders.

How come it shows invoice.custom1. It should be purchase_order.custom1

Thank you


Dear @david and @hillel

As I suspected before.

Purchase order will reflect changes in Invoice Design not Purchase order Design. That explains it.



This is a bug, will be corrected in the next release.

Yes indeed :slight_smile: Thank you very much @david