Odoo Help

0

Smart button on partner form

By
Jihen BEN ALI
on 2/1/16, 10:58 AM 365 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).

Thanks

1

Axel Mendoza

--Axel Mendoza--
11023
| 7 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>

</button>

</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



About This Community

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

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 2/1/16, 10:58 AM
Seen: 365 times
Last updated: 2/4/16, 4:48 AM