Steps to fix this issue :-
1. Ensure Correct Report Template Configuration
- Navigate to Settings > Technical > Reporting > Reports.
- Locate the Purchase Order report (it may be named purchase.order or purchase.report_order).
- Verify it’s linked to the purchase.order model, while the RFQ report should be linked to purchase.order.request.
2. Check Reporting Action for Purchase Order
- Go to Settings > Technical > Actions > Reports.
- Find the action for Purchase Order (usually named purchase.order or purchase.report_order).
- Ensure this action triggers the correct Purchase Order report for confirmed orders, not for RFQs.
3. Ensure Correct Condition Based on Status
- The print action might be linked to the RFQ stage instead of the confirmed Purchase Order.
- Go to Settings > Technical > Workflow and check the conditions for the Purchase Order workflow.
- Ensure the print action is only triggered for orders in the "purchase" state (confirmed), not when they are in the "draft" or "sent" stages.
4. Update or Add Custom QWeb Template (if necessary)
- If you have custom templates, go to Settings > Technical > User Interface > Views and search for the Purchase Order report template.
- Add conditions in the template to differentiate between RFQs and confirmed orders:
[ <t t-if="o.state == 'purchase'">
<!-- Purchase Order Template -->
</t>
<t t-if="o.state == 'draft' or o.state == 'sent'">
<!-- RFQ Template -->
</t> ]
5. Verify Print Action Logic
- Ensure the print action is set correctly to trigger the Purchase Order template only when the order is in the "purchase" state (confirmed), not for draft or sent states.
- You can find this under Settings > Technical > Actions > Reports.
6. Test the Configuration
- Confirm a Purchase Order, then try printing it.
- Ensure that the correct Purchase Order template is printed, not the RFQ.
7. Double Check Email Action
- Since email actions are working correctly (sending the right Purchase Order), make sure that the print action is aligned with the same logic, ensuring it prints only for confirmed orders.
Thanks & Regards ;
Company : DataInteger Consultancy Services LLP