mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] add ir_rule for account.statement.label and fix field definition
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
'partner_view.xml',
|
'partner_view.xml',
|
||||||
'statement_view.xml',
|
'statement_view.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
|
'security/ir_rule.xml',
|
||||||
],
|
],
|
||||||
'demo': [],
|
'demo': [],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
|
|||||||
14
account_statement_completion_label/security/ir_rule.xml
Normal file
14
account_statement_completion_label/security/ir_rule.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record id="label_rule" model="ir.rule">
|
||||||
|
<field name="name">Multicompany label</field>
|
||||||
|
<field ref="model_account_statement_label" name="model_id"/>
|
||||||
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||||
|
<field name="global" eval="True"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ class AccountStatementLabel(orm.Model):
|
|||||||
'for a given partner'),
|
'for a given partner'),
|
||||||
'company_id': fields.related('account_id', 'company_id',
|
'company_id': fields.related('account_id', 'company_id',
|
||||||
type='many2one',
|
type='many2one',
|
||||||
reation='res.company',
|
relation='res.company',
|
||||||
string='Company',
|
string='Company',
|
||||||
store=True,
|
store=True,
|
||||||
readonly=True),
|
readonly=True),
|
||||||
|
|||||||
Reference in New Issue
Block a user