2017-10-24 57 views
2

を変更したい、私は、コンテキスト分析アカウントと分析タグ enter image description here を削除したい場合は、充填すべき画像内のフィールドをしたくない私は正確にコンテキストアカウントの請求書を変更したいコンテキストのアカウント請求書

+0

こんにちは、 私はあなたによって –

+0

を満たされているフィールドがたくさんあるので、あなたが、私はちょうど2フィールド分析アカウントと分析タグを避けたい正確に何をしたい説明できる –

+0

こんにちは、あなたは何にあなたの問題を理解していないですフィールドの分析アカウントと分析タグを非表示にします。 –

答えて

2

ありがとう私はAccountフィールドの自動入力を避ける必要があると思います。これは、フィールド定義で_default_accountのようなdefault関数を呼び出すことによって実現されます。

オリジナルコード:

account_id = fields.Many2one('account.account', string='Account', 
    required=True, domain=[('deprecated', '=', False)], 
    default=_default_account, 
    help="The income or expense account related to the selected product.") 

、それを避けるaccount.invoice.lineモデルを継承し、デフォルトの機能せず、再びそのフィールドを再定義します。

これを試してみてください:

_inherit = 'account.invoice.line' 

account_id = fields.Many2one('account.account', string='Account', 
    required=True, domain=[('deprecated', '=', False)], 
    help="The income or expense account related to the selected product.") 

は、それはあなたを助けることを願っています。

+0

2フィールド分析アカウントと分析タグを避けたい –

2

あなたは、XML

<record id="accountinginvisible name " model="ir.ui.view"> 
       <field name="name">account.inginvisible</field> 
       <field name="model">account.invoice.line</field> 
       <field name="inherit_id" ref="accounting(module name).reference from tree or form view id"/> 
       <field name="arch" type="xml"> 
        <xpath expr="//field[@name='field name']" position="replace" invisible="1">    </xpath> 
       </field> 
    </record> 

とあなたの.pyで

classname(models.Model): 
_inherit = 'account.invoice.line' 

であなたのモジュールにこのテーブルを継承することができますし、これを試すことができますし、私はそれはあなたを助け願っています。

+0

フィールドを削除しないでコンテキストを削除したい –

関連する問題