odoo-8

Is it possible to show an One2many field in a kanban view in Odoo?

╄→гoц情女王★ 提交于 2019-12-11 02:02:03
问题 I would like to know if it's possible to show a One2many field in a kanban view in Odoo (note that I'm not talking about Qweb in templates or reports, only about Qweb in kanban views). I have a model which has a One2many field named other_contact_ids . I want to show the name of each contact in the kanban view: <t t-foreach="record.other_contact_ids.raw_value" t-as="contact"> <p> <t t-esc="contact.name"/> </p> </t> I'm getting an error, because the t-as is storing only the ID of the objects

How to automatically fill a one2many field values to another one2many field in odoo

一笑奈何 提交于 2019-12-11 00:43:26
问题 I have two one2many field which is reffering to a single model, existing in different models. ie, class modelA(models.Model): _name = 'modela' fila = fields.One2many('main','refa') class moddelB(models.Model): _name = 'modelb' filb = fields.One2many('main','refb') class main(models.Model): _name = 'main' name = fields.Char('Name') date = fields.Date('Date') refa = fields.Many2one('modela') refb = fields.Many2one('modelb') I will create records in modela . In this model there is a button is

How to place a link to a view in the email template of odoo

送分小仙女□ 提交于 2019-12-10 22:45:29
问题 In my custom room booking application, when user book a room a mail will send to the admin. In the mail template, there is an approve button. Once the admin clicks the approve button, it should redirect to the approval form view. How can I do that by placing a link in the email template? 回答1: The url you have to compose is of the following form: http://odoo.server.com/web?db=#id=&view_type=form&model= 回答2: You can put in your template a text ${ctx['url']} and then render send template with

Search view domain error

不打扰是莪最后的温柔 提交于 2019-12-10 18:55:15
问题 There is an odoo system with a timesheet module (self-made) in it. I've made 2 groups of search view filters: years and months : <!--Timesheets-ALL Tab search view--> <record id="view_tabel_search3" model="ir.ui.view"> <field name="name">tabel.tabel.search3</field> <field name="model">tabel.tabel</field> <field name="type">search</field> <field name="arch" type="xml"> <search string="Checker"> <group expand="0" string="Years"> <filter string="Last year" name="filter5" domain="[('time_end_t',

Get values from method in Odoo 8 API

a 夏天 提交于 2019-12-10 16:24:34
问题 I'm trying to interact with Odoo 8 API and get a list of fields. The method is called by ripcord XMLRPC library and this is the sentence: $models = ripcord::client($url.'/xmlrpc/2/object'); $models->execute_kw($dbname, $username, $password,'res.partner', 'fields_get', array(), array('attributes' => array('string', 'help', 'type'))); But I don't know how to get the response values... 回答1: I have found the Some of the useful document which is related with the ODOO Web Service API in different

How to add an external jQuery plugin to the list view on Odoo?

妖精的绣舞 提交于 2019-12-10 16:09:07
问题 I am using Odoo 10e. I want to integrate a jquery plugin into my module. I want to integrate the jQuery plugin jquery-resizable-columns. It simple helps user to resize columns of table on the fly and I want to apply this on a specific model's list view Which method should I extend in order to add the plugin? 回答1: I think you should extend (maybe include) some widget in the web module. If you go to the file /addons/web/static/src/js/view_list.js , you can see the widget that renders the table:

how to filter tree view with dynamic field odoo-10

那年仲夏 提交于 2019-12-10 15:29:24
问题 i added 'location_id' field to res.user to connect user to a certain location class ResUser(models.Model): _inherit='res.users' current_location_id=fields.Many2one('physical.location',string="Current Loction") allowed_location_ids=fields.Many2many('physical.location',string="Allowed Location") i wanted to filter only the visits with current_location_id = user_current_location_id <filter string="My visits" name="filter_my_visits" domain="[('current_location_id','=',current_location_id)]"/>

Passing Context In Odoo

我是研究僧i 提交于 2019-12-10 11:47:03
问题 How can i pass this scheduled_for in ratecard_multiple to scheduled in ratecard_sin_radio so that i can use it in the radio_sin_radio function action_four_weeks_schedule_form Here i have added all the code that am using class ratecard_multiple(models.Model): # pudb.set_trace() _name = 'ratecard.multiple' _rec_name = 'display_name' name = fields.Char(string='Multiple RateCard Product Name ', required=True) code = fields.Char(string='Multiple RateCard Code ', readonly=True) scheduled_for =

Compute method is called multiple times?

主宰稳场 提交于 2019-12-10 10:37:00
问题 I found out that this probably isn't concurrency problem as the method is recalled JUST WHEN I TRY TO UPDATE THE sync.test.subject.b 's separated_chars FIELD (at the end of the method). So I can't solve this with thread locking as the method actually waits for itself to be called again. I don't get it this is a totally bizarre behavior. I found a weird behavior while updating computed fields. In this case codes are better than words: Models: from openerp import models, fields, api, _ class

How to run Odoo tests unittest2?

怎甘沉沦 提交于 2019-12-10 10:36:39
问题 I tried running odoo tests using --test-enable, but it won't work. I have a couple of questions. According to the documentation Tests can only be run during module installation, what happens when we add functionality and then want to run tests? Is it possible to run tests from IDE like Pycharm ? 回答1: @aftab You need add log-level please see below. ./odoo.py -d <dbname> --test-enable --log-level=test and regarding you question, If you are making changes to installed modules and need to re test