This question has been flagged
1 Reply
4977 Views

i am trying to add serial numbers to the invoice report. once i have set the serial number on the delivery order i want the same serial number to be printed in the invoice report. which i can then send it to my customers. 

openERP Version 8.saas~6

i do not host this myself, it is hosted by Odoo. 

Avatar
Discard
Best Answer

Create a sequence (Your required Type) in xml

for example


<?xml version="1.0" encoding="utf-8"?>

<openerp>

<data noupdate="1">

<record id="seq_type_product_product" model="ir.sequence.type">

<field name="name">Product</field>

<field name="code">telephone</field>

</record>

<record id="seq_product_product" model="ir.sequence">

<field name="name">Product</field>

<field name="code">telephone</field>

<field name="prefix">NG</field>

<field name="padding">5</field>

<field name="company_id" eval="False"/>

</record>

</data>

</openerp>

after you write this code in corresponding python file.

_defaults = {'cust_id': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'telephone'), }

t=0

this sequence started with NG00001...

Avatar
Discard