odoo-12

How do i fix ValueError: dictionary update sequence element #0 has length 1; 2 is required odoo 12?

◇◆丶佛笑我妖孽 提交于 2020-02-25 06:46:25
问题 I am trying to build a custom module and i have run into the following error, i added the models to 'depends':[] and ended up with KeyError: 'ir.actions.views' when i remove the models from the 'depends':[] , i get the error below: 2020-02-15 06:58:28,956 8372 ERROR mask_agro odoo.modules.registry: Failed to load registry Traceback (most recent call last): File "/opt/odoo/odoo/odoo/modules/registry.py", line 60, in __new__ return cls.registries[db_name] File "/opt/odoo/odoo/odoo/tools/func.py

How to create a record without saving it in database

半城伤御伤魂 提交于 2020-02-03 16:22:05
问题 I'm using the Inventory addon of Odoo 12 (but my problem could happen with any module). In this addon, a StockMove model has a move_line_ids field. In the Detailed Operations dialog, we can see a tree view of all the move lines of the selected move. If we click the Add a line button, and set the fields, the values are stored in memory, but not in database unless we click the Confirm button. I would like to copy this behaviour in a @api.onchange() method of my custom StockMove model, but I don

Hide action/more button in form view in odoo12

天大地大妈咪最大 提交于 2019-12-24 04:15:10
问题 I want to hide only action/more button not print button in odoo12. I found some similar question its not working in odoo12. 回答1: Not a decent answer, but a direction for you. In source code(my version is 11) odoo-11.0/addons/web/static/src/js/chrome/sidebar.js L#34 init: function (parent, options) { this._super.apply(this, arguments); this.options = _.defaults(options || {}, { 'editable': true }); this.env = options.env; this.sections = options.sections || [ {name: 'print', label: _t('Print')

Call action via button with OdooV12

我们两清 提交于 2019-12-11 15:53:26
问题 I'm an Odoo developer and my issue is i wanna call an action from template into xml file. For Odoo docs/guide is so poor, so i need help to do something great. Thanks <!-- This is my action declaration into '''views/action_views.xml''' --> <record model="ir.actions.act_window" id="action_show_something"> <field name="name">Wanna show you something</field> <field name="res_model">product.template</field> <field name="type">ir.actions.act_window</field> <field name="view_type">tree</field>

How to bind value from one2many dropdown data to column field in odoo 12?

ε祈祈猫儿з 提交于 2019-12-11 06:35:40
问题 i trying to add field named "price" from one2many dropdown relationship to the parent table, which is i relate the second table with many2one relationship? can i do this? if yes, how to do this? here is my salesorder class code : # -*- coding: utf-8 -*- from odoo import models, fields, api class SalesorderSalesorder(models.Model): _name = 'salesorder.salesorder' no_faktur = fields.Char(String='No Faktur', required=True) kd_dealer = fields.Char(String='Kode Dealer', required=True) nm_dealer =