odoo-view

Odoo - Combine two fields heading in one2many

久未见 提交于 2019-12-08 07:54:52
问题 I am working with odoo 10-e. I created custom module and in that module i want to show one2many records like this ---------------- | Long Cell | ---------------- | 1 | 2 | ---------------- right now by default each column have its own heading which is actually string= value. I want to override default behavior. 回答1: First create the xml file which extends the ListView Template like this to add colspan feature in base list view template. colspan.xml <?xml version="1.0" encoding="UTF-8"?>

Odoo - View customization with colspan or may be col

不羁的心 提交于 2019-12-08 04:45:03
问题 I am using odoo 10-e . Earlier i asked a question how can we merge two or multiple header to show one header against multiple fields Combine two fields heading in one2many . So answer was good and it worked but now i want to do some more customization in the one2many tree view in form. I want something like this. I want borders also in rows but for specific columns and also sub heading for only once per column. I tried to add div in odoo view but its not supported. I also tried to add it

Set and get store data Odoo with TransientModel

ε祈祈猫儿з 提交于 2019-12-04 14:32:26
问题 I'm trying to store config data in odoo, I need to store 3 reference to 'account.journal'. The model is created in database, the view is shown in configuration base menu, the data is store in database when I push the APPLY button BUT when I reload the menu the data is not shown The code use: from openerp import fields, models, osv, api, _ class Configuration(models.TransientModel): _inherit = 'res.config.settings' _name = 'transporte_carta_de_porte.config.settings' ft_mercaderia = fields

Set and get store data Odoo with TransientModel

走远了吗. 提交于 2019-12-03 08:57:39
I'm trying to store config data in odoo, I need to store 3 reference to 'account.journal'. The model is created in database, the view is shown in configuration base menu, the data is store in database when I push the APPLY button BUT when I reload the menu the data is not shown The code use: from openerp import fields, models, osv, api, _ class Configuration(models.TransientModel): _inherit = 'res.config.settings' _name = 'transporte_carta_de_porte.config.settings' ft_mercaderia = fields.Many2one( 'account.journal',string='Debito ft mercaderia', help="Diario de ajuste al transportista por

Odoo throws a MissingError On treeview Second line record

百般思念 提交于 2019-12-02 08:08:01
How can i solve this error Odoo throws a MissingError on TreeView Second line button when clicked . The first Record line works but i need such that for each record on the tree the code below will be able to pass the contexts and open the appropriate view . Kindly assist Here is the code called on the button @api.multi def action_four_weeks_schedule_form(self): self.ensure_one() res = {} ids = self._ids cr = self._cr uid = self._uid context = self._context.copy() for id in self.browse(self.ids): print 'id in ++++ ' , id order_obj = self.pool.get('ratecard.multiple').browse(cr,uid,ids)[0]

Set default value while creating record from one2many field - odoo

一世执手 提交于 2019-12-01 01:57:43
I want to set default value for multiple fields while creating records from one2many field, in that default value will be taken from the parent model. Odoo Model Structure class purchase_order(models.Model): _inherit='purchase.order' cash_forecast_ids = fields.One2many(comodel_name='cash.forecast', inverse_name='purchase_order_id', string='Payment Schedules') class cash_forecast(models.Model): _name='cash.forecast' purchase_order_id = fields.Many2one(comodel_name='purchase.order', string='PO', select=True, copy=False) foreign_currency_amount = fields.Float("Foreign Currency Amount", copy=False

How to add css files to a custom module in Odoo?

梦想与她 提交于 2019-11-29 02:27:46
How can I add css files to my custom module to change xml views? I found this post but the solution is not working. I want modify all the elements from my module, such as forms, lists, inputs, etc. You must create the css file in this route: /module_name/static/src/css/module_name.css . Example of file: .openerp .classname{ margin: 12px 0px 12px 0px; } Create the file /module_name/views/module_name.xml with this content: <?xml version="1.0"?> <openerp> <data> <template id="assets_backend" name="module_name assets" inherit_id="web.assets_backend"> <xpath expr="." position="inside"> <link rel=

How to send an email from a button located in the action dropdown of an Odoo 11 form?

别说谁变了你拦得住时间么 提交于 2019-11-28 14:33:39
I am just a newbie in Odoo. I am creating a custom module for Odoo 11. I want to add a new link in hr.payslip in hr_payroll module . So when admin will navigate to an individual Payslip, in the action I want to add a new option called Email Payslip . When this is clicked, it will send an email to the employee. So to achieve this I have made my custom module named as email payslip. The code is like this: init .py from . import models manifest .py { 'name': 'Email Payslip', 'summary': """This module will send email with payslip""", 'version': '10.0.1.0.0', 'description': """This module will send

How to add css files to a custom module in Odoo?

一个人想着一个人 提交于 2019-11-27 16:43:18
问题 How can I add css files to my custom module to change xml views? I found this post but the solution is not working. I want modify all the elements from my module, such as forms, lists, inputs, etc. 回答1: You must create the css file in this route: /module_name/static/src/css/module_name.css . Example of file: .openerp .classname{ margin: 12px 0px 12px 0px; } Create the file /module_name/views/module_name.xml with this content: <?xml version="1.0"?> <openerp> <data> <template id="assets_backend

How to send an email from a button located in the action dropdown of an Odoo 11 form?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 08:45:08
问题 I am just a newbie in Odoo. I am creating a custom module for Odoo 11. I want to add a new link in hr.payslip in hr_payroll module . So when admin will navigate to an individual Payslip, in the action I want to add a new option called Email Payslip . When this is clicked, it will send an email to the employee. So to achieve this I have made my custom module named as email payslip. The code is like this: init .py from . import models manifest .py { 'name': 'Email Payslip', 'summary': """This