openerp

Customizing Accounting and finance module in odoo?

南笙酒味 提交于 2019-12-01 02:38:29
I am working on Accounting and Finance module, I want to do some modifications like hiding fields and hiding Chart of Taxes. Can you anybody help me out? Please tell me the procedure to hide left side menu item (Chart of taxes). Also I want to know view_id to hide taxes from invoice sheet and at bottom Tax (update). Please just let me know the external ids to hide them I am unable to find them as they were linked to some other models. Invoice/Taxes field: field_id:tax_id object: type:many2many relation:account.tax Emipro Technologies Pvt. Ltd. First of all activate Odoo developer Mode , so you

Odoo 9 inherit js file

旧城冷巷雨未停 提交于 2019-12-01 01:35:14
I need to change title in addons/web/static/src/js/web_client.js this.set('title_part', {"zopenerp": "Odoo"}); Is it possible in new custom module inherit js file and change "Odoo" to "Odoo 9" You can change it by overriding start function: instance.web.WebClient.include({ start: function() { this.set('title_part', {"zopenerp": "Odoo9"}); return this._super(); }, }); To override a javascript function in odoo, use the following code: __openerp__.py ... 'data': [ 'module_view.xml', ], ... module_view.xml <?xml version="1.0" encoding="utf-8"?> <openerp> <data> <template id="assets_backend_custum

different permissions based on workflow state

断了今生、忘了曾经 提交于 2019-11-30 22:14:33
I need to set up different permission on an object based on its workflow state. For instance, 'manager group' can edit the object only if state=draft but 'super manager group' can edit it also if state=validated. It seems that's not possible using ir.model.access and I'm evaluating if it could be done using ir.rule . It seems not... Is there a official way to get this or do I need to implement this feature (maybe by adding a condition into ir.model.access machinery). odony This is not possible by default with ir.model.access , because this permission model is designed to act like simple Unix

OpenERP always displays inherited view instead of original

回眸只為那壹抹淺笑 提交于 2019-11-30 19:54:53
Original views: <record id='view_1' model='ir.ui.view'> <field name="name">view.name</field> <field name="model">my.object</field> <field name="priority" eval="17"/> <field name="type">form</field> <field name="arch" type="xml"> ... </field> </record> inherited view from the original: <record id='view_2' model='ir.ui.view'> <field name="name">view.name</field> <field name="model">my.object</field> <field name="priority" eval="10"/> <field name="inherit_id" ref="view_1"/> <field name="type">form</field> <field name="arch" type="xml"> ... </field> </record> So what happens is OpenERP always

Odoo 9 inherit js file

被刻印的时光 ゝ 提交于 2019-11-30 19:04:22
问题 I need to change title in addons/web/static/src/js/web_client.js this.set('title_part', {"zopenerp": "Odoo"}); Is it possible in new custom module inherit js file and change "Odoo" to "Odoo 9" 回答1: You can change it by overriding start function: instance.web.WebClient.include({ start: function() { this.set('title_part', {"zopenerp": "Odoo9"}); return this._super(); }, }); To override a javascript function in odoo, use the following code: __openerp__.py ... 'data': [ 'module_view.xml', ], ...

How can I change the choices in an OpenERP selection field based on other field values?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 17:53:07
问题 I have a form with four fields: Crop - selection Active From - date Active To - date Block Area - selection How can I make the available options in Block Area depend on the values the user selects for the other fields? 回答1: I don't know if you can do it with a selection field, but you can change the domain of a many-to-one field when another field changes value. You might also be able to just use the other fields in your BlockArea field's domain, and not have to change it at all. Look at the

Customizing Accounting and finance module in odoo?

故事扮演 提交于 2019-11-30 16:21:04
问题 I am working on Accounting and Finance module, I want to do some modifications like hiding fields and hiding Chart of Taxes. Can you anybody help me out? Please tell me the procedure to hide left side menu item (Chart of taxes). Also I want to know view_id to hide taxes from invoice sheet and at bottom Tax (update). Please just let me know the external ids to hide them I am unable to find them as they were linked to some other models. Invoice/Taxes field: field_id:tax_id object: type

Method return value to call another form in OpenERP

↘锁芯ラ 提交于 2019-11-30 16:06:38
Currently, you can set to return value of an OpenERP to the following, to get the current form to be closed: return {'type':'ir.actions.act_window_close' } Is there a return value that would open another form instead? For example, in the Product form, buttons can call a sales form or a wizard form. Following is an example function.Maybe helpful for you def open_popup(self, cr, uid, ids, context=None): mod_obj = self.pool.get('ir.model.data') if move.parent_production_id: res = mod_obj.get_object_reference(cr, uid, 'module_name', 'id_specified_for_the_view') return { 'name': 'Provide your popup

OpenERP fields.function() explanation [duplicate]

强颜欢笑 提交于 2019-11-30 14:12:00
This question already has an answer here: How does one use the store parameter of function fields? 1 answer I got this code from stock.py file and line number 163 'complete_name': fields.function(_complete_name, type='char', size=256, string="Location Name", store={'stock.location': (_get_sublocations, ['name', 'location_id'], 10)}), please give me a explanation about below store attribute in above field. can we use fields.function( with type='many2one' ? if can please give me a reference sample code or sample model class in openerp 7 'store'=True will store the value of the field in database.

What is Main difference between @api.onchange and @api.depends in Odoo(openerp)?

怎甘沉沦 提交于 2019-11-30 11:03:47
问题 In Odoo v8 there are many API decorators used. But i don't understand the main difference between @api.depends and @api.onchange . Can anyone help me out from this one? Thank You. 回答1: @api.depends This decorator is specifically used for "fields.function" in odoo. For a "field.function", you can calculate the value and store it in a field, where it may possible that the calculation depends on some other field(s) of same table or some other table, in that case you can use '@api.depends' to