Closed doublescotch closed 4 weeks ago
if not editable from the the sequence itself, can you please tell me where could i edit that prefix in the module files?
Like from ir_sequence_data.xml file :
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2010-2012 Andy Lu <andy.lu@elico-corp.com> (Elico Corp)
Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
Copyright 2017 valentin vinagre <valentin.vinagre@qubiq.es> (QubiQ)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
-->
<odoo noupdate="1">
<!-- Sequence for sale.quotation -->
<record id="seq_sale_quotation" model="ir.sequence">
<field name="name">Sales Quotation</field>
<field name="code">sale.quotation</field>
<field name="prefix">SQ</field>
<field name="padding">3</field>
<field name="company_id" eval="False" />
</record>
</odoo>
I will try by just changing the SQ here
Edit : Not working, this fix will just make the default sequence to what i want, but you need to put SQ back on the interface for that the new sequence apply
I dont understand, i have tried to change all the occurence of "SQ" in the followinf files : sales_config.xml , sale_order.py and also test_sale_order.py, which are the only files i have found whith SQ in it, i have changed SQ to my DE needs, and then still the same error, and if, from the interface, i put back SQ in the sequence, it will work.... even if there is not any SQ no more in the source files....
Module
sale_quotation_number
Describe the bug
Work well but it seems there is a bug when trying to change the "SQ" prefix of the sequence for quotations, you are in the obligation of keeping "SQ" in front of whatsoever prefix you want to use.
For exemple, if i replace SQ by DE, the order will still have the quotation number, no change
If i put DE in front of SQ (so DESQ), same not working
If i put DE after SQ (so SQDE), it will work as expected, with order sequence well used
So i guess there is somewhere in your code an imperativ needing of starting the prefix by SQ, but could it be changed? Cause SQ is ok for an english speaking country, but for a french one like mine, i need to edit
To Reproduce
Odoo Community 14:
Steps to reproduce the behavior:
- Change sale.quotation sequence prefix from "SQ" to "anything that do not start with "SQ" "
- Create a quote (will have the sequence you have just edited, for exemple "DE0001")
- Comfirm the quote (will still have the same number, havent changed to sale.order sequence as it should)
Expected behavior Being able to change the sale.quotation sequence settings whitout having to use "SQ" in front of my custom prefixs
Thanks by advance
The problem comes from this line of code: https://github.com/OCA/sale-workflow/blob/16.0/sale_quotation_number/models/sale_order.py#L42
It's check if the Quotation name starts with "SQ", if not it's just skip the record and the sequence doesn't change. I don't know why it's hardcoded like that "SQ" instead of a check from the ir.sequence prefix.
Possible fix here: https://github.com/OCA/sale-workflow/pull/2126
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
Module
sale_quotation_number
Describe the bug
Work well but it seems there is a bug when trying to change the "SQ" prefix of the sequence for quotations, you are in the obligation of keeping "SQ" in front of whatsoever prefix you want to use.
For exemple, if i replace SQ by DE, the order will still have the quotation number, no change
If i put DE in front of SQ (so DESQ), same not working
If i put DE after SQ (so SQDE), it will work as expected, with order sequence well used
So i guess there is somewhere in your code an imperativ needing of starting the prefix by SQ, but could it be changed? Cause SQ is ok for an english speaking country, but for a french one like mine, i need to edit
To Reproduce
Odoo Community 14:
Steps to reproduce the behavior:
Expected behavior Being able to change the sale.quotation sequence settings whitout having to use "SQ" in front of my custom prefixs
Thanks by advance