Odoo Help

0

0
2 Answers
0
Robert Crowe
11‏/4‏/2018 10:54 م

The easiest work around I found is change the system date/time and make Odoo think it's the date wanted.

0
Avatar

Avinash Nk

--Avinash Nk--

10006
| 5 3 9
Calicut, الهند
--Avinash Nk--

 

Avinash Nk
9‏/4‏/2018 12:15 ص

Hi, 

You can't make that by changing the sequence prefix from the UI. You need some customization here.

First  Make the Sale Order Sequence Prefix back to 'SO' (By Default by Odoo).

Then try this code in your custom module.

class SaleOrder(models.Model):
_inherit = 'sale.order'

@api.model
def create(self, vals):
res = super(SaleOrder, self).create(vals)
order_date = res.date_order
sequence = res.name
res.name = 'SO' + '/' + order_date[2:4] + order_date[5:7] + sequence[2:]
return res

Thank you.

Ask a Question
Keep Informed
1 follower(s)
About This Community

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

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now