odoo-9

cannot fiend view based on access rights

微笑、不失礼 提交于 2019-12-13 04:08:34
问题 <record id="view_res_partner_pricelist" model="ir.ui.view"> <field name="name">view.res.partner.pricelist.form</field> <field name="model">res.partner</field> <field name="type">form</field> <field name="inherit_id" ref="product.view_partner_property_form" /> <field name="context">{'readonly_by_pass': True}</field> <field name="arch" type="xml"> <xpath expr="//page[@name='accounting']" position="replace"/> </field> </record> this is my view where I hide tab Accounting, and it works ok if the

Disable one2many popup odoo 8

梦想与她 提交于 2019-12-13 01:13:55
问题 Good Day! is it possible to disable pop of tree view in the form. I tried no_open="True" readonly="1" edit="False" both on field and tree view but didn't worked. <field name="payment_line"> <tree editable="top" create="false"> <field name="product"/> <field name="description"/> <field name="account"/> <field name="unit"/> <field name="qty"/> <field name="amount"/> <field name="total"/> </tree> </field> 回答1: I've coped with the same issue in odoo 10, my one2many treeview always make a popup on

odoo 9 migrate binary field db to filestore

删除回忆录丶 提交于 2019-12-12 05:19:54
问题 Odoo 9 custom module binary field attachment=True parameter added later after that new record will be stored in filesystem storage. Binary Fields some old records attachment = True not used, so old record entry not created in ir.attachment table and filesystem not saved. I would like to know how to migrate old records binary field value store in filesystem storage?. How to create/insert records in ir_attachment row based on old records binary field value? Is any script available? 回答1: You

Odoo hide breadcrumble

青春壹個敷衍的年華 提交于 2019-12-12 04:06:35
问题 I am trying to hide breadcrumb like in this example: My code: my_model_view.xml <template id="assets_frontend" name="my_model assets" inherit_id="website.assets_frontend" > <xpath expr="." position="inside"> <link rel='stylesheet' href="/my_model/static/src/css/style.css"/> </xpath> </template> </data> style.css .breadcrumb > li { display: none !important; } .breadcrumb > .active { display: none !important; } and openerp .py: "data": [ "my_model_view.xml", ], After that I restarted servise,

TypeError: object of type 'bool' has no len() - Odoo v9

寵の児 提交于 2019-12-12 03:38:47
问题 I'm trying to connect to a webservice through an Odoov9 module. This is my class: class invoice(models.Model): _inherit = "account.invoice" @api.multi def send_xml_file(self): # haciendolo para efacturadelsur solamente por ahora host = 'https://www.efacturadelsur.cl' post = '/ws/DTE.asmx' # HTTP/1.1 url = host + post _logger.info('URL to be used %s' % url) # client = Client(url) # _logger.info(client) _logger.info('len (como viene): %s' % len(self.sii_xml_request)) response = pool.urlopen(

How to increment or decrement a recordset? odoo9

眉间皱痕 提交于 2019-12-12 03:18:57
问题 My record set is items = product.pricelist.item(4,3,2) qty_in_product_uom is passed by the user( 4= min_quantity 500, 3= 250, 2= 100 ) for rule in items: if rule.min_quantity and qty_in_product_uom < rule.min_quantity: print inside rule.id now i want such a function that selects the next id if the condition is true eg. if user passes qty_in_product_uom say 110 then my above if condition will give id=2 in this case i want id=3 if id=3 then answer will be id=4 and if id=4 select id=4 As

odoo 9 - Field does not exist

时光总嘲笑我的痴心妄想 提交于 2019-12-11 13:53:09
问题 follow the documentation Odoo 9.0, I created a new module which I created a new model as follows: models.py # -*- coding: utf-8 -*- from openerp import models, fields, api class payModel(models.Model): _name = 'payModel.payModel' _inherit = 'hr.employee' num_CN = fields.Char("CN°") and my form view: <record model="ir.ui.view" id="payModel_form_view"> <field name="name">payModel.num_CN</field> <field name="model">hr.employee</field> <field name="inherit_id" ref="hr.view_employee_form"/> <field

ParseError: “Invalid view definition”

独自空忆成欢 提交于 2019-12-11 13:33:44
问题 I am starting developing openerp modules. What could be wrong with the following code: custmercas.py # encoding: utf-8 from openerp.osv import osv,fields class cas_customercas(osv.osv): _name = 'cas.customercas' _columns = { 'cas_lastname':fields.char('اللقب', size=50, required=True, readonly=False), 'cas_firstname':fields.char('الإسم', size=50, required=True, readonly=False), #TODO : import time required to get currect date 'cas_datenaiss': fields.date('تاريخ الولادة'), 'cas_lieunaiss'

How to add a filter to selection field in odoo

随声附和 提交于 2019-12-11 10:56:22
问题 I need to add a filter to a selection field in odoo.. roomuser = fields.Selection([('stpi', 'Belongs to Park'),('Incubation', 'Belongs to Incubation companies'),('both', 'Belongs to Park& Incubation companies')],'Room Assignment',required=True) roomType = fields.Selection([('meeting','Meeting Room'),('discussion','Discussion Room'),('auditorium','Auditorium'),('board','Board Room')],required=True) Here i need to filter the value of roomType based on the value of roomuser. Suppose roomuser

trying to show chessboard js in odoo form widget, no error no pieces

牧云@^-^@ 提交于 2019-12-11 06:55:29
问题 Hi i´m trying to show chessboardjs on a form view in odoo backend, I finally make the widget to show the board, but the pieces are hidden, I don´t know why because seems to work fine, except for the pieces. If I use dragable : true in the options and move a hidden piece then the board is rendered with all the pieces. do I´m missing something, on my code that the chessboard its not rendered well?? here is mi widget code: (function (instance) { var _t = instance.web._t, _lt = instance.web._lt;