odoo-10

How do I hide navbar and root-menu at sidebar from Odoo's web-backend module?

戏子无情 提交于 2020-02-29 10:06:09
问题 I am working on POS Point of sales module, I am opening an Iframe in mobile device to show POS screen but I wanted to hide navbar and sidebar of root-menu items, so normal users can use only POS dashboard. I have installed POS_Mobile snippet to make it responsive on mobile phones and there I tried writting JS code to hide it. but it's opening only when I start any POS-session by clicking on resume . I tried as: In file pos_mobile_template.xml , adding JQuery as: if ($(window).width() < 768) {

Add colurs to statusbar in odoo10

北城余情 提交于 2020-01-24 10:23:01
问题 Need to add colour in statusbar in odoo10 which available openerp versions eg: <field name = 'state' widget=statusbar clickabe= 'True' statubar_colors='{"new": "blue"}'> How add colours in statusbar in odoo10 Need different color for different states in status bar For eg: Blue color for draft,green for progress, red for cancel 回答1: There is two solution for your requirement: If you need this behavior for only one Form view, Is simple as this: just add style tag to beat the css selector

Add colurs to statusbar in odoo10

爱⌒轻易说出口 提交于 2020-01-24 10:22:25
问题 Need to add colour in statusbar in odoo10 which available openerp versions eg: <field name = 'state' widget=statusbar clickabe= 'True' statubar_colors='{"new": "blue"}'> How add colours in statusbar in odoo10 Need different color for different states in status bar For eg: Blue color for draft,green for progress, red for cancel 回答1: There is two solution for your requirement: If you need this behavior for only one Form view, Is simple as this: just add style tag to beat the css selector

insert into one To many and many To one fields

拥有回忆 提交于 2020-01-15 10:34:29
问题 I am using android odoo-mobile framework and this is how i am inserting a record online with the help of createRecord() now I want to insert record in manyTomany and oneTomany field in odoo database.I dont know how to insert it online.please help me. Thanks! this is how i am inserting/creating a new record online. protected OdooResult doInBackground(Void... voids) { ORecordValues values = new ORecordValues(); values.put("partner_id", Integer.parseInt(resPartnerArrayList.get(idc).get_id()));

Odoo 10 - Javascript Query to a Model

纵然是瞬间 提交于 2020-01-15 09:24:08
问题 I'm doing: var callback = new $.Deferred(); new Model('pos.order').query(['invoice_id']).filter([['id', '=', '100']]) .first().then(function (order) { if (order) { callback.resolve(order); } else { callback.reject({code:400, message:'Missing Order', data:{}}); } }); It works fine, and returns an Order object. But my issue is that i want to access the relation objects (many2many, many2one), but the order object has only the ID's of his relations. For example if i want to access the company or

How to display your own kanban card in calendar view in Odoo 10?

天涯浪子 提交于 2020-01-14 04:52:47
问题 I have just asked this: How to display your own kanban card in calendar view in Odoo 11? I thought I was working with version 11 but it was 10, that is the reason why templates tag did not work. And of course I had to do it for version 10. The problem is that both versions are quite different at this point, and templates tag does not exist. MY PURPOSE I want to show a customised card in a calendar view ( view_calendar_event_calendar , from the calendar.event model). What templates tag does

Not able to add the group sale_manger to action_invoice_cancel button

烂漫一生 提交于 2020-01-06 14:33:42
问题 I want to add sale_manager group to the action_invoice_cancel (Invoice Cancel) button in the customer invoice . My aim is to see that button only for the users in the sale_manager. I tried like this : Code <?xml version="1.0" encoding="utf-8"?> <odoo> <record id="orchid_invoice_cancel_request_inherit" model="ir.ui.view"> <field name="name">invoice_cancel_request</field> <field name="model">account.invoice</field> <field name="inherit_id" ref="account.invoice_form"/> <field name="arch" type=

Odoo How to create a new model for Product Master with all the data in the product master

徘徊边缘 提交于 2020-01-06 06:01:07
问题 I want to create a separate view for Product Master.I created a new model and tried like this.But when I checked in database no data is present in my new model. Code class QuotationCreation(models.Model): _name='quotation.creation' xn_product_id = fields.Many2one('product.template') product=fields.Char(related = 'xn_product_id.name',string='Product') How can I tranfer all the data from product master to this model. I want to create a new model with existing data.How can I do that ? Thanks in

How to get computed field value in search orm in odoo

[亡魂溺海] 提交于 2020-01-06 05:42:46
问题 I have defined a computed field with compute method in odoo 10 and now i want to get its value in search orm but its value remain False, and when I tried store=True its value not being changed. if anyone has solution please let me know, I'll highly thankful. My code is: balance_amount = fields.Float(string="Balance Amount", compute='_compute_loan_amount') @api.one def _compute_loan_amount(self): total_paid = 0.0 for loan in self: for line in loan.loan_lines: if line.paid: total_paid += line

How to generate a report in excel (xls, xlsx) format on ODOO?

南楼画角 提交于 2019-12-30 10:23:09
问题 In purchase module, I want to generate the details which is being printed in the purchase order button as a pdf report. My requirement is how to print the report in excel format in odoo 10? 回答1: You can export the current tree view as an excel file with this module: web_export_view Or you can build your own excel report with this other modules: report_xls report_xlsx There are modules that already use the report_xls module, but you can look for them in the Odoo Apps or in the OCA repository