odoo-9

How to get computed field value in search orm in odoo

[亡魂溺海] 提交于 2020-01-06 05:42:46
问题 I have defined a computed field with compute method in odoo 10 and now i want to get its value in search orm but its value remain False, and when I tried store=True its value not being changed. if anyone has solution please let me know, I'll highly thankful. My code is: balance_amount = fields.Float(string="Balance Amount", compute='_compute_loan_amount') @api.one def _compute_loan_amount(self): total_paid = 0.0 for loan in self: for line in loan.loan_lines: if line.paid: total_paid += line

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"

Odoo ParseError: "Invalid view definition Error detail : Model not found

人走茶凉 提交于 2020-01-03 05:27:13
问题 Please since yesterday I'm trying to install a module on Odoo 9 but I got this error: Odoo ParseError: "Invalid view definition Error detail : Model not found: employee.register Context of error : View `employee.form` [view_id: 547, xml_id: n/a, model: employee.register, parent_id: n/a] None" while parsing /opt/odoo/addons/lci_gestpaie_tic/views/employee.xml:7, near <record model="ir.ui.view" id="employee_form"> <field name="name">employee.form</field> <field name="model">employee.register<

odoo 9 theme installed in addson are missing from app

余生长醉 提交于 2019-12-25 08:15:34
问题 I install odoo on a virtualbox using vagrant (ubuntu/trusty32) I set up odoo using the following: vagrant init ubuntu/trusty32 in Vagrantfile config.vm.network "private_network", ip: "55.55.55.7" vagrant reload vagrant ssh sudo su wget -O - https://nightly.odoo.com/odoo.key | apt-key add - echo "deb http://nightly.odoo.com/9.0/nightly/deb/ ./" >> /etc/apt/sources.list apt-get update && apt-get install odoo sudo -u postgres createuser -s odoo found the addons directory using: # cd /etc/odoo/ #

dynamicly hide fields and rows in tree view odoo 9

浪子不回头ぞ 提交于 2019-12-25 07:32:56
问题 I have model to store training results for athletes and tree view to insert results from model code is : class GeneralFitnessDetails(Model): _name = 'general_fitness_details' generalFitnessDetails = Many2one("general_fitness") player = Many2one('player') exercise = Many2one("exercise") exercise_state = Selection([('by_reps', 'By Reps'), ('by_time', 'By Time'), ('by_distance', 'By Distance'), ('by_weight', 'By Weight')]) reps = Integer(string='Reps') time_sec = Integer(string='Seconds') weight

How to bypass ODOO security rules given by administrator?

六眼飞鱼酱① 提交于 2019-12-25 01:52:59
问题 how to view settings which is not allowed to view for users in ODOO, for studying purpose only i.e., how to bypass the access rights 回答1: Simply you cannot this is a framework develloped with qualified community. If you can do that why use it at all!!!? The security in odoo is one of the things that make odoo, in the top framewoK league. 来源: https://stackoverflow.com/questions/47193832/how-to-bypass-odoo-security-rules-given-by-administrator

how to print the product variants in report sale order

十年热恋 提交于 2019-12-24 22:55:09
问题 I want to print the variants product as a description of the product in report sale order. For that i have added a new tag th description and i have used span t-esc="', '.join([x.attribute_id for x in o.order_line.product_id.product_tmpl_id.attribute_line_ids])"/ but it shows error QWebException: "sequence item 0: expected string, product.attribute found" while evaluating "', '.join([x.attribute_id for x in doc.order_line.product_id.product_tmpl_id.attribute_line_ids])" .Any help please ? <t

Odoo v9 domain filter with value user.id throws error that user is not defined

只谈情不闲聊 提交于 2019-12-24 20:52:44
问题 We have an instance of V9 odoo running. Anywhere that a domain filter is used with an evaluated value, an error is thrown. As an example, on the res.users searchview I have created a simple domain filter: [('id', '=', user.id)] When applying this filter the following error is thrown: Error: Failed to evaluate search criterions: {"code":400,"message":"Evaluation Error","data":{"type":"local_exception","debug":"Local evaluation failure\nNameError: name 'user' is not defined\n\n{\"domains\":[[],

How to pass value with onchange one2many variable in odoo?

爱⌒轻易说出口 提交于 2019-12-24 08:47:08
问题 <field name="salary_month"/> <field name="earning_type_id"> <tree editable="bottom"> <field name="earnings_type" /> <field name="based_on" on_change="calc_amount(based_on,salary_month)" /> <field name="amount" /> <field name="total" /> </tree> </field> In the above condition I have two variables one is salary_month another one is one2many variable earning_type_id . While on change inside earning_type_id I need to pass the value of salary_month . Its shows undefined variable salary_month .

Odoo onchange not working correctly

时光总嘲笑我的痴心妄想 提交于 2019-12-24 02:22:16
问题 I'm inherit purchase.order.line and try change value in field. For product_qty I can change value but for price_unit I can't change value. My custom .py file: class PurchaseOrderLine(models.Model): _inherit = 'purchase.order.line' @api.onchange('product_id') def my_fucn(self): for rec in self: rec.product_qty = 10 #WORKING rec.price_unit = 1 #NOT WORKING Maybe is problem because in original purcahase.py odoo file also have @api.onchange('product_id'). Any solution? 回答1: You can't predict