Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

how can i add serial number to invoice reports(invoice print outs)

By
Toni Novak
on 3/23/15, 4:11 PM 1,270 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. 

2
Bailey
On 4/1/15, 2:50 AM

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...

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/23/15, 4:11 PM
Seen: 1270 times
Last updated: 4/1/15, 2:50 AM