mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[MRG] Adds multi-company support on account.statement.profile and adds multi-company support on easy-reconcile related models
This commit is contained in:
@@ -21,9 +21,8 @@
|
||||
|
||||
{
|
||||
"name": "Easy Reconcile",
|
||||
"version": "1.2",
|
||||
"depends": ["account",
|
||||
],
|
||||
"version": "1.3.0",
|
||||
"depends": ["account"],
|
||||
"author": "Akretion,Camptocamp",
|
||||
"description": """
|
||||
Easy Reconcile
|
||||
@@ -58,6 +57,7 @@ allows multiple lines and partial.
|
||||
"demo_xml": [],
|
||||
"data": ["easy_reconcile.xml",
|
||||
"easy_reconcile_history_view.xml",
|
||||
"security/ir_rule.xml",
|
||||
"security/ir.model.access.csv"],
|
||||
'license': 'AGPL-3',
|
||||
"auto_install": False,
|
||||
|
||||
@@ -96,6 +96,12 @@ class account_easy_reconcile_method(orm.Model):
|
||||
string='Task',
|
||||
required=True,
|
||||
ondelete='cascade'),
|
||||
'company_id': fields.related('task_id','company_id',
|
||||
relation='res.company',
|
||||
type='many2one',
|
||||
string='Company',
|
||||
store=True,
|
||||
readonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -182,6 +188,7 @@ class account_easy_reconcile(orm.Model):
|
||||
type='many2one',
|
||||
relation='easy.reconcile.history',
|
||||
readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
||||
def _prepare_run_transient(self, cr, uid, rec_method, context=None):
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<group>
|
||||
<field name="name" select="1"/>
|
||||
<field name="account"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="unreconciled_count"/>
|
||||
@@ -76,6 +77,7 @@ The lines should have the same amount (with the write-off) and the same referenc
|
||||
<tree string="Automatic Easy Reconcile">
|
||||
<field name="name"/>
|
||||
<field name="account"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="unreconciled_count"/>
|
||||
<field name="reconciled_partial_count"/>
|
||||
<button icon="gtk-ok" name="run_reconcile" colspan="4"
|
||||
|
||||
@@ -81,6 +81,13 @@ class easy_reconcile_history(orm.Model):
|
||||
relation='account.move.line',
|
||||
readonly=True,
|
||||
multi='lines'),
|
||||
'company_id': fields.related('easy_reconcile_id','company_id',
|
||||
relation='res.company',
|
||||
type='many2one',
|
||||
string='Company',
|
||||
store=True,
|
||||
readonly=True),
|
||||
|
||||
}
|
||||
|
||||
def _open_move_lines(self, cr, uid, history_id, rec_type='full', context=None):
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
<group>
|
||||
<field name="easy_reconcile_id"/>
|
||||
<field name="date"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<separator colspan="2" string="Reconciliations"/>
|
||||
|
||||
25
account_easy_reconcile/security/ir_rule.xml
Normal file
25
account_easy_reconcile/security/ir_rule.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="easy_reconcile_rule" model="ir.rule">
|
||||
<field name="name">Easy reconcile multi-company</field>
|
||||
<field name="model_id" ref="model_account_easy_reconcile"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="easy_reconcile_history_rule" model="ir.rule">
|
||||
<field name="name">Easy reconcile history multi-company</field>
|
||||
<field name="model_id" ref="model_easy_reconcile_history"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="easy_reconcile_method_rule" model="ir.rule">
|
||||
<field name="name">Easy reconcile method multi-company</field>
|
||||
<field name="model_id" ref="model_account_easy_reconcile_method"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -20,7 +20,7 @@
|
||||
##############################################################################
|
||||
|
||||
{'name': "Bank statement extension and profiles",
|
||||
'version': '1.2.0',
|
||||
'version': '1.3.0',
|
||||
'author': 'Camptocamp',
|
||||
'maintainer': 'Camptocamp',
|
||||
'category': 'Finance',
|
||||
@@ -76,13 +76,11 @@
|
||||
|
||||
""",
|
||||
'website': 'http://www.camptocamp.com',
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'statement_view.xml',
|
||||
'data': ['statement_view.xml',
|
||||
'report/bank_statement_webkit_header.xml',
|
||||
'report.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'security/ir_rule.xml'],
|
||||
'demo_xml': [],
|
||||
'test': [],
|
||||
'installable': True,
|
||||
|
||||
10
account_statement_ext/security/ir_rule.xml
Normal file
10
account_statement_ext/security/ir_rule.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="account_bank_statement_profile_rule" model="ir.rule">
|
||||
<field name="name">Bank statement profile multi-company</field>
|
||||
<field name="model_id" ref="model_account_statement_profile"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -76,6 +76,7 @@ class AccountStatementProfil(Model):
|
||||
'Bank Statement Prefix', size=32),
|
||||
'bank_statement_ids': fields.one2many(
|
||||
'account.bank.statement', 'profile_id', 'Bank Statement Imported'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
||||
def _check_partner(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="name" select="1" />
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company"/>
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="commission_account_id" />
|
||||
<field name="commission_analytic_id" />
|
||||
@@ -31,6 +32,7 @@
|
||||
<tree string="Import statement">
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="journal_id" />
|
||||
<field name="commission_account_id" />
|
||||
<field name="commission_analytic_id" />
|
||||
|
||||
Reference in New Issue
Block a user