Does anyone here knows how to change the name of a sequential???

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
You can change the formatting of any sequence.
This includes Purchase Orders, Sales Orders, Delivery Orders, Manufacturing Orders, Invoices, etc.
Do this via the menu sequence Settings -> Technical -> Sequences and Identifiers -> Sequences
For Invoices via the Sales Journal, you will see the following when you open the relevant record:

You can see that the only things you can incorporate into a sequence this way are:
You can see at the bottom the format for various components of the data and time.
For this we only need the sequence.xml and __openerp__.py files.
example code :
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Sequences for crm.lead -->
<!-- <record id="seq_type_lead_no" model="ir.sequence.type">
<field name="name">Leadnumber</field>
<field name="code">crm.lead</field>
</record> -->
<record id="seq_lead_no" model="ir.sequence">
<field name="name">Leadnumber</field>
<field name="code">crm.lead</field>
<field name="prefix">LN</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>
</data>
</openerp>
For changing MO to JO,first we have to delete the MO code from the sequences ( Settings -> Technical -> Sequences & Identifiers ->Sequences )
My problem got solved by adding this code in my additional .xml then change the prefix from MO to JO. In my .py I add the _default for my fields that will going to use sequence:
.xml:
<record id="mrp.sequence_mrp_prod_type" model="ir.sequence.type">
<field name="name">Production order</field>
<field name="code">mrp.production</field>
</record>
<record id="mrp.sequence_mrp_prod" model="ir.sequence">
<field name="name">Production order</field>
<field name="code">mrp.production</field>
<field name="prefix">JO/</field>
<field name="padding">5</field>
<field name="number_next">1</field>
<field name="number_increment">1</field>
</record>
.py:
_defaults ={
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
}
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.