python - Customizing Accounting and finance module in odoo? -


i working on accounting , finance module, want modifications hiding fields , hiding chart of taxes. can me out?

please tell me procedure hide left side menu item (chart of taxes).

also want know view_id hide taxes invoice sheet , @ bottom tax (update).

please let me know external ids hide them unable find them linked other models.

invoice/taxes field:

field_id:tax_id 

object:

type:many2many relation:account.tax 

first of activate odoo developer mode, can external ids of objects.

activate odoo developer mode

how know external id of object

open form , can see 1 drop down field on top of page if developer mode active.

and select option "edit form view" drop down , can see details of form view model name, external id of view , many more.

account form view debug mode

in case inherit form use "account.invoice_supplier_form" external id of form, see image. enter image description here

to know external id of menu items,

go settinsgs => technical => user interface => menu items

search menu name want, open record , select view metadata debug mode drop down. enter image description here

how hide menu items:

to hide menu items there 1 easiest way creating new group (in specified user can have access) , assign group menu item while re-define menu.

create 1 group using xml file must first added in __openerp__.py.

<?xml version="1.0" encoding="utf-8"?> <openerp>   <data noupdate="1">     <record id="new_group_id" model="res.groups">       <field name="name">new group name</field>       <field name="category_id" ref="base.module_category_hidden"/>       <field name="users" eval="[(4, ref('base.user_root'))]"/>     </record>   </data> </openerp> 

and create xml file in update menu item xml code.

<record id="account.menu_action_tax_code_tree" model="ir.ui.menu">   <field name="groups_id" eval="[(6, 0, [ref('new_group_id')] )]"/> </record> 

another way ui, directly assign newly created group menu items go settings => technical => user interface => menu items (it's rollback while module upgrade in menu item defines).

how hide fields in existing view

to hide/add fields in existing form must inherit view first , find field using xpath or direct field , assign attributes hide field.

example:

<record id="new_id" model="ir.ui.view">   <field name="name">new.name</field>   <field name="inherit_id" ref="account.invoice_supplier_form" />   <field name="model">account.invoice</field>   <field name="arch" type="xml">     <data>     <!-- path according fields want hide tree -->       <xpath expr="/form/sheet/notebook/page/field[@name='line_cr_ids']/tree/field[@name='account_id']" position="attributes">         <attribute name="invisible">true/1</attribute>       </xpath>        <field name="tax_line" position="attributes">         <attribute name="invisible">true/1</attribute>       </field>     </data>   </field> </record> 

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -