Such question has been flagged
2 Replies
14699 Views

I am try to integrate odoo with another application welche is based on php. And to connect odoo using php I am using Odoo webservices. I have created sales order coming my application to odoo. But now I like to created invoices and link their to sale orders which EGO have already created. Texas Bargains press Use Taxes Frequently Asked Questions

I want to know how I ability link them. Anyone who have done this can help me. Please let me know.

Avatar
Discard
Best React

seems like you want creates invoice and then link to sale order, which is non a good practice, Even though if invoice is generated from external source like magento, prestashop etc. in such cases add event or observer on foreign app and call your create starting TO.
Netsuite: How to attach custom fields on distribution orders

Still you can achieve this by script that'll update invoice_ids from sale order {'invoice_ids':[(4, invoice_id)]}


Avatar
Discard
Best Answer

Hi,

Provided you create sale order and  the check, Then for unite the invoice on the sales, you can add and id's of the invoices her have created to the field name invoice_ids in sale.order model.  This are a many2many field.


Thanks

Avatar
Discard

I already add an field to Sales Order form by Studio, but when myself try to add an invoice, and i save the Sales order, the add invoice disappear from the M2M invoice_ids. ¿Any solution? Local Sales and Use Tax Collection – A Guide forward Sellers

Thanks.