diff --git a/account_easy_reconcile/__openerp__.py b/account_easy_reconcile/__openerp__.py
index 94230322..a3f22d54 100755
--- a/account_easy_reconcile/__openerp__.py
+++ b/account_easy_reconcile/__openerp__.py
@@ -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,
diff --git a/account_easy_reconcile/easy_reconcile.py b/account_easy_reconcile/easy_reconcile.py
index 3f7b2774..7971895e 100644
--- a/account_easy_reconcile/easy_reconcile.py
+++ b/account_easy_reconcile/easy_reconcile.py
@@ -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):
diff --git a/account_easy_reconcile/easy_reconcile.xml b/account_easy_reconcile/easy_reconcile.xml
index 25d60720..2696419a 100644
--- a/account_easy_reconcile/easy_reconcile.xml
+++ b/account_easy_reconcile/easy_reconcile.xml
@@ -27,6 +27,7 @@
+
@@ -76,6 +77,7 @@ The lines should have the same amount (with the write-off) and the same referenc
+
diff --git a/account_easy_reconcile/security/ir_rule.xml b/account_easy_reconcile/security/ir_rule.xml
new file mode 100644
index 00000000..ec1de6d0
--- /dev/null
+++ b/account_easy_reconcile/security/ir_rule.xml
@@ -0,0 +1,25 @@
+
+
+
+
+ Easy reconcile multi-company
+
+
+ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+
+
+
+ Easy reconcile history multi-company
+
+
+ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+
+
+
+ Easy reconcile method multi-company
+
+
+ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]
+
+
+