Commit 7cf143f4 authored by Jérome Perrin's avatar Jérome Perrin

Remove "Sale" from method names, they now apply to both Sale and Purchase


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22552 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ccb8f871
...@@ -195,7 +195,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -195,7 +195,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
def stepTic(self, **kw): def stepTic(self, **kw):
self.tic() self.tic()
def stepCreateSaleInvoiceTransactionRule(self, sequence, **kw) : def stepCreateInvoiceTransactionRule(self, sequence, **kw) :
""" """
Create some predicates in the Invoice Transaction Rule Create some predicates in the Invoice Transaction Rule
""" """
...@@ -264,7 +264,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -264,7 +264,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
predicate_region_africa = predicate_region_africa, predicate_region_africa = predicate_region_africa,
) )
def stepUpdateSaleInvoiceTransactionRuleMatrix(self, sequence, **kw) : def stepUpdateInvoiceTransactionRuleMatrix(self, sequence, **kw) :
"""Creates/updates the matrix of the sale invoice transaction rule """ """Creates/updates the matrix of the sale invoice transaction rule """
invoice_transaction_rule = sequence.get('invoice_transaction_rule') invoice_transaction_rule = sequence.get('invoice_transaction_rule')
base_id = 'movement' base_id = 'movement'
...@@ -303,7 +303,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -303,7 +303,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
product_barebone_region_africa_cell = product_barebone_region_africa_cell, product_barebone_region_africa_cell = product_barebone_region_africa_cell,
) )
def stepValidateSaleInvoiceTransaction(self, sequence, **kw) : def stepValidateInvoiceTransaction(self, sequence, **kw) :
"""validates the sale invoice transaction rule""" """validates the sale invoice transaction rule"""
sequence.get('invoice_transaction_rule').validate() sequence.get('invoice_transaction_rule').validate()
...@@ -514,10 +514,10 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -514,10 +514,10 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
invoice = empty_invoice, invoice = empty_invoice,
) )
def stepCreateSimpleSaleInvoice(self, sequence, **kw) : def stepCreateSimpleInvoice(self, sequence, **kw) :
""" creates a simple sale invoice for non varianted notebook product. """ creates a simple sale invoice for non varianted notebook product.
The invoice is from `vendor` to `client_fr`, so the cell defined in The invoice is from `vendor` to `client_fr`, so the cell defined in
stepUpdateSaleInvoiceTransactionRuleMatrix should match. stepUpdateInvoiceTransactionRuleMatrix should match.
This invoice containts one line, 10 notebook * 10 EUR, so total price This invoice containts one line, 10 notebook * 10 EUR, so total price
is 100 is 100
""" """
...@@ -553,7 +553,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -553,7 +553,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
invoice_lines = [invoice_line] invoice_lines = [invoice_line]
) )
def stepCreateOtherSimpleSaleInvoice(self, sequence, **kw) : def stepCreateOtherSimpleInvoice(self, sequence, **kw) :
""" creates a simple sale invoice for non varianted notebook product. """ creates a simple sale invoice for non varianted notebook product.
It will contain one line that will later be changed. It will contain one line that will later be changed.
""" """
...@@ -641,9 +641,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -641,9 +641,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
invoice=sequence.get('invoice') invoice=sequence.get('invoice')
invoice.edit() invoice.edit()
def stepCreateSimpleSaleInvoiceTwoLines(self, sequence, **kw) : def stepCreateSimpleInvoiceTwoLines(self, sequence, **kw) :
""" """
similar to stepCreateSimpleSaleInvoice, but replace similar to stepCreateSimpleInvoice, but replace
"10 notebook * 10 EUR, so total price is 100" by : "10 notebook * 10 EUR, so total price is 100" by :
"5 notebook * 10 EUR + 5 notebook * 10 EUR , so total price is 100" "5 notebook * 10 EUR + 5 notebook * 10 EUR , so total price is 100"
""" """
...@@ -685,9 +685,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -685,9 +685,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
invoice_lines = [invoice_line1, invoice_line2] invoice_lines = [invoice_line1, invoice_line2]
) )
def stepCreateSimpleSaleInvoiceTwoCells(self, sequence, **kw) : def stepCreateSimpleInvoiceTwoCells(self, sequence, **kw) :
""" """
similar to stepCreateSimpleSaleInvoiceTwoLines, but use two similar to stepCreateSimpleInvoiceTwoLines, but use two
differents cells on the same line instead of two differents lines. differents cells on the same line instead of two differents lines.
""" """
vendor = sequence.get('vendor') vendor = sequence.get('vendor')
...@@ -753,7 +753,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -753,7 +753,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
# then we must have 2 cells inside our line # then we must have 2 cells inside our line
self.assertEqual(len(invoice_line.objectIds()), 2) self.assertEqual(len(invoice_line.objectIds()), 2)
def stepCreateMultiLineSaleInvoice(self, sequence, **kw) : def stepCreateMultiLineInvoice(self, sequence, **kw) :
""" create an invoice with varianted products """ create an invoice with varianted products
The invoice is from `vendor` to `client_fr`, so the cell defined in The invoice is from `vendor` to `client_fr`, so the cell defined in
This invoice containts two lines : This invoice containts two lines :
...@@ -856,7 +856,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -856,7 +856,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
) )
sequence.edit(invoice = invoice) sequence.edit(invoice = invoice)
def stepCreateMatchableSaleInvoiceMovements(self, sequence, **kw) : def stepCreateMatchableInvoiceMovements(self, sequence, **kw) :
""" Create a temp movement that will be matched by the """ Create a temp movement that will be matched by the
default_invoice_transaction_rule """ default_invoice_transaction_rule """
from Products.ERP5Type.Document import newTempMovement from Products.ERP5Type.Document import newTempMovement
...@@ -879,7 +879,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -879,7 +879,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
product_barebone_region_france_movement , product_barebone_region_france_movement ,
) )
def stepCheckMatchableSaleInvoiceMovements(self, sequence, **kw) : def stepCheckMatchableInvoiceMovements(self, sequence, **kw) :
""" Check that we have a matching cell for the movement """ """ Check that we have a matching cell for the movement """
invoice_transaction_rule = sequence.get("invoice_transaction_rule") invoice_transaction_rule = sequence.get("invoice_transaction_rule")
product_barebone_region_france_movement = sequence.get( product_barebone_region_france_movement = sequence.get(
...@@ -960,7 +960,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -960,7 +960,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
invoice_transaction_rule._getMatchingCell( invoice_transaction_rule._getMatchingCell(
product_barebone_region_france_movement )) product_barebone_region_france_movement ))
def stepCreateNotMatchableSaleInvoiceMovements(self, sequence, **kw) : def stepCreateNotMatchableInvoiceMovements(self, sequence, **kw) :
""" create a temp movement that not any cell could match. """ """ create a temp movement that not any cell could match. """
from Products.ERP5Type.Document import newTempMovement from Products.ERP5Type.Document import newTempMovement
bad_movement1 = newTempMovement( bad_movement1 = newTempMovement(
...@@ -980,7 +980,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -980,7 +980,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
bad_movement2 = bad_movement2, bad_movement2 = bad_movement2,
) )
def stepCheckNotMatchableSaleInvoiceMovements(self, sequence, **kw) : def stepCheckNotMatchableInvoiceMovements(self, sequence, **kw) :
""" check that temp movement that cannot be matched is not matched. """ """ check that temp movement that cannot be matched is not matched. """
invoice_transaction_rule = sequence.get('invoice_transaction_rule') invoice_transaction_rule = sequence.get('invoice_transaction_rule')
self.assertEqual(None, self.assertEqual(None,
...@@ -1415,9 +1415,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1415,9 +1415,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
LOG('Testing... ', INFO, message) LOG('Testing... ', INFO, message)
self.playSequence(""" self.playSequence("""
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepTic stepTic
stepCheckAddPredicate stepCheckAddPredicate
stepTic stepTic
...@@ -1442,16 +1442,16 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1442,16 +1442,16 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepTic stepTic
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateProducts stepCreateProducts
stepTic stepTic
stepCreateDummyInvoice stepCreateDummyInvoice
stepCreateMatchableSaleInvoiceMovements stepCreateMatchableInvoiceMovements
stepCheckMatchableSaleInvoiceMovements stepCheckMatchableInvoiceMovements
stepCreateNotMatchableSaleInvoiceMovements stepCreateNotMatchableInvoiceMovements
stepCheckNotMatchableSaleInvoiceMovements stepCheckNotMatchableInvoiceMovements
""", quiet=quiet) """, quiet=quiet)
def test_04_SimpleInvoice(self, quiet=QUIET, run=RUN_ALL_TESTS): def test_04_SimpleInvoice(self, quiet=QUIET, run=RUN_ALL_TESTS):
...@@ -1471,14 +1471,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1471,14 +1471,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateSimpleSaleInvoice stepCreateSimpleInvoice
stepPlanInvoice stepPlanInvoice
stepTic stepTic
stepCheckFirstRuleIsApplied stepCheckFirstRuleIsApplied
...@@ -1506,14 +1506,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1506,14 +1506,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateSimpleSaleInvoice stepCreateSimpleInvoice
stepConfirmInvoice stepConfirmInvoice
stepTic stepTic
stepCheckNoAccountingLinesBuiltYet stepCheckNoAccountingLinesBuiltYet
...@@ -1540,14 +1540,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1540,14 +1540,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateSimpleSaleInvoiceTwoLines stepCreateSimpleInvoiceTwoLines
stepConfirmInvoice stepConfirmInvoice
stepTic stepTic
stepCheckNoAccountingLinesBuiltYet stepCheckNoAccountingLinesBuiltYet
...@@ -1574,14 +1574,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1574,14 +1574,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateSimpleSaleInvoiceTwoCells stepCreateSimpleInvoiceTwoCells
stepConfirmInvoice stepConfirmInvoice
stepTic stepTic
stepCheckNoAccountingLinesBuiltYet stepCheckNoAccountingLinesBuiltYet
...@@ -1611,9 +1611,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1611,9 +1611,9 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
...@@ -1646,14 +1646,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1646,14 +1646,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateOtherSimpleSaleInvoice stepCreateOtherSimpleInvoice
stepPlanInvoice stepPlanInvoice
stepTic stepTic
stepEditInvoiceLine stepEditInvoiceLine
...@@ -1681,14 +1681,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1681,14 +1681,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateSimpleSaleInvoice stepCreateSimpleInvoice
stepAddInvoiceLine stepAddInvoiceLine
stepPlanInvoice stepPlanInvoice
stepTic stepTic
...@@ -1718,14 +1718,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1718,14 +1718,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateOtherSimpleSaleInvoice stepCreateOtherSimpleInvoice
stepPlanInvoice stepPlanInvoice
stepTic stepTic
stepAddCellsInInvoiceLine stepAddCellsInInvoiceLine
...@@ -1754,14 +1754,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1754,14 +1754,14 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateSimpleSaleInvoice stepCreateSimpleInvoice
stepPlanInvoice stepPlanInvoice
stepTic """ + stepTic """ +
(""" ("""
...@@ -1795,17 +1795,17 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1795,17 +1795,17 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
stepCreateEntities stepCreateEntities
stepCreateCurrencies stepCreateCurrencies
stepCreateProducts stepCreateProducts
stepCreateSaleInvoiceTransactionRule stepCreateInvoiceTransactionRule
stepTic stepTic
stepUpdateSaleInvoiceTransactionRuleMatrix stepUpdateInvoiceTransactionRuleMatrix
stepValidateSaleInvoiceTransaction stepValidateInvoiceTransaction
stepTic stepTic
stepCreateNotebookFranceCell stepCreateNotebookFranceCell
stepCreateBareboneFranceCell stepCreateBareboneFranceCell
stepTic stepTic
stepClearSimulation stepClearSimulation
stepClearAccountingModule stepClearAccountingModule
stepCreateMultiLineSaleInvoice stepCreateMultiLineInvoice
stepPlanInvoice stepPlanInvoice
stepConfirmInvoice stepConfirmInvoice
stepTic stepTic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment