Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
10524 มุมมอง


/data/sequence.xml

<?xml version='1.0' encoding='utf-8'?>
<odoo>
    <data noupdate="1">
        <record id="seq_hospital_patient" model="ir.sequence">
            <field name="name">Patient Reference</field>
            <field name="code">hospital.patient.sequence</field>
            <field name="prefix">PN</field>
            <field name="padding">3</field>
            <field name="company_id" eval="False"/>
        </record>
    </data>
    <data noupdate="1">    
        <record id="seq_hospital_appointment" model="ir.sequence">
            <field name="name">Appointment ID</field>
            <field name="code">hospital.appointment.sequence</field>
            <field name="prefix"> PA </field>
            <field name="padding">3</field>
            <field name="company_id" eval="False"/>
        </record>

    </data>
</odoo>


Sequence has been created and Active





อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Everything seems to be correct , make sure that there is no extra space get entered in the code of the sequence, just copy paste the code of the sequence from the user interface and add it your code and see.

As rest of the sequence are working correctly this also has to work.

You can see a use case here, which seems you have added in the question: How to Add New Sequence in odoo


Thanks

อวตาร
ละทิ้ง
ผู้เขียน

Thanks it worked

คำตอบที่ดีที่สุด

If you have multiple companies, switching the company can be a solution

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Yes there was a space in the Sequence Prefix


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ต.ค. 23
8814
1
ก.ย. 23
3328
sequence prefix. แก้ไขแล้ว
3
ก.ย. 23
3556
1
พ.ค. 23
2270
2
เม.ย. 23
2827