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.


Smart button on partner form

on 2/1/16, 10:58 AM 255 views

Hi everyone,

Help me please I want to add a smart button on partner form that shows the amount of unpaid invoice(the credit).



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 2/4/16, 4:48 AM

You could do it like:

in the .xml

<div class="oe_right oe_button_box" name="buttons">

<button class="oe_inline oe_stat_button" type="action" style="margin-righ: 10px"

name="%(action_open_view_move_line_to_invoice_form)d" icon="fa-strikethrough"

context="{'invoice_type': 'paid'}">

<div>Invoice UnPaids<br/><strong><field name="unpaid_count" widget="monetary"/></strong></div>



in the .py
_columns = {
'unpaid_count': fields.function(_unpaid_count, string='UnPaid', type='float', digits_compute=dp.get_precision('Product Price')),
You just need to implement the function _unpaid_count to return the values

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: 2/1/16, 10:58 AM
Seen: 255 times
Last updated: 2/4/16, 4:48 AM