Category : odoo

I created a module who who display a wizard on the "stock_barcode" module in odoo when i try it on a fresh install of odoo it works perfectly but once i install it on the production server nothing happens even the console.log message don’t appear Can someone tell me how to debug this ? my ..

Read more

I’m trying to inherit render_qweb_html function from ‘ir.actions.report’ model. I want to add a static text "text" after each page of the report before printing it ? How can I do it ? Any help please? class IrActionsReport(models.Model): _inherit = ‘ir.actions.report’ @api.model def render_qweb_html(self, docids, data=None): """This method generates and returns html version of a ..

Read more

I added a filed company(It’s a char field), when creating a payment ,I want to set default value. When creating new payment, the value wasn’t displayed in the form view . But , when printing ‘my_company’ , I got the correct result. What’s wrong please? class AccountPayment(models.Model): _inherit = "account.payment" @api.model def get_company(self): if self.move_type ..

Read more

I want to make the button ‘Reset To Draft’ in model ‘account.move’ visible only for ‘account.group_account_invoice’ that means , it should be invisible for group ‘account.group_account_manager’, here is my code ; <record id="account_move_form_view_extend" model="ir.ui.view"> <field name="name">account.move.form.view.extend</field> <field name="model">account.move</field> <field name="inherit_id" ref="account.view_move_form"/> <field name="arch" type="xml"> <xpath expr="//header//button[@name=’button_draft’]" position="attributes"/> <attribute name="groups">account.group_account_manager</attribute><xpath/> <attribute name ="attrs=">{‘invisible’ : [(‘show_reset_to_draft_button’, ‘=’, ..

Read more

I added a field (type char) in model ‘account.payment.register’, <field name="inherit_id" ref="account.view_account_payment_register_form"/> <field name="arch" type="xml"> <xpath expr="//group/field[@name=’communication’]" position="after"> <field name="company" attrs="{‘invisible’: [(‘journal_type’, ‘=’, ‘cash’)], ‘required’: [(‘journal_type’, ‘=’, ‘bank’)]}"/> </xpath> </field> </field> I want to add default value in field ‘Company’ according to these conditions: if it is an ‘outbound’ payment , then Company must get ..

Read more

I want to use pushmenu in portal view.I use adminlte.js for pushmenu but not working .Here is my code. <template name=”Sidebar” id=”portal.portal_sidebar”> <t t-call=”binhex_dashboard_layout.layout2″> <div class=”container o_portal_sidebar”></div> <div class=”oe_structure mb32″ id=”oe_structure_portal_sidebar_1″/> </t> </template> <template id=”layout2″> <meta name=”viewport” content=”width=device-width, initial-scale=1″/> <!– Google Font: Source Sans Pro –> <link rel=”stylesheet” href=”https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&amp;display=fallback”/> <!– Font Awesome –> <link rel=”stylesheet” ..

Read more