odoo

OColumn with odoo functional in Odoo Mobile Framework not working

…衆ロ難τιáo~ 提交于 2020-07-23 06:31:23
问题 I have this OColumn partner_name = new OColumn("Partner", OVarchar.class).setLocalColumn(); in my sale order model class with odoo functional method that depends on partner_id column. I would like to search the partner_name in my list using that column partner_name, but I'm a little confused on how to achieve this. Please needed some help. This is what I've tried: BaseFragment @Override public void onViewBind(View view, Cursor cursor, ODataRow row) { getPartnerIds(row); OControls.setText(view

How to debug odoo in docker?

一曲冷凌霜 提交于 2020-07-22 05:07:08
问题 I am not able to debug odoo in docker container. I am using Visual Studio Code and I have the following launch.json configuration. { "version": "0.2.0", "configurations": [ { "name": "Odoo 12", "type": "python", "request": "launch", "stopOnEntry": false, "pythonPath": "${config:python.pythonPath}", "program": "/usr/bin/odoo", "args": [ "--config=/etc/odoo/odoo.conf" ] } ] } Everytime I start a debugger, this error occurs: Exception in thread odoo.service.httpd: Traceback (most recent call

image in excel report

百般思念 提交于 2020-07-10 00:31:30
问题 Help, How can i print image excel report? Please, help me? I use xlsxwriter. Example of xlsxwriter This is my code: product_image = product_product.product_tmpl_id.image imgdata = base64.b64decode(product_image) image = Image.open(io.BytesIO(imgdata)) # imgdata = base64.b64decode(product_image) # image = io.BytesIO(imgdata) print type(image) sheet.insert_image(rowx, 12, str(image)) The error is: warn("Image file '%s' not found." % force_unicode(filename)) How to solve? My goal is print

image in excel report

拟墨画扇 提交于 2020-07-10 00:31:07
问题 Help, How can i print image excel report? Please, help me? I use xlsxwriter. Example of xlsxwriter This is my code: product_image = product_product.product_tmpl_id.image imgdata = base64.b64decode(product_image) image = Image.open(io.BytesIO(imgdata)) # imgdata = base64.b64decode(product_image) # image = io.BytesIO(imgdata) print type(image) sheet.insert_image(rowx, 12, str(image)) The error is: warn("Image file '%s' not found." % force_unicode(filename)) How to solve? My goal is print

“relation already exists” after adding a Many2many field in odoo

為{幸葍}努か 提交于 2020-07-08 12:27:52
问题 I've defined the following two odoo ORM models: class Weekday(models.Model): _name = 'ludwik.offers.weekday' name = fields.Char() class Duration(models.Model): _name = 'ludwik.offers.duration' weekday = fields.Many2many('ludwik.offers.weekday') When I try to start odoo I get the following message: ProgrammingError: relation "ludwik_offers_duration_ludwik_offers_weekday_rel_ludwik_offers_" already exists Also, when I change the _name properties in models, the problem persists (of course the

“relation already exists” after adding a Many2many field in odoo

◇◆丶佛笑我妖孽 提交于 2020-07-08 12:27:08
问题 I've defined the following two odoo ORM models: class Weekday(models.Model): _name = 'ludwik.offers.weekday' name = fields.Char() class Duration(models.Model): _name = 'ludwik.offers.duration' weekday = fields.Many2many('ludwik.offers.weekday') When I try to start odoo I get the following message: ProgrammingError: relation "ludwik_offers_duration_ludwik_offers_weekday_rel_ludwik_offers_" already exists Also, when I change the _name properties in models, the problem persists (of course the

How to load css based on group odoo 13

落花浮王杯 提交于 2020-06-28 05:32:09
问题 I want to load a different stylesheet based on user group (or if possible user selected company company) This is my code <odoo> <template id="id" name="your name" inherit_id="website.assets_backend"> <xpath expr="." position="inside"> <attribute name="attrs">{'invisible': 1}</attribute> <link href="/n_hesaby_subscription_manager/static/src/css/style.css" rel="stylesheet" type="text/css"/> </xpath> </template> </odoo> Thank you for your help can the file be scss 来源: https://stackoverflow.com

Why the Create button in the main form does not work?

僤鯓⒐⒋嵵緔 提交于 2020-06-23 10:38:29
问题 When I click on the "Attach PDF" button, the list form opens, but the "Create" button does not work. But when I go to the list form from the main menu, then everything is fine. What is the problem? model.py from odoo import models, fields, api class AttachPDF(models.Model): _name = 'attach.pdf' product_id = fields.Many2one('product.template', string='Product', required=True) product_attribute_value_id = fields.Many2one('product.attribute.value', string='Attribute Value', required=True,

Why the Create button in the main form does not work?

家住魔仙堡 提交于 2020-06-23 10:34:33
问题 When I click on the "Attach PDF" button, the list form opens, but the "Create" button does not work. But when I go to the list form from the main menu, then everything is fine. What is the problem? model.py from odoo import models, fields, api class AttachPDF(models.Model): _name = 'attach.pdf' product_id = fields.Many2one('product.template', string='Product', required=True) product_attribute_value_id = fields.Many2one('product.attribute.value', string='Attribute Value', required=True,

Why the Create button in the main form does not work?

江枫思渺然 提交于 2020-06-23 10:32:25
问题 When I click on the "Attach PDF" button, the list form opens, but the "Create" button does not work. But when I go to the list form from the main menu, then everything is fine. What is the problem? model.py from odoo import models, fields, api class AttachPDF(models.Model): _name = 'attach.pdf' product_id = fields.Many2one('product.template', string='Product', required=True) product_attribute_value_id = fields.Many2one('product.attribute.value', string='Attribute Value', required=True,