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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
You could do it like:
in the .xml
in the .py<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>
_columns = {You just need to implement the function _unpaid_count to return the values
...
'unpaid_count': fields.function(_unpaid_count, string='UnPaid', type='float', digits_compute=dp.get_precision('Product Price')),
}
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up