← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/account-budgeting/7.0-fix_red_test-afe into lp:account-budgeting

 

Alexandre Fayolle - camptocamp has proposed merging lp:~camptocamp/account-budgeting/7.0-fix_red_test-afe into lp:account-budgeting.

Requested reviews:
  Matthieu Dietrich @ camptocamp (mdietrich-c2c)
  Account Core Editors (account-core-editors)
Related bugs:
  Bug #1334605 in Account - Budgeting: "budget: tests are red"
  https://bugs.launchpad.net/account-budgeting/+bug/1334605

For more details, see:
https://code.launchpad.net/~camptocamp/account-budgeting/7.0-fix_red_test-afe/+merge/224581

I think the red test is caused by a typo in the test code, but I may well be wrong. 
-- 
https://code.launchpad.net/~camptocamp/account-budgeting/7.0-fix_red_test-afe/+merge/224581
Your team Account Core Editors is requested to review the proposed merge of lp:~camptocamp/account-budgeting/7.0-fix_red_test-afe into lp:account-budgeting.
=== modified file 'budget/__openerp__.py'
--- budget/__openerp__.py	2014-04-23 13:53:39 +0000
+++ budget/__openerp__.py	2014-06-26 10:50:09 +0000
@@ -42,6 +42,7 @@
              ],
  "data": ["budget_view.xml",
           "analytic_view.xml",
+          "security/security.xml",
           "security/ir.model.access.csv"
           ],
  "test": ["test/analytic_amount.yml"],

=== modified file 'budget/security/ir.model.access.csv'
--- budget/security/ir.model.access.csv	2013-12-16 15:36:16 +0000
+++ budget/security/ir.model.access.csv	2014-06-26 10:50:09 +0000
@@ -3,4 +3,5 @@
 "access_budget_budget","budget.budget","model_budget_budget","account.group_account_manager",1,1,1,1
 "access_budget_version","budget.version","model_budget_version","account.group_account_manager",1,1,1,1
 "access_budget_line","budget.line","model_budget_line","account.group_account_manager",1,1,1,1
+"access_budget_line_responsible","budget.line","model_budget_line","group_budget_responsible",1,1,1,1
 "access_budget_allocation_type","budget.allocation","model_budget_allocation_type","account.group_account_manager",1,1,1,1
\ No newline at end of file

=== added file 'budget/security/security.xml'
--- budget/security/security.xml	1970-01-01 00:00:00 +0000
+++ budget/security/security.xml	2014-06-26 10:50:09 +0000
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record model="res.groups" id="group_budget_responsible">
+            <field name="name">Budget Responsible</field>
+            <field name="category_id" ref="base.module_category_accounting_and_finance"/>
+        </record>
+
+    </data>
+</openerp>

=== modified file 'budget/test/analytic_amount.yml'
--- budget/test/analytic_amount.yml	2014-04-23 13:53:39 +0000
+++ budget/test/analytic_amount.yml	2014-06-26 10:50:09 +0000
@@ -60,5 +60,5 @@
     line = self.browse(cr, uid, ref('budget_line_1'))
     assert abs(line.analytic_amount + 200.0) < 1e-4, "Analytic amount is not correct! -200.0 != %s" % line.analytic_amount
     assert abs(line.analytic_real_amount + 12.0) < 1e-4, "Analytic real amount is not correct! -12.0 != %s" % line.analytic_real_amount
-    assert abs(line.analytic_diff_amount + 188.0) < 1e-4, "Analytic diff amount is not correct! 188.0 != %s" % line.analytic_diff_amount
+    assert abs(line.analytic_diff_amount - 188.0) < 1e-4, "Analytic diff amount is not correct! 188.0 != %s" % line.analytic_diff_amount