odoo-9

Odoo Warning “Perhaps a module was partially removed or renamed”

随声附和 提交于 2019-12-06 03:23:11
When I run odoo server, I got this warning message below. WARNING dietfacts2 openerp.modules.loading: Model product.nutrientitem is declared but cannot be loaded! (Perhaps a module was partially removed or renamed) I know that it shows this warning message because I created the model name but then I changed it afterward. The model was saved to postgres DB. I tried to delete the table in DB but unsuccessful. dietfacts2=# delete from ir_model where model = 'product.nutrientitem'; ERROR: null value in column "model" violates not-null constraint DETAIL: Failing row contains (1011, 2017-02-20 04:15

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

拜拜、爱过 提交于 2019-12-04 20:33:55
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.product','price', string="Precio", readonly=True) class StockMove(models.Model): _inherit = 'stock.move'

Could not display Selected Image in Odoo 9

两盒软妹~` 提交于 2019-12-04 05:54:49
问题 I have problem with image loading in product.template form view. When i upload a new image it is uploading and displaying correctly in product kanban view , but in product form view it is giving me error Could not display Selected Image as displaying in attached image Someone please tell me about why it is happening. I'll be very thankful .. 来源: https://stackoverflow.com/questions/37987347/could-not-display-selected-image-in-odoo-9

ERROR openerp.addons.website.models.ir_http: 500 Internal Server Error: after logout from odoo

给你一囗甜甜゛ 提交于 2019-12-04 02:01:47
问题 I am using odoo v9 community in Ubuntu 14.04 installation is perfectly done after all works. but when i install website module of odoo and after i log out from odoo it show following error: "500: Internal Server Error" and my log: "Traceback (most recent call last): File "/opt/odoo96/addons/website/models/ir_http.py", line 242, in _handle_exception response = super(ir_http, self)._handle_exception(exception) File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception

Can we able to inherit and change the noupdate=“1” in odoo?

邮差的信 提交于 2019-12-03 16:14:04
Is it possible to inherit from one xml and to change its updatable. I tried to inherit "Check Action Rules" to change the "interval_number" from 4 to 1 hours. To make it run every single hour. I don't think it may work because of noupdate="1". Anyone have any idea about this? Yes you can change the noupdate file by the help of hook. In the manifest file next to data add 'post_init_hook': 'post_init_hook', create hooks.py file def post_init_hook(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) orginalxml=env.ref('module.external id') orginalxml.write({'field_name_to_inherit':value, })

Could not display Selected Image in Odoo 9

帅比萌擦擦* 提交于 2019-12-02 09:01:09
I have problem with image loading in product.template form view. When i upload a new image it is uploading and displaying correctly in product kanban view , but in product form view it is giving me error Could not display Selected Image as displaying in attached image Someone please tell me about why it is happening. I'll be very thankful .. 来源: https://stackoverflow.com/questions/37987347/could-not-display-selected-image-in-odoo-9

ERROR openerp.addons.website.models.ir_http: 500 Internal Server Error: after logout from odoo

泄露秘密 提交于 2019-12-01 12:54:42
I am using odoo v9 community in Ubuntu 14.04 installation is perfectly done after all works. but when i install website module of odoo and after i log out from odoo it show following error: "500: Internal Server Error" and my log: "Traceback (most recent call last): File "/opt/odoo96/addons/website/models/ir_http.py", line 242, in _handle_exception response = super(ir_http, self)._handle_exception(exception) File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception return request._handle_exception(exception) File "/opt/odoo96/openerp/http.py", line 738, in _handle

How to change default page of odoo with other webcontroller odoo 9.0

北城以北 提交于 2019-12-01 11:30:40
问题 I have created a new webcontroller with specific functionality and I want this webcontroller as a home page of odoo 9.0 . I have tried to put @http.route('/', type='http', auth='public', website=True) in main.py of my custom webcontroller file as a route, but still it redirect to default home page of odoo. But if I put url as @http.route('/index', type='http', auth='public', website=True) , the page is working fine. So my question is what is best way to replace existing odoo home page with

custom report through python odoo 9

给你一囗甜甜゛ 提交于 2019-12-01 09:23:27
How to pass multiple module data to a QWeb report? Is there something similar to passing dictionary in rendering html from controller? class account(model.Models): _name = 'account.main' name = fields.Char() class accountSub(model.Models): _name = 'account.sub' name = fields.Char() class PrintWizard(model.Models): _name = 'print.report' account = fields.Many2one('erp.account') @api.multi def print_report(self): ctx = self.env.context.copy() ctx.update({'domain':[('name','=',self.account.name)]}) self.with_context(ctx) return {'name': 'Report', 'type': 'ir.actions.report.xml', 'report_name':

custom report through python odoo 9

眉间皱痕 提交于 2019-12-01 06:37:25
问题 How to pass multiple module data to a QWeb report? Is there something similar to passing dictionary in rendering html from controller? class account(model.Models): _name = 'account.main' name = fields.Char() class accountSub(model.Models): _name = 'account.sub' name = fields.Char() class PrintWizard(model.Models): _name = 'print.report' account = fields.Many2one('erp.account') @api.multi def print_report(self): ctx = self.env.context.copy() ctx.update({'domain':[('name','=',self.account.name)