There are many widgets present in Odoo user interface to perform different functionalities. Status bar, Checkboxes, Radio button etc. make the operations in Odoo simpler. In this blog, I will be explaining about different default widgets in Odoo, its purpose, and implementation syntax..
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your AppElínAnna Jónasdóttir
The use case for this presentation will be a plant nursery implementation. During this session we'll present several powerful abstract classes from Odoo
Empower your App by Inheriting from Odoo MixinsOdoo
Empower your App by Inheriting from Odoo Mixins. Let us recode everything from scratch! Or not.
Thibault Delavallee, Software Engineer, RD Marketing Team Leader, Odoo
Based on work from Yannick Tivisse, Martin Trigaux, and Damien Bouvy.
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New ViewElínAnna Jónasdóttir
For Odoo version 12, two new view types have been created: the cohort view and the dashboard view. In addition, many views have been extended to give a customized experience (for example, the kanban view shown in the Document application). This is a sign that the Odoo server code is maturing, and that we sometimes need to work on the client code to provide a customized experience.
In this talk, we will explain our experience on how to create and extend views in Odoo. More precisely, this will include the following topics:
- Adding a new view type
- Extending an existing view
- How we approach a problem
- Common problems
- Documentation/testing/validation
There are many widgets present in Odoo user interface to perform different functionalities. Status bar, Checkboxes, Radio button etc. make the operations in Odoo simpler. In this blog, I will be explaining about different default widgets in Odoo, its purpose, and implementation syntax..
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your AppElínAnna Jónasdóttir
The use case for this presentation will be a plant nursery implementation. During this session we'll present several powerful abstract classes from Odoo
Empower your App by Inheriting from Odoo MixinsOdoo
Empower your App by Inheriting from Odoo Mixins. Let us recode everything from scratch! Or not.
Thibault Delavallee, Software Engineer, RD Marketing Team Leader, Odoo
Based on work from Yannick Tivisse, Martin Trigaux, and Damien Bouvy.
Odoo Experience 2018 - Visualizing Data in Odoo: How to Create a New ViewElínAnna Jónasdóttir
For Odoo version 12, two new view types have been created: the cohort view and the dashboard view. In addition, many views have been extended to give a customized experience (for example, the kanban view shown in the Document application). This is a sign that the Odoo server code is maturing, and that we sometimes need to work on the client code to provide a customized experience.
In this talk, we will explain our experience on how to create and extend views in Odoo. More precisely, this will include the following topics:
- Adding a new view type
- Extending an existing view
- How we approach a problem
- Common problems
- Documentation/testing/validation
Set Default Values to Fields in Odoo 15Celine George
There are certain times when some fields will be needing to have a default value loaded into their instance all the time. In Odoo, sometimes we have to set a specific value for a field by default every time we create a record of that model. Set default value for fields have several methods in this slide we discuss some of that methods
Web services are a set of tools available over the internet or intranet networks which use the standardized messaging system to transfer data between applications or systems.
Web services allow interaction between different systems or applications using standard libraries such as HTML, XML, WSDL, and SOAP.
This presentation is about the types of selectors used in coding/writing HTML or something like that. So this presentation includes element type selector, grouped selector, descendant selector, ID and class selector, universal selector, and pseudoclass selectors. This ppt would provide definition and examples for the topics stated.
DjangoGirls Seoul 2017 11월 세미나에서 발표한 문서입니다.
- 소스 코드 : https://github.com/hannal/pieces-of-django-admin-djangogirls-seoul
- 각종 소식 : https://fb.com/hello.kaycha
Introduces important facts and tools to help you get starting with performance improvement.
Learn to monitor and analyze important metrics, then you can start digging and improving.
Includes useful munin probes, predefined SQL queries to investigate your database's performance, and a top 5 of the most common performance problems in custom Apps.
By Olivier Dony - Lead Developer & Community Manager, OpenERP
Instead of modifying existing views in place, Odoo provides view inheritance where children “extension” views are applied on top of root views and can add or remove content from their parents. An extension view references its parent using the inherit_id field, and instead of a single view, its arch field is composed of any number of XPath elements selecting and altering the content of their parent view.
Odoo ERP is one of the best Open Source ERP until this year. Within this slide we are explain some of what we can enhance on the Odoo to get our goal on business requirements
Set Default Values to Fields in Odoo 15Celine George
There are certain times when some fields will be needing to have a default value loaded into their instance all the time. In Odoo, sometimes we have to set a specific value for a field by default every time we create a record of that model. Set default value for fields have several methods in this slide we discuss some of that methods
Web services are a set of tools available over the internet or intranet networks which use the standardized messaging system to transfer data between applications or systems.
Web services allow interaction between different systems or applications using standard libraries such as HTML, XML, WSDL, and SOAP.
This presentation is about the types of selectors used in coding/writing HTML or something like that. So this presentation includes element type selector, grouped selector, descendant selector, ID and class selector, universal selector, and pseudoclass selectors. This ppt would provide definition and examples for the topics stated.
DjangoGirls Seoul 2017 11월 세미나에서 발표한 문서입니다.
- 소스 코드 : https://github.com/hannal/pieces-of-django-admin-djangogirls-seoul
- 각종 소식 : https://fb.com/hello.kaycha
Introduces important facts and tools to help you get starting with performance improvement.
Learn to monitor and analyze important metrics, then you can start digging and improving.
Includes useful munin probes, predefined SQL queries to investigate your database's performance, and a top 5 of the most common performance problems in custom Apps.
By Olivier Dony - Lead Developer & Community Manager, OpenERP
Instead of modifying existing views in place, Odoo provides view inheritance where children “extension” views are applied on top of root views and can add or remove content from their parents. An extension view references its parent using the inherit_id field, and instead of a single view, its arch field is composed of any number of XPath elements selecting and altering the content of their parent view.
Odoo ERP is one of the best Open Source ERP until this year. Within this slide we are explain some of what we can enhance on the Odoo to get our goal on business requirements
Odoo training 2016 - Apagen Solutions Pvt. ltd.Gaurav Kumar
Apagen has offered Functional, Technical and Modular courses with more than 5000 people already trained all around the world! With the release of Odoo, we will continue to offer a job-relevant, hands-on training curriculum; and a consistent training experience worldwide! That means to our customers, listening to the market, and taking account developments in the job roles and backgrounds of those working with Odoo today.
Odoo Online platform: architecture and challengesOdoo
A short introduction to the technical architecture of the Odoo Online platform, including the advanced integrated features (instant DNS, email gateways, etc.), and the technical aspect of the SLA.
By Olivier Dony - Lead Developer & Community Manager, OpenERP
What's the spirit of your company? At Odoo, we know that a great and motivating atmosphere is the key! It can help employees to feel better and then be proud of working for your company!
Code is not text! How graph technologies can help us to understand our code b...Andreas Dewes
Today, we almost exclusively think of code in software projects as a collection of text files. The tools that we use (version control systems, IDEs, code analyzers) also use text as the primary storage format for code. In fact, the belief that “code is text” is so deeply ingrained in our heads that we never question its validity or even become aware of the fact that there are other ways to look at code.
In my talk I will explain why treating code as text is a very bad idea which actively holds back our understanding and creates a range of problems in large software projects. I will then show how we can overcome (some of) these problems by treating and storing code as data, and more specifically as a graph. I will show specific examples of how we can use this approach to improve our understanding of large code bases, increase code quality and automate certain aspects of software development.
Finally, I will outline my personal vision of the future of programming, which is a future where we no longer primarily interact with code bases using simple text editors. I will also give some ideas on how we might get to that future.
From new version Odoo 8.0 onwards we are using new api in python coding. But most of the people are unaware of its exact usage. They will use new API in unwanted places. Also, new API provides a lot of functionalities and simple methods to achieve validation and triggering the function call. So now we can spend some time for a clear discussion about new API in odoo.
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
Presented at Railsconf 2015 by Daniel Spector, @danielspecs.
Crossing the Bridge explores tools, patterns and best practices to connect your Javascript MVC framework to Rails in the most seamless way possible. The talk progresses from demonstrating the standard API request cycle to preloading data to your client-side framework to rendering your javascript on the server. It explores Isomorphic Javascript and ways of implementing it with Rails.
Refactoring @ Mindvalley: Smells, Techniques and PatternsTristan Gomez
Every week my team commits really good, clean code. I decided to get the best of the commits and showcase what makes them good, what smells they address, and what techniques they used.
TensorFlow XLAの中では、
XLA Client を Pythonで利用できるようになっています。
また、2018年2月に開催されたSysMLの論文(JAX@Google)についても追記しました。
In TensorFlow XLA,
XLA Client is now available in Python.
Also added about SysML's paper (JAX @ Google) held in February 2018.
This talk is primarily for web developers. It's about understanding how to write an API client that is testable and sensible without being more opinionated than necessary.
A Python-centric talk given at PyTennessee 2015 in Nashville, TN.
ManageIQ currently runs on Ruby on Rails 3. Aaron "tenderlove" Patterson presents his effort to migrate to RoR 4, which entails some changes in the code to take advantage of the latest advances in RoR.
For more on ManageIQ, see http://manageiq.org/
This is an introductory SCALA workshop for a JAVA developer. Hence, we're going to explore 'functional' side of the language. SCALA is 50% OOP (Object-Oriented-Programming) and 50% FP (Functional-Programming). Main principles of FP are discussed, such as: tail-recursion, currying, pure-functions, lazy evaluation etc.) along with some examples in code.
We look at the basic keywords and constructs in SCALA.
In the end SCALA tools which are helpful for developers are listed.
Webinar - Office 365 & PowerShell : A Match Made in HeavenSébastien Levert
In a world where we hear more and more about DevOps and continuous integration, your Office 365 integration process might be lacking some good practices and ways to automate everything. In this session, we will cover how you can use PowerShell to ease the deployment process of your applications, the monitoring of your tenants and the maintenance of all the workloads of Office 365. Being a demo-intensive session, be prepared to see a lot of PowerShell and Office 365 API code!
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
5. Programming with
Recordsets
A recordsetrecordset is:
an ordered collection of records
one concept to replace
browse records,
browse lists,
browse nulls.
an instance of the model's class
·
·
·
·
·
·
6. The recordset as a collection
It implements sequence and set operations:
partners == env[['res.partner']]..search([])([])
forfor partner inin partners::
assertassert partner inin partners
printprint partner..name
ifif len((partners)) >=>= 55::
fifth == partners[[44]]
extremes == partners[:[:1010]] ++ partners[[--1010:]:]
union == partners1 || partners2
intersection == partners1 && partners2
difference == partners1 -- partners2
7. The recordset as a record
It behaves just like former browse records:
printprint partner..name
printprint partner[['name']]
printprint partner..parent_id..company_id..name
Except that updates are written to database:
partner..name == 'Agrolait'
partner..email == 'info@agrolait.com'
partner..parent_id == ...... # another record
8. The recordset as a record
If len(partners) > 1, do it on the firstfirst record:
printprint partners..name # name of first partner
printprint partners[[00]]..name
partners..name == 'Agrolait' # assign first partner
partners[[00]]..name == 'Agrolait'
If len(partners) == 0, return the null value of the field:
printprint partners..name # False
printprint partners..parent_id # empty recordset
partners..name == 'Foo' # ERROR
9. The recordset as an instance
Methods of the model's class can be invoked on recordsets:
# calling convention: leave out cr, uid, ids, context
@api.multi@api.multi
defdef write((self,, values):):
result == super((C,, self))..write((values))
# search returns a recordset instead of a list of ids
domain == [([('id',, 'in',, self..ids),), (('parent_id',, '=',, False)])]
roots == self..search((domain))
# modify all records in roots
roots..write({({'modified':: True})})
returnreturn result
The missing parameters are hidden inside the recordset.
11. Method decorators
Decorators enable support of bothboth old and new API:
fromfrom odoo importimport Model,, api
classclass stuff((Model):):
@api.model@api.model
defdef create((self,, values):):
# self is a recordset, but its content is unused
......
This method definition is equivalent to:
classclass stuff((Model):):
defdef create((self,, cr,, uid,, values,, context==None):):
# self is not a recordset
......
12. Method decorators
fromfrom odoo importimport Model,, api
classclass stuff((Model):):
@api.multi@api.multi
defdef write((self,, values):):
# self is a recordset and its content is used
# update self.ids
......
This method definition is equivalent to:
classclass stuff((Model):):
defdef multi((self,, cr,, uid,, ids,, values,, context==None):):
# self is not a recordset
......
13. Method decorators
One-by-one or "autoloop" decorator:
fromfrom odoo importimport Model,, api
classclass stuff((Model):):
@api.one@api.one
defdef cancel((self):):
self..state == 'cancel'
When invoked, the method is applied on every record:
recs..cancel()() # [rec.cancel() for rec in recs]
14. Method decorators
Methods that return a recordset instead of ids:
fromfrom odoo importimport Model,, api
classclass stuff((Model):):
@api.multi@api.multi
@api.returns@api.returns(('res.partner'))
defdef root_partner((self):):
p == self..partner_id
whilewhile p..parent_id::
p == p..parent_id
returnreturn p
When called with the old API, it returns ids:
roots == recs..root_partner()()
root_ids == model..root_partner((cr,, uid,, ids,, context==None))
19. Fields as descriptors
Python descriptors provide getter/setter (like property):
fromfrom odoo importimport Model,, fields
classclass res_partner((Model):):
_name == 'res.partner'
name == fields..Char((required==True))
parent_id == fields..Many2one(('res.partner',, string=='Parent'))
20. Computed fields
Regular fields with the name of the compute method:
classclass res_partner((Model):):
......
display_name == fields..Char((
string=='Name',, compute=='_compute_display_name',,
))
@api.one@api.one
@api.depends@api.depends(('name',, 'parent_id.name'))
defdef _compute_display_name((self):):
names == [[self..parent_id..name,, self..name]]
self..display_name == ' / '..join((filter((None,, names))))
21. Computed fields
The compute method must assign field(s) on records:
untaxed == fields..Float((compute=='_amounts'))
taxes == fields..Float((compute=='_amounts'))
total == fields..Float((compute=='_amounts'))
@api.multi@api.multi
@api.depends@api.depends(('lines.amount',, 'lines.taxes'))
defdef _amounts((self):):
forfor order inin self::
order..untaxed == sum((line..amount forfor line inin order..lines))
order..taxes == sum((line..taxes forfor line inin order..lines))
order..total == order..untaxed ++ order..taxes
22. Computed fields
Stored computed fields are much easier now:
display_name == fields..Char((
string=='Name',, compute=='_compute_display_name',, store==True,,
))
@api.one@api.one
@api.depends@api.depends(('name',, 'parent_id.name'))
defdef _compute_display_name((self):):
......
Field dependencies (@depends) are used for
cache invalidation,
recomputation,
onchange.
·
·
·
23. Fields with inverse
On may also provide inverseinverse and searchsearch methods:
classclass stuff((Model):):
name == fields..Char()()
loud == fields..Char((
store==False,, compute=='_compute_loud',,
inverse=='_inverse_loud',, search=='_search_loud',,
))
@api.one@api.one
@api.depends@api.depends(('name'))
defdef _compute_loud((self):):
self..loud == ((self..name oror ''))..upper()()
......
25. Onchange methods
For computed fields: nothing to do!nothing to do!
For other fields: API is similar to compute methods:
@api.onchange@api.onchange(('partner_id'))
defdef _onchange_partner((self):):
ifif self..partner_id::
self..delivery_id == self..partner_id
The record self is a virtual record:
all form values are set on self
assigned values are not written to database but
returned to the client
·
·
26. Onchange methods
A field element on a form is automaticallyautomatically decorated with
on_change="1":
if it has an onchange method
if it is a dependency of a computed field
This mechanism may be prevented by explicitly decorating
a field element with on_change="0".
·
·
27. Python constraints
Similar API, with a specific decorator:
@api.one@api.one
@api.constrains@api.constrains(('lines',, 'max_lines'))
defdef _check_size((self):):
ifif len((self..lines)) >> self..max_lines::
raiseraise WarningWarning((_(("Too many lines in %s")) %% self..name))
The error message is provided by the exception.