Category : odoo

From template ‘RewardButton’ : <t t-name="RewardButton" owl="1"> <span class="control-button" t-att-class="is_available()? ‘highlight’ : ”"> <i class="fa fa-star"></i> <span> </span> <span>Reward</span> </span> </t> I want to hide template in js code; How can I do it using : $(‘.RewardButton’).(‘hide’); Thanks. Source: Ask Javascript..

Read more

I added a boolean field : ‘isTrue’ in res.partner model , I want to show or hide the button ‘Reward’ on ‘NumpadWidget’ based on boolean value; And , to take into consideration this value when changing from customer to anotherin pos interface. Here is my code : odoo.define(‘customer’, function(require){ ‘use strict’; var models = require(‘point_of_sale.models’); ..

Read more

In my code , I got this error : File "/usr/lib/python3/dist-packages/odoo/http.py", line 315, in _handle_exception raise exception.with_traceback(None) from new_cause IndexError: tuple index out of range When printing vals[‘partner_ids’] , I got : [(4, 3)] Here is my code , what’s wrong please? class CalendarEvent(models.Model): _inherit = ‘calendar.event’ present_ids = fields.Many2many(‘res.partner’, ‘calendar_event_present_ids’, ‘calendar_id’, ‘present_id’, string=’Presents’) minutes ..

Read more

I want to add payments related to sale.order when printing report. When printing ‘invoice_payments_widget’ I got information about payment but, I got always empty values with : ‘payment.amount’ and ‘payment.date’ What’s wrong please ? Any help ? Here is my code : <template id="report_saleorder_document_inherit" inherit_id="sale.report_saleorder_document">–> <xpath expr="//div[@name=’so_total_summary’]" position="after"> <span>payments</span> <p t-field="doc.invoice_ids.invoice_payments_widget"/> <span>payments</span> <p t-field="doc.invoice_ids.invoice_payments_widget.date"/> <table> ..

Read more

I’m new to Odoo development, so please bear with me. I’ve been searching for answers and trying to read as much documentation as possible, but I’m under time constraints and that’s why I’m reaching out to see if any experienced developers can at least point me in the right direction, or tell me that what ..

Read more

i have created the class crm.dashboard.py have 2 methods, i want to call them in js, the first controller works but when i call the second i get this error AttributeError: type object ‘crm.dashboard’ has no attribute ‘get_test_info’ any solution please? init: function(parent, context) { this._super(parent, context); var crm_data = []; var test_data = []; ..

Read more