Odoo Help


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


What does the " multi='all' " mean in a field declaration in Python?

Pascal Tremblay
on 1/31/16, 6:26 PM 700 views

Hello all,

I'm searching the purpose of multi='all' in this python code...

_columns = {
    'amount_tax': fields.function(_amount_all_pt, string='Taxes', digits_compute=dp.get_precision('Account'), multi='all'),

Could you help please?



Axel Mendoza

--Axel Mendoza--
| 6 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 1/31/16, 10:36 PM

Hi @Pascal

The multi parameter in the field function definition it's related to use the same method to return the value of many function fields. It's only used in the old api and not needed in the new api. It's a matter of performance to call the function only one time for all the function fields with the same multi value and when used the function return value it's different to be able to return all the values of the fields using a dict for every id in the list

note: value of multi (here is "all") does not matter, it may be any string. it is matter which fields are using a same value of multi, as fields with same value of multi are calculated together as explained above (in this case, all fields having multi="all" are calculated together, but any string may be used instead of "all").

on 2/1/16, 5:00 AM

Great! Thanks all!

Pascal Tremblay
on 2/1/16, 8:48 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 1/31/16, 6:26 PM
Seen: 700 times
Last updated: 2/1/16, 7:40 PM