29.How To Add Compute Field In Odoo || Compute Field and Function

  Рет қаралды 18,683

Odoo Mates

Odoo Mates

Күн бұрын

How to create compute field in odoo. Steps to create a compute field and write its function in Odoo. Steps to write compute function in odoo. Compute value for a field from function in odoo. Odoo 14 development tutorials, working of a compute field in odoo. Odoo Compute function.
Odoo 14 Playlist: • 2. How To Create Modul...
Module: apps.odoo.com/...
Website: www.odoomates....
Github: github.com/odo...
Email : odoomates@gmail.com
Facebook: / odoomate
Twitter: / odoomates
Support Us in Ko Fi : ko-fi.com/odoo...

Пікірлер: 24
@1hockieCh
@1hockieCh 11 ай бұрын
Hi, I like your video, it helps me a lot. By the way, I can't make the compute field working without the dependencies field. Im trying it in the User Interface.
@SamirSELLAMI
@SamirSELLAMI 2 жыл бұрын
Thanks Bro for this great video. Is it possible to pass filter parameters to the search ORM function from fields values entered in the from view?
@OdooMates
@OdooMates 2 жыл бұрын
Yes possible, sample suppose if we have a field named partner_id in out model and if we need to search sales orders of this partner, we can do as follows: self.env['sale.order'].search([('partner_id",'=', self.partner_id.id)])
@SamirSELLAMI
@SamirSELLAMI 2 жыл бұрын
@@OdooMates this is great. In my case I want to pick up a single field value from another model depending on multiple values entred in a form view of the first model. In this cas, should I decorate the compute function with api.depands ?
@OdooMates
@OdooMates 2 жыл бұрын
@@SamirSELLAMI compute field or onchange function
@huseyinOzdogan83
@huseyinOzdogan83 3 жыл бұрын
Hello, if we add this appoinment_count on tree view, it give us singleton error, so it seems that we need to specify field i think. How can we resolve singleton error in tree view?
@OdooMates
@OdooMates 3 жыл бұрын
Hope you get the answer from here: kzbin.info/www/bejne/iKeXZaF8i9OSa7c
@pablocamberoscarvajal1608
@pablocamberoscarvajal1608 3 жыл бұрын
I'm so glad that this was already asked, and a lot more cause it's actually a video about this already. Thanks so much
@OdooMates
@OdooMates 3 жыл бұрын
@@pablocamberoscarvajal1608 welcome brother
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
I'm curious, is that `appointment_count` field is stored in database?
@OdooMates
@OdooMates 2 жыл бұрын
If store =True is not specified for a computed field, it will.not be saving or creating a field in db
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
@@OdooMates Yes you right, I just made a change in computer method, and the old field data also change. This mean the data not stored in database. Do you know if there is a cheatsheet for Odoo? If not, I'm willing to help to make that cheatsheet
@A076
@A076 3 жыл бұрын
Hello, I was wondering if ypu know how to use the base_external_dbsource module or if you know a way to use another database's table when accessing certain models. :)
@OdooMates
@OdooMates 3 жыл бұрын
You can install this module and after configuring it right. Once configured, i think, in a scheduled interval it will bring the data from the other db
@zurabegadze7123
@zurabegadze7123 2 жыл бұрын
hello, I have one question and i will greately appreciate if you answer me, Does compute field stred in base ??
@OdooMates
@OdooMates 2 жыл бұрын
Compute field is stored in db only if store=True attribute is added along with field definition.
@malikkamil6596
@malikkamil6596 2 жыл бұрын
help plz how i can repalce tax(amount_by_group) by custom mrp_tax in odoo 14 i tried a lot but not getting it
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
10:36 I try to add `appointment_count` on tree view `view_patient_tree`, but it give me an error XML: ... ... Error message: ValueError: Expected singleton: hospital.patient(1, 2, 3, 4, 5)
@OdooMates
@OdooMates 2 жыл бұрын
video no 30 will solve the problem: kzbin.info/www/bejne/iKeXZaF8i9OSa7c
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
@@OdooMates Oh yeah thank. After follow your tutorial to iterate the record, the `appointment_count` is shown on tree view, but the output number for `appointment_count` is same. Any help?
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
I already solve the problem, just need to change `self.appointment_count = appointment_count` to `rec.appointment_count = appointment_count`
@OdooMates
@OdooMates 2 жыл бұрын
@@NMNaufaldo glad that you able to resolve it instantly (y)
@sanjaibalajinallasivam3291
@sanjaibalajinallasivam3291 2 жыл бұрын
how to create a computed field for subtotal in invoicing, like calculating quantity, tax, price and show in the subtotal field
@OdooMates
@OdooMates 2 жыл бұрын
Using the above method in video, you can achieve this, did you tried it ?
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 68 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 82 МЛН
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 27 МЛН
Build your FIRST OpenAI Assistant With Function Calling
12:26
Make Stuff With AI
Рет қаралды 29 М.
Create Your Own Dashboard in ODOO 17 Today!!
17:00
ODOOITYOURSELF
Рет қаралды 10 М.
How Prometheus Monitoring works | Prometheus Architecture explained
21:31
TechWorld with Nana
Рет қаралды 1 МЛН
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 68 МЛН