How to Add New Sequence in odoo12

preview_player
Показать описание
#newsequenceinodoo #sequenceinodoo #odootutorial
How to define new sequence in Odoo for the models. Show how to define the new sequence and override the create method and assign the sequence value to the field.

Рекомендации по теме
Комментарии
Автор

hello i have a question, why when i try to upgrade the models it keeps getting error like this "name '_' is not defined" i dont know what went wrong

henrypcs
Автор

I use project scrum module, I have project which have many sprints, my sprints have sequence, but it is not depending from projects.
if I create project I see project 1 sprint1 sprint2 sprint3, project2 sprint4 sprint5....
I need project 1 - sprint1, sprint2.
project2 -sprint1, sprint2
help me pls

megasaab
Автор

If a have many projects and in each projects a want to sequence with will start again from 1? what can I do?

megasaab
Автор

if you upgrade this odoo 12 to odoo 14, does the sequence number (py Code file) is gone?

TBKMCN
Автор

my all things are ok but sequence is not working on form new is coming every time.

abduljabbar
Автор

i have this problem..help if you can and thank you


index=True, default=lambda self: _('New'))
NameError: name '_' is not defined

SingerSamehBashnak
Автор

Dear sir, after upgrading the hospital, it is showing "New" in order reference column instead of "HP001". Please help. Thanks.
@OdooMates

SaniyaKhan-fbpd
Автор

is this working for the version Odoo 13.00 ? I ve tried this but it's give me back a lot of errors, please some help

naoufelabdi
Автор

good but i have an error because of company_id in sequence.xml file
<field name="company_id" eval="false" />
Second : i don't completely understand this function
@api.model
def create(self, vals):
if vals.get('name_seq', _('New')) == _('New'):
vals['name_seq'] = or _('New')
result = super(HospitalPatient, self).create(vals)
return result
is there more explain
thanks

omarahmed
Автор

hello i'm actually encountering a problem, I have followed the tutorial as shown and there is no error in code, but when i'm creating a new patient it doesn't generate a reference number. Reference number remains 'New' in tree view and form view for the created patient. Can you help me please?

neilsenarnachellum
Автор

How to create seq base on selected field?

iGuntaram
Автор

error is resolved by just importing the _
please tell me what is the reason behind this and want to know about the logic code of sequence

vals['name_seq'] = or _('New')
result = super(Task, self)._create(vals)
of this two lines

mudassiralizaidi
Автор

on _('New') python showing error before _
and kindly tell me what is the use of _

mudassiralizaidi
Автор

Dear sir, after upgrading the hospital, it is showing "New" in order reference column instead of "HP001". Please help. Thanks.

AdeshPaul
Автор

Can you please share a video on "how to add multiple views in a custom module"?

mayanxoni
welcome to shbcf.ru