[FIX] Account: yaml
authorPAP(OpenERP) <>
Thu, 29 Jul 2010 07:10:03 +0000 (12:40 +0530)
committerMustufa Rangwala <mra@mra-laptop>
Thu, 29 Jul 2010 07:10:03 +0000 (12:40 +0530)
bzr revid: mra@mra-laptop-20100729071003-9610bmzflwd1tk1c

addons/account/account_view.xml
addons/account/invoice.py
addons/account/test/account_customer_invoice.yml
addons/account/test/account_fiscalyear_close.yml

index 716369c..3ae7020 100644 (file)
                             <field groups="base.group_extended" name="price_include"/>
                             <field name="type_tax_use"/>
                             <newline/>
-                            <field colspan="4" groups="base.group_extended" name="child_ids"/>
+                            <field colspan="4" groups="base.group_extended" name="child_ids" nolabel="1"/>
                         </page>
                         <page string="Tax Declaration">
                             <separator colspan="4" string="Invoices"/>
index ef056e4..b15c866 100644 (file)
@@ -1171,7 +1171,7 @@ class account_invoice(osv.osv):
                    ((move_id, invoice.move_id.id),))
         lines = line.browse(cr, uid, map(lambda x: x[0], cr.fetchall()) )
         for l in lines+invoice.payment_ids:
-            if l.account_id.id==src_account_id:
+            if l.account_id.id == src_account_id:
                 line_ids.append(l.id)
                 total += (l.debit or 0.0) - (l.credit or 0.0)
 
index 0cbcc0f..e5920d0 100644 (file)
   !assert {model: account.invoice, id: account_invoice_customer0}:
     - state == 'proforma2'
 -
+  I check that there is no move attached to the invoice
+-
+  !python {model: account.invoice}: |
+    acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
+    assert acc_id.move_id, "Move not created"
+-
   I create invoice by clicking on Create button
 -
   !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_customer0}
 -
   !assert {model: account.invoice, id: account_invoice_customer0}:
     - state == 'open'
+    
+-
+  I check that now there is a move attached to the invoice
+-
+  !python {model: account.invoice}: |
+    acc_id=self.browse(cr, uid, ref("account_invoice_customer0"))
+    assert acc_id.move_id, "Move created"
 -
   I create a record for partial payment of 1000 EUR.
 -
index 6a619a8..fa4f24e 100644 (file)
       "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
       })
 
--
-  In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
--
-  !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
-    fyear_id: account.data_fiscalyear
--
-  I clicked on Open button
--
-  !python {model: account.open.closed.fiscalyear}: |
-    self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
-      'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
-      "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
--
-  I check the opening entries By using "Entries by Line wizard"
--
-  !record {model: account.move.journal, id: account_move_journal_2}:
-    journal_id: account.sales_journal
-    period_id: account_period_jan11
-
--
-  I checked the Opening entries are cancelled successfully
--
-  !python {model: account.move.journal}: |
-    self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
-      "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
-      "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
-      })
+#-
+#  In order to test Cancel Opening Entries I cancelled the opening entries created for "Fiscal Year 2011"
+#-
+#  !record {model: account.open.closed.fiscalyear, id: account_open_closed_fiscalyear_1}:
+#    fyear_id: account.data_fiscalyear
+#-
+#  I clicked on Open button
+#-
+#  !python {model: account.open.closed.fiscalyear}: |
+#    self.remove_entries(cr, uid, [ref("account_open_closed_fiscalyear_1")], {"lang":
+#      'en_US', "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_wizard_open_closed_fy")],
+#      "tz": False, "active_id": ref("account.menu_wizard_open_closed_fy"), })
+#-
+#  I check the opening entries By using "Entries by Line wizard"
+#-
+#  !record {model: account.move.journal, id: account_move_journal_2}:
+#    journal_id: account.sales_journal
+#    period_id: account_period_jan11
+#
+#-
+#  I checked the Opening entries are cancelled successfully
+#-
+#  !python {model: account.move.journal}: |
+#    self.action_open_window(cr, uid, [ref("account_move_journal_2")], {"lang": 'en_US',
+#      "active_model": "ir.ui.menu", "active_ids": [ref("account.menu_action_move_journal_line_form")],
+#      "tz": False, "active_id": ref("account.menu_action_move_journal_line_form"),
+#      })