qweb

Inherit field from one model to another model - Odoo v9 Community

独自空忆成欢 提交于 2020-02-01 09:18:26
问题 I'm trying to add a field from a table, into another table, through a module. Specifically, trying to inherit a field from product.product , the price field, to add it into stock.move model. So, I've created a model into this new module I'm making. Like this: # -*- coding: utf-8 -*- from openerp import models, fields, api import openerp.addons.decimal_precision as dp class product(models.Model): _inherit = 'product.product' _rec_name = 'price_unidad' price_unidad = fields.One2many('product

How to refresh a particular div in a page that contains a dashboard?

杀马特。学长 韩版系。学妹 提交于 2020-01-15 07:43:05
问题 I work with OpenEprp 7.0 and i want to refresh a particular div in a page that contains a dashboard. the code of the first part of the dashboard is the following: <t t-if="number === 2"> <table style="margin-left:360px;margin-top:0px;margin-bottom:0px;"> <tr> <td style="text-align:left;font-size:12px;"><b>Jusqu'au mois courant:</b></td> <td> <input type="radio" id="radio_budget_cumulee_jusque_mois_courant" value="courant" name="radio_budget_cumulee" /> </td> </tr> <tr> <td style="text-align

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

Why does my Odoo 9 custom Qweb report with CSS is not working?

谁说我不能喝 提交于 2020-01-07 04:18:07
问题 I'm creating a new report on Odoo 9 which uses css styles in order to position text over a background image. The image is in background and occupies the full A4 page without any margins. In html, it's working fine. However, when I print the report to PDF, I have blank margins at left and right, and the text goes below the background image. It seems that the CSS rules are not applied. Do you find any solution for making it working in PDF? Here is my report: <template id="sub_proposal"> <style

Invalid view definition - Odoo v9 community

删除回忆录丶 提交于 2020-01-05 03:57:12
问题 I manage to find a way to have the product price on stock.picking , but now I have a view error. This is my model: from openerp import models, fields, api import openerp.addons.decimal_precision as dp class StockPicking(models.Model): _inherit = 'stock.picking' product_id = fields.Many2one("product.product", "Product") price_unity = fields.Float(string="Precio", store=True, readonly=True, related="product_id.lst_price") Now, the offending code in my view: <record id="view_stock_picking_form"

How to set PDF name in qWeb report, Odoo?

和自甴很熟 提交于 2019-12-30 08:40:10
问题 I'm making reports using qWeb in Odoo 8. Those generated PDF files are saved with a "default" name. I would like to set a specific name to every generated file (not after file was saved, but in "generation" time). Is that possible? If it is, how to do it? Thanks in advance. 回答1: In Odoo 8 you can patch the method report_download of addons/report/controllers/main.py like below (between FIX START and END). It will then use the code for the attachment attribute in the report action definition.

Report formatting not working in Odoo 8 Qweb Reports

别说谁变了你拦得住时间么 提交于 2019-12-25 03:38:07
问题 All the default reports and the new reports that I am generating are being printed towards the left of the page. This only happens when the report is generated in PDF format. In HTML format the report is displayed fine. I did some research and found that downgrading the wkhtmltox to version 0.21.1 would solve this problem. I did that, but the problem still persists. 回答1: There is one small configuration Go to settings --> Technical --> Parameters --> System Parameters --> Click on Create and

Picture in odoo qweb report

独自空忆成欢 提交于 2019-12-24 14:17:28
问题 I'd like show a picture in my qweb report. When I copy i.e. from the website_quote modul to my xml file this line: <img src="/website_quote/static/src/img/partner_icon_01.png"/> it works fine, but if I copy the partner_icon_01.png file to my module directory, and change the line: <img src="/my_module/static/src/img/partner_icon_01.png"/> , the picture doesn't appear in my report. Any help would be appreciated. Cheers: Janos 回答1: Try the following code and check <img class="img img-responsive"

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

夙愿已清 提交于 2019-12-24 06:21:05
问题 I am trying to customise the calendar view of the calendar.event model, whose code is: <record id="view_calendar_event_calendar" model="ir.ui.view"> <field name="name">calendar.event.calendar</field> <field name="model">calendar.event</field> <field name="priority" eval="2"/> <field name="arch" type="xml"> <calendar string="Meetings" date_start="start" date_stop="stop" date_delay="duration" all_day="allday" display="[name]" color="color_partner_id" attendee="partner_ids" avatar_model="res

Odoo 10 - Conditional hide/show of kanban view image

无人久伴 提交于 2019-12-23 05:32:19
问题 I am trying to hide the product image based on the status of default_code field. If default_code is empty, I want to hide it. If not, I want to show image. So far I have modified the kanban view like this: <record id="conditional_product_kanban_view" model="ir.ui.view"> <field name="name">Kanban Extended View</field> <field name="inherit_id" ref="product.product_template_kanban_view"/> <field name="model">product.template</field> <field name="arch" type="xml"> <xpath expr="//div[@class='o