openerp

Inheriting data in openerp

天涯浪子 提交于 2020-01-07 04:26:28
问题 I have inherited exiting data from one form to another form using following coding xml: <field name = "res_model">lis.lab</field> python: _inherit="lis.lab" lis.lab is first form. I enter information and save only here. test.lab is another form. Here I have finished to display that record here(test.lab) in tree view using above two line click. But It has only exiting field in "test.lab" form. And it's not showing new field in second form(test.lab). xml <?xml version="1.0" encoding="utf-8"?>

How to acess fields in other model using relational field in view (odoo)

倾然丶 夕夏残阳落幕 提交于 2020-01-07 03:07:42
问题 I've a question concerning relational field in Odoo. i have a relational field X into modelA (a Many2Many field) related with the modelB, i create a view (viewA.xml) for the ModelA, and i'd like to get acess to field (Y for example) located into modelB using my relational field (X). How to do that in xml view. i've tried to use the dot notation (X.Y), but it doesn't work in xml view. Thanks in advance. 回答1: You can access Y only by using the list for X inside the view: <field name="X"> <tree>

how can i use function value in Domain filter

断了今生、忘了曾经 提交于 2020-01-06 15:25:16
问题 I am getting current login user id by following function def _get_user_name(self, cr, uid, *args): user_obj = self.pool.get('res.users') user_value = user_obj.browse(cr, uid, uid) return user_value.id or False and now i want to use its value in this field's Domain like .... x_trainer_id = fields.Many2one('res.partner', string='Trainer',domain=[('user_id.id','=','get_user_name')]) How is it possible? I'll be very thankful.... 回答1: you can do it as below: x_trainer_id = fields.Many2one('res

hide button according to group

青春壹個敷衍的年華 提交于 2020-01-06 06:45:24
问题 I have a defined groups and i want to display a button according a group. <button name="assign_ticket" states= "pending_assignment,draft" groups="group_centricare_care_agents" string="Assign to me"/> i want this button to be displayed to the group "roup_centricare_care_agents" but when adding groups tag it cause an exception. P.S.: This button in tree view. How can i do this?? Thanks in advance 回答1: I think the groups attribute has to have the module name included in the group name. For

How to fix MRP sequence number

耗尽温柔 提交于 2020-01-06 02:49:09
问题 I am having a problem with MRP standard module on OpenERP. The problem is on the sequence number of all manufactoring orders. If I click on Create button and then Discard button, the manufactory order number increases in sequence. This is happening because the action of achiving the number is on the Create button and not on Save button. So, if I click Create/Discard 10 times, this number will increase 10 times even thinking that none of them were saved. What I need to do is do add an action

Traceback with odoo and google calendar

£可爱£侵袭症+ 提交于 2020-01-05 17:02:15
问题 I have configured my Odoo app to work with Google Calendar. Now, I can add new events from my Odoo calendar, it's synch with google. When i'm on a customer page, I have a calendar icon to add a meet. When I add an event and synch, I have this callback An idea on where does it comes from ? Thanks 来源: https://stackoverflow.com/questions/33804445/traceback-with-odoo-and-google-calendar

Traceback with odoo and google calendar

为君一笑 提交于 2020-01-05 16:57:49
问题 I have configured my Odoo app to work with Google Calendar. Now, I can add new events from my Odoo calendar, it's synch with google. When i'm on a customer page, I have a calendar icon to add a meet. When I add an event and synch, I have this callback An idea on where does it comes from ? Thanks 来源: https://stackoverflow.com/questions/33804445/traceback-with-odoo-and-google-calendar

OpenERP: css class not recognized

隐身守侯 提交于 2020-01-05 12:14:52
问题 Please could someone tell me what's wrong with my code. I have developed a module on openerp7, and now i'am trying to use a css class already existing in the base.css file but it gave me the error : Invalid XML for View Architecture! I've then updated my module and the Web module that contains the base.css file. I also checked that the web module is installed.I have as well restarted the server. here's how I've added the class: <field name="production" class="oe_edit_only"/> here's the full

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"

I can't find my module in Odoo

那年仲夏 提交于 2020-01-04 05:41:32
问题 I have created a module in Odoo 8 following a tutorial. I activated the technical features in Users then I've updated the module list but it doesn't appear in the list. What should I do ? 回答1: Track the following: checkout __init__.py , __openerp__.py files weather any server track-back appear or not find the path of addons module is your module is at same place or path? give read/write/execute permission for that module restart your server Go to browser, from GUI, Setting => Modules =>