Community Mailing lijst archieven

community@mail.odoo.com

Avatar

Re: Invoice from website sale instead of sale order

door
Md. Tanzilul Hasan Khan
- 01-06-2017 02:32:40
Hi

I have selected following in payment acquirer:

Inline image 1

In website_portal_sale module's payment.py file following code snippet is responsible for making the invoice:

if tx.state == 'done' and tx.acquirer_id.auto_confirm in ['confirm_so', 'generate_and_pay_invoice']:
_logger.info('<%s> transaction completed, auto-confirming order %s (ID %s)', acquirer_name, tx.sale_order_id.name, tx.sale_order_id.id)
tx.sale_order_id.with_context(send_email=True).action_confirm()

But it never enters into this code block because tx.state is always in 'pending' state .

Can anyone tell me what I am missing to take tx.state in 'done' state ?

Best Regards,
Tanzil Khan

On Wed, May 31, 2017 at 3:18 PM, MD Tanzilul Hasan Khan <ponkhi403@gmail.com> wrote:
Hi

In odoo website shop we can get sales order after confirming. Also a mail with sales order can be sent by configuring it in website admin.

Is there anyway to get invoice instead of sales order? The customer should get invoice for payment not sales order.

Thanks in advance.

Best Regards,
Tanzil Khan



--
MD. Tanzilul Hasan Khan.

Referentie