banking-addons-team team mailing list archive
-
banking-addons-team team
-
Mailing list archive
-
Message #00415
lp:~camptocamp/banking-addons/bank-statement-reconcile-70-multi-comp-statement into lp:banking-addons/bank-statement-reconcile-70
Nicolas Bessi - Camptocamp has proposed merging lp:~camptocamp/banking-addons/bank-statement-reconcile-70-multi-comp-statement into lp:banking-addons/bank-statement-reconcile-70.
Requested reviews:
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c)
For more details, see:
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-70-multi-comp-statement/+merge/148379
Adds multi-company support on account.statement.profile and adds multi-company support on easy-reconcile related models
--
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-70-multi-comp-statement/+merge/148379
Your team Banking Addons Team is subscribed to branch lp:banking-addons/bank-statement-reconcile-70.
=== modified file 'account_easy_reconcile/__openerp__.py'
--- account_easy_reconcile/__openerp__.py 2013-02-06 09:33:47 +0000
+++ account_easy_reconcile/__openerp__.py 2013-02-14 08:07:23 +0000
@@ -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 @@
"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,
=== modified file 'account_easy_reconcile/easy_reconcile.py'
--- account_easy_reconcile/easy_reconcile.py 2013-01-04 08:39:10 +0000
+++ account_easy_reconcile/easy_reconcile.py 2013-02-14 08:07:23 +0000
@@ -96,6 +96,12 @@
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 @@
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):
=== modified file 'account_easy_reconcile/easy_reconcile.xml'
--- account_easy_reconcile/easy_reconcile.xml 2013-01-04 08:24:03 +0000
+++ account_easy_reconcile/easy_reconcile.xml 2013-02-14 08:07:23 +0000
@@ -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 @@
<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"
=== modified file 'account_easy_reconcile/easy_reconcile_history.py'
--- account_easy_reconcile/easy_reconcile_history.py 2012-12-20 10:15:12 +0000
+++ account_easy_reconcile/easy_reconcile_history.py 2013-02-14 08:07:23 +0000
@@ -81,6 +81,13 @@
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):
=== modified file 'account_easy_reconcile/easy_reconcile_history_view.xml'
--- account_easy_reconcile/easy_reconcile_history_view.xml 2013-01-04 08:17:29 +0000
+++ account_easy_reconcile/easy_reconcile_history_view.xml 2013-02-14 08:07:23 +0000
@@ -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"/>
=== added file 'account_easy_reconcile/security/ir_rule.xml'
--- account_easy_reconcile/security/ir_rule.xml 1970-01-01 00:00:00 +0000
+++ account_easy_reconcile/security/ir_rule.xml 2013-02-14 08:07:23 +0000
@@ -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>
=== modified file 'account_statement_ext/__openerp__.py'
--- account_statement_ext/__openerp__.py 2013-02-04 15:16:28 +0000
+++ account_statement_ext/__openerp__.py 2013-02-14 08:07:23 +0000
@@ -76,13 +76,11 @@
""",
'website': 'http://www.camptocamp.com',
- 'init_xml': [],
- 'update_xml': [
- 'statement_view.xml',
- 'report/bank_statement_webkit_header.xml',
- 'report.xml',
- 'security/ir.model.access.csv',
- ],
+ '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,
=== added file 'account_statement_ext/security/ir_rule.xml'
--- account_statement_ext/security/ir_rule.xml 1970-01-01 00:00:00 +0000
+++ account_statement_ext/security/ir_rule.xml 2013-02-14 08:07:23 +0000
@@ -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>
\ No newline at end of file
=== modified file 'account_statement_ext/statement.py'
--- account_statement_ext/statement.py 2013-02-07 13:34:05 +0000
+++ account_statement_ext/statement.py 2013-02-14 08:07:23 +0000
@@ -76,6 +76,7 @@
'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):
=== modified file 'account_statement_ext/statement_view.xml'
--- account_statement_ext/statement_view.xml 2013-01-28 09:48:10 +0000
+++ account_statement_ext/statement_view.xml 2013-02-14 08:07:23 +0000
@@ -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" />
Follow ups