This question has been flagged
1 Reply
2703 Views

Hello All,

    I'm trying to display my invoice name on the stock picking form as reference instead of sale order.

    I have tried number of ways namely

    1.Tried overriding the action_invoice_open method

    2.Tried overriding invoice_validate

    3.Tried write method

    4.Tried onchange of draft state

    But every time the name value of the invoice contains False , All the time the invoice name attribute is note defined

    Please be kind to tell me how to do this?

Avatar
Discard
Best Answer

Hi,

In the Invoice, the field named 'name' is referring to the source from where which the invoice is generating, normally if you create an invoice directly from the invoice menu the value in the field will be empty/False.


If the invoice is generating from the Sale order or Purchase Order you will get the corresponding name in that field. In the UI the name of that field is  Reference/Description,  If you looking to get the invoice number, try with the field name 'number', self.number will give you the desired result.


Remember the number will get generated once the invoice is Validating.


Thanks

Avatar
Discard
Author

Thank You