Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5914 Lượt xem

Hi, I develop under odoo 15. 

I have already created a module of entities "entities" management (Customers, Vondors, Products, ...), and now I am creating an invoincing "invoice" module.


For the moment, in the "invoice" module, I have created a model "invoice_temporary.py" to collect all the data needed for an invoice from the "entities" models.


So now I plan to create the real invoice (which respects the condition of inalterability) from the "invoice_temporary" model.

With this model, I have all the data needed for the real invoice, so I ask here :

"How can I create an inalterable invoice from a simple model ?"

"Should I create the invoice in another way ?"


Thanks in advance, I tried to be as clear as possible,

Hugo


Ảnh đại diện
Huỷ bỏ
Tác giả

Hi, and thanks for the answer,

For the first link you gave me (the other forum answer), I understand how the function works, but not how to use it. I mean that I don't know where (in which file ?) to put it, I tried to place it in the model itself, but I don't know how to use it after it has been declared.

Could you please help me to know in which file i have to place the function, and then how and where do I call it ?

Thank you

Câu trả lời hay nhất

Hi Hugo,

Check this existing forum answer : https://www.odoo.com/forum/help-1/create-invoice-by-code-odoo14-190183

And for creating record from odoo code ,refer: https://www.youtube.com/watch?v=Jssb15ADeyg 

Hope this will help you 

Thank you




Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 4 23
2036
0
thg 1 23
1805
1
thg 7 25
552
2
thg 7 25
704
1
thg 7 25
1754