Merge lp:~camptocamp/oerpscenario/6.1-main-focus-account_credit_control into lp:oerpscenario/6.1-ruby-legacy

Proposed by Guewen Baconnier @ Camptocamp
Status: Merged
Merged at revision: 245
Proposed branch: lp:~camptocamp/oerpscenario/6.1-main-focus-account_credit_control
Merge into: lp:oerpscenario/6.1-ruby-legacy
Diff against target: 1373 lines (+529/-336) (has conflicts)
16 files modified
Rakefile (+2/-2)
fcl.conf (+5/-1)
features/01_base_finance_setup/00_initial_params.feature (+1/-0)
features/01_base_finance_setup/04_partners.feature (+19/-7)
features/oerp_addons/account_credit_control/00_credit_control_param.feature (+21/-7)
features/oerp_addons/account_credit_control/01_credit_control_partners.feature (+88/-33)
features/oerp_addons/account_credit_control/02_credit_control_invoices.feature (+121/-21)
features/oerp_addons/account_credit_control/03_credit_control_run_jan.feature (+7/-9)
features/oerp_addons/account_credit_control/04_credit_control_run_feb.feature (+13/-16)
features/oerp_addons/account_credit_control/05_credit_control_run_mar.feature (+47/-23)
features/oerp_addons/account_credit_control/06_credit_control_run_apr.feature (+24/-35)
features/oerp_addons/account_credit_control/07_credit_control_run_may.feature (+92/-45)
features/oerp_addons/account_credit_control/08_credit_control_run_jun.feature (+20/-49)
features/oerp_addons/account_credit_control/09_credit_control_run_jul.feature (+17/-50)
features/oerp_addons/account_credit_control/step_definitions/credit_control.rb (+52/-29)
features/oerp_addons/account_voucher/steps_definition/account_voucher.rb (+0/-9)
Text conflict in fcl.conf
To merge this branch: bzr merge lp:~camptocamp/oerpscenario/6.1-main-focus-account_credit_control
Reviewer Review Type Date Requested Status
C2C OERPScenario Pending
Review via email: mp+131013@code.launchpad.net
To post a comment you must log in.
247. By Guewen Baconnier @ Camptocamp <email address hidden>

[IMP] configure accounts on policies

248. By Guewen Baconnier @ Camptocamp <email address hidden>

[ADD] account_credit_control: test for a paid invoice

249. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] use 2012 year instead of current year because tests are all based on 2012

250. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] remove print statements in account voucher steps

251. By Guewen Baconnier @ Camptocamp <email address hidden>

[ADD] credit control test for invoices partially paid

252. By Guewen Baconnier @ Camptocamp <email address hidden>

[ADD] scenario with a 2 times payment terms and one move line paid

253. By Guewen Baconnier @ Camptocamp <email address hidden>

[ADD] credit control test: 2 times payment term, pay only a part of first move

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Updated with some tests with payments.

254. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] canal is not a correct english word in this context, replaced by channel

255. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] rename the channel "manual" to "letter", that's more self-explanatory

256. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] replace removed fields mark_all and mail_all on credit control wizards

257. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] change wordings according to changes on module

258. By <email address hidden>

[FIX] correction tags

259. By Guewen Baconnier @ Camptocamp <email address hidden>

[FIX] merge tips

260. By <email address hidden>

[IMP] email & language

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Rakefile'
2--- Rakefile 2012-10-19 13:01:38 +0000
3+++ Rakefile 2012-11-09 07:35:21 +0000
4@@ -73,8 +73,8 @@
5 task.cucumber_opts = %W(--tags=@base_finance features #{conf_file})
6 end
7
8-Cucumber::Rake::Task.new(:credit_management, "Run the credit control tests") do |task|
9- task.cucumber_opts = %W(--tags=@credit_management features #{conf_file})
10+Cucumber::Rake::Task.new(:credit_control, "Run the credit control tests") do |task|
11+ task.cucumber_opts = %W(--tags=@credit_control features #{conf_file})
12 end
13
14 Cucumber::Rake::Task.new(:voucher_test, "Perform test on voucher") do |task|
15
16=== modified file 'fcl.conf'
17--- fcl.conf 2012-10-24 12:40:31 +0000
18+++ fcl.conf 2012-11-09 07:35:21 +0000
19@@ -18,9 +18,13 @@
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #
22 ##############################################################################
23-port = 6169
24+port = 6569
25 user = admin
26+<<<<<<< TREE
27 database = credit_control
28+=======
29+database = Credit_control_1
30+>>>>>>> MERGE-SOURCE
31 password = admin
32 host = localhost
33
34
35=== modified file 'features/01_base_finance_setup/00_initial_params.feature'
36--- features/01_base_finance_setup/00_initial_params.feature 2012-10-30 08:36:32 +0000
37+++ features/01_base_finance_setup/00_initial_params.feature 2012-11-09 07:35:21 +0000
38@@ -23,6 +23,7 @@
39 | purchase |
40 | sale |
41 | stock_move_change_delivery_date |
42+ |report_webkit_lib |
43 # | product_standard_margin |
44 # | product_historical_margin |
45 # | report_webkit_lib |
46
47=== modified file 'features/01_base_finance_setup/04_partners.feature'
48--- features/01_base_finance_setup/04_partners.feature 2012-09-14 12:07:23 +0000
49+++ features/01_base_finance_setup/04_partners.feature 2012-11-09 07:35:21 +0000
50@@ -28,7 +28,19 @@
51 | name | Luc Maurer |
52 | zip | 1015 |
53 | city | lausanne |
54- | email | openerp@locahost.dummy |
55+ | email | partner_1@camptocamp.com |
56+ | phone | +41 21 619 10 12 |
57+ | street | PSE-A, EPF |
58+ | partner_id | by oid: scen.partner_1 |
59+
60+ Given I need a "res.partner.address" with oid: scen.partner_1_add_inv
61+ And having:
62+ | name | value |
63+ | type | invoice |
64+ | name | Stéphanie Debayle |
65+ | zip | 1015 |
66+ | city | lausanne |
67+ | email | partner_1_stephanie@camptocamp.com |
68 | phone | +41 21 619 10 12 |
69 | street | PSE-A, EPF |
70 | partner_id | by oid: scen.partner_1 |
71@@ -139,7 +151,7 @@
72 | name | Guewen Baconnier |
73 | zip | 1800 |
74 | city | Orbe |
75- | email | openerp@locahost.dummy |
76+ | email | customer_1@camptocamp.com |
77 | phone | +41 21 619 10 13 |
78 | street | PSE-A, EPF |
79 | partner_id | by oid: scen.customer_1 |
80@@ -161,7 +173,7 @@
81 | name | Nicolas Bessi |
82 | zip | 1456 |
83 | city | Pentalaz |
84- | email | openerp@locahost.dummy |
85+ | email | customer_2@camptocamp.com |
86 | phone | +41 21 619 10 16 |
87 | street | PSE-A, EPF |
88 | partner_id | by oid: scen.customer_2 |
89@@ -183,7 +195,7 @@
90 | name | Yannick Vauchet |
91 | zip | 1456 |
92 | city | Neuchatel |
93- | email | openerp@locahost.dummy |
94+ | email | customer_3@camptocamp.com |
95 | phone | +41 21 619 10 18 |
96 | street | PSE-A, EPF |
97 | partner_id | by oid: scen.customer_3 |
98@@ -205,7 +217,7 @@
99 | name | Alexandre Fayolle |
100 | zip | 1456 |
101 | city | Neuchatel |
102- | email | openerp@locahost.dummy |
103+ | email | customer_4@camptocamp.com |
104 | phone | +41 21 619 10 18 |
105 | street | PSE-A, EPF |
106 | partner_id | by oid: scen.customer_4 |
107@@ -228,7 +240,7 @@
108 | name | Barack Obama |
109 | zip | 20500 |
110 | city | Washington, DC |
111- | email | openerp@locahost.dummy |
112+ | email | customer_5@camptocamp.com |
113 | phone | +01 21 619 20 88 |
114 | street | 1600 Pennsylvania Ave |
115 | partner_id | by oid: scen.customer_5 |
116@@ -251,7 +263,7 @@
117 | name | Maxime Wiot |
118 | zip | 1456 |
119 | city | Neuchatel |
120- | email | openerp@locahost.dummy |
121+ | email | customer_6@camptocamp.com |
122 | phone | +33 21 619 20 88 |
123 | street | PSE-A, EPF |
124 | partner_id | by oid: scen.customer_6 |
125\ No newline at end of file
126
127=== modified file 'features/oerp_addons/account_credit_control/00_credit_control_param.feature'
128--- features/oerp_addons/account_credit_control/00_credit_control_param.feature 2012-10-19 12:46:17 +0000
129+++ features/oerp_addons/account_credit_control/00_credit_control_param.feature 2012-11-09 07:35:21 +0000
130@@ -6,16 +6,30 @@
131 ##############################################################################
132 ##############################################################################
133 # Branch # Module # Processes # System
134-@credit_management
135+@credit_control
136
137 Feature: In order to validate account voucher behavious as an admin user I prepare data
138
139- @credit_management_setup_install_modules
140+ @credit_control_setup_install_modules
141 Scenario: MODULES INSTALLATION
142
143 Given I do not want all demo data to be loaded on install
144- And I install the required modules with dependencies:
145- | name |
146- | account_credit_management |
147-
148- Then my modules should have been installed and models reloaded
149\ No newline at end of file
150+ And I install the required modules:
151+ | name |
152+ | account_credit_control |
153+
154+ Then my modules should have been installed and models reloaded
155+
156+ @credit_control_policy_2_times
157+ Scenario: Configure the credit control policy in 2 times
158+ Given I configure the following accounts on the credit control policy with oid: "account_credit_control.credit_control_2_time":
159+ | account code |
160+ | 4111 |
161+ | 4112 |
162+
163+ @credit_control_policy_3_times
164+ Scenario: Configure the credit control policy in 3 times
165+ Given I configure the following accounts on the credit control policy with oid: "account_credit_control.credit_control_3_time":
166+ | account code |
167+ | 4111 |
168+ | 4112 |
169
170=== modified file 'features/oerp_addons/account_credit_control/01_credit_control_partners.feature'
171--- features/oerp_addons/account_credit_control/01_credit_control_partners.feature 2012-10-19 12:46:17 +0000
172+++ features/oerp_addons/account_credit_control/01_credit_control_partners.feature 2012-11-09 07:35:21 +0000
173@@ -6,61 +6,116 @@
174 ##############################################################################
175 ##############################################################################
176 # Branch # Module # Processes # System
177-@credit_management @credit_management_add_profile
178+@credit_control @credit_control_add_policy
179
180-Feature: I add profile to partners already created
181- @credit_management_partner_1
182+Feature: I add policy to partners already created
183+ @credit_control_partner_1
184 Scenario: Partner_1
185 Given I need a "res.partner" with oid: scen.partner_1
186 And having:
187- | name | value |
188- | name | partner_1 |
189- | credit_profile_id | by name: No follow |
190-
191- @credit_management_customer_1
192+ | name | value |
193+ | name | partner_1 |
194+ | credit_policy_id | by name: No follow |
195+
196+ @credit_control_customer_1
197 Scenario: Customer_1
198 Given I need a "res.partner" with oid: scen.customer_1
199 And having:
200- | name | value |
201- | name | customer_1 |
202- | credit_profile_id | by name: 2 time policy|
203-
204- @credit_management_customer_2
205+ | name | value |
206+ | name | customer_1 |
207+ | credit_policy_id | by name: 2 time policy |
208+
209+ @credit_control_customer_2
210 Scenario: Customer_2
211 Given I need a "res.partner" with oid: scen.customer_2
212 And having:
213- | name | value |
214- | name | customer_2 |
215- | credit_profile_id | by name: 2 time policy|
216+ | name | value |
217+ | name | customer_2 |
218+ | credit_policy_id | by name: 2 time policy |
219
220- @credit_management_customer_3
221+ @credit_control_customer_3
222 Scenario: Customer_3
223 Given I need a "res.partner" with oid: scen.customer_3
224 And having:
225- | name | value |
226- | name | customer_3 |
227- | credit_profile_id | by name: 2 time policy|
228+ | name | value |
229+ | name | customer_3 |
230+ | credit_policy_id | by name: 2 time policy |
231
232- @credit_management_customer_4
233+ @credit_control_customer_4
234 Scenario: Customer_4
235 Given I need a "res.partner" with oid: scen.customer_4
236 And having:
237- | name | value |
238- | name | customer_4 |
239- | credit_profile_id | by name: 3 time policy|
240+ | name | value |
241+ | name | customer_4 |
242+ # the credit policy must be 3 time policy (inherited from company)
243
244- @credit_management_customer_5
245+ @credit_control_customer_5
246 Scenario: Customer_5
247 Given I need a "res.partner" with oid: scen.customer_5
248 And having:
249- | name | value |
250- | name | customer_5_usd |
251- | credit_profile_id | by name: 3 time policy|
252-
253- @credit_management_customer_6
254+ | name | value |
255+ | name | customer_5_usd |
256+ | credit_policy_id | by name: 3 time policy |
257+
258+ @credit_control_customer_6
259 Scenario: Customer_6
260 Given I need a "res.partner" with oid: scen.customer_6
261 And having:
262- | name | value |
263- | name | customer_6 |
264- | credit_profile_id | by name: 3 time policy|
265+ | name | value |
266+ | name | customer_6 |
267+ | credit_policy_id | by name: 3 time policy |
268+
269+ @credit_control_customer_partial_pay
270+ Scenario: A customer who like to do partial payments
271+ Given I need a "res.partner" with oid: scen.customer_partial_pay
272+ And having:
273+ | name | value |
274+ | name | Scrooge McDuck |
275+ Given I need a "res.partner.address" with oid: scen.customer_partial_pay_address
276+ And having:
277+ | name | value |
278+ | type | default |
279+ | name | Scrooge McDuck |
280+ | zip | 1000 |
281+ | city | Duckburg |
282+ | email | openerp@locahost.dummy |
283+ | phone | |
284+ | street | Duckstreet |
285+ | partner_id | by oid: scen.customer_partial_pay |
286+
287+ @credit_control_customer_multiple_payterm
288+ Scenario: A customer who use payment terms in 2 times
289+ Given I need a "res.partner" with oid: scen.customer_multiple_payterm
290+ And having:
291+ | name | value |
292+ | name | Donald Duck |
293+ Given I need a "res.partner.address" with oid: scen.customer_add_multiple_payterm
294+ And having:
295+ | name | value |
296+ | type | default |
297+ | name | Donald Duck |
298+ | zip | 1100 |
299+ | city | Duckburg |
300+ | email | openerp@locahost.dummy |
301+ | phone | |
302+ | street | Duckstreet |
303+ | partner_id | by oid: scen.customer_multiple_payterm |
304+
305+ @credit_control_customer_multiple_payterm2
306+ Scenario: A customer who use payment terms in 2 times
307+ Given I need a "res.partner" with oid: scen.customer_multiple_payterm2
308+ And having:
309+ | name | value |
310+ | name | Gus Goose |
311+ Given I need a "res.partner.address" with oid: scen.customer_add_multiple_payterm2
312+ And having:
313+ | name | value |
314+ | type | default |
315+ | name | Gus Goose |
316+ | zip | 1100 |
317+ | city | Duckburg |
318+ | email | openerp@locahost.dummy |
319+ | phone | |
320+ | street | Duckstreet |
321+ | partner_id | by oid: scen.customer_multiple_payterm2 |
322+
323
324=== modified file 'features/oerp_addons/account_credit_control/02_credit_control_invoices.feature'
325--- features/oerp_addons/account_credit_control/02_credit_control_invoices.feature 2012-10-19 12:46:17 +0000
326+++ features/oerp_addons/account_credit_control/02_credit_control_invoices.feature 2012-11-09 07:35:21 +0000
327@@ -6,7 +6,7 @@
328 ##############################################################################
329
330
331-@credit_management @credit_management_base_data @credit_management_invoices
332+@credit_control @credit_control_base_data @credit_control_invoices
333
334 Feature: Invoices creation
335
336@@ -14,12 +14,12 @@
337
338 @inv_1
339 Scenario: Create invoice 1
340-
341+
342 Given I need a "account.invoice" with oid: scen._inv_1
343 And having:
344 | name | value |
345 | name | SI_1 |
346- | date_invoice | %Y-01-15 |
347+ | date_invoice | 2012-01-15 |
348 | address_invoice_id | by oid: scen.partner_1_add |
349 | partner_id | by oid: scen.partner_1 |
350 | account_id | by name: Debtors |
351@@ -39,8 +39,8 @@
352 | invoice_id | by oid:scen._inv_1 |
353 Given I find a "account.invoice" with oid: scen._inv_1
354 And I open the credit invoice
355-
356- Given I need a "account.invoice.line" with oid: scen._inv1_line2
357+
358+ Given I need a "account.invoice.line" with oid: scen._inv1_line2
359 And having:
360 | name | value |
361 | name | invoice line 2 |
362@@ -57,7 +57,7 @@
363 And having:
364 | name | value |
365 | name | SI_2 |
366- | date_invoice | %Y-02-15 |
367+ | date_invoice | 2012-02-15 |
368 | address_invoice_id | by oid: scen.partner_1_add |
369 | partner_id | by oid: scen.partner_1 |
370 | account_id | by name: Debtors |
371@@ -85,7 +85,7 @@
372 And having:
373 | name | value |
374 | name | SI_3 |
375- | date_invoice | %Y-03-15 |
376+ | date_invoice | 2012-03-15 |
377 | address_invoice_id | by oid: scen.partner_1_add |
378 | partner_id | by oid: scen.partner_1 |
379 | account_id | by name: Debtors |
380@@ -115,7 +115,7 @@
381 And having:
382 | name | value |
383 | name | SI_4 |
384- | date_invoice | %Y-01-18 |
385+ | date_invoice | 2012-01-18 |
386 | address_invoice_id | by oid: scen.customer_2_add |
387 | partner_id | by oid: scen.customer_2 |
388 | account_id | by name: Debtors |
389@@ -144,7 +144,7 @@
390 And having:
391 | name | value |
392 | name | SI_5 |
393- | date_invoice | %Y-02-15 |
394+ | date_invoice | 2012-02-15 |
395 | address_invoice_id | by oid: scen.customer_2_add |
396 | partner_id | by oid: scen.customer_2 |
397 | account_id | by name: Debtors |
398@@ -172,7 +172,7 @@
399 And having:
400 | name | value |
401 | name | SI_6 |
402- | date_invoice | %Y-03-15 |
403+ | date_invoice | 2012-03-15 |
404 | address_invoice_id | by oid: scen.customer_2_add |
405 | partner_id | by oid: scen.customer_2 |
406 | account_id | by name: Debtors |
407@@ -202,7 +202,7 @@
408 And having:
409 | name | value |
410 | name | SI_7 |
411- | date_invoice | %Y-01-18 |
412+ | date_invoice | 2012-01-18 |
413 | address_invoice_id | by oid: scen.customer_3_add |
414 | partner_id | by oid: scen.customer_3 |
415 | account_id | by name: Debtors |
416@@ -231,7 +231,7 @@
417 And having:
418 | name | value |
419 | name | SI_8 |
420- | date_invoice | %Y-02-15 |
421+ | date_invoice | 2012-02-15 |
422 | address_invoice_id | by oid: scen.customer_3_add |
423 | partner_id | by oid: scen.customer_3 |
424 | account_id | by name: Debtors |
425@@ -259,7 +259,7 @@
426 And having:
427 | name | value |
428 | name | SI_9 |
429- | date_invoice | %Y-03-15 |
430+ | date_invoice | 2012-03-15 |
431 | address_invoice_id | by oid: scen.customer_3_add |
432 | partner_id | by oid: scen.customer_3 |
433 | account_id | by name: Debtors |
434@@ -289,7 +289,7 @@
435 And having:
436 | name | value |
437 | name | SI_10 |
438- | date_invoice | %Y-01-18 |
439+ | date_invoice | 2012-01-18 |
440 | address_invoice_id | by oid: scen.customer_4_add |
441 | partner_id | by oid: scen.customer_4 |
442 | account_id | by name: Debtors |
443@@ -318,7 +318,7 @@
444 And having:
445 | name | value |
446 | name | SI_11 |
447- | date_invoice | %Y-02-15 |
448+ | date_invoice | 2012-02-15 |
449 | address_invoice_id | by oid: scen.customer_4_add |
450 | partner_id | by oid: scen.customer_4 |
451 | account_id | by name: Debtors |
452@@ -346,7 +346,7 @@
453 And having:
454 | name | value |
455 | name | SI_12 |
456- | date_invoice | %Y-03-15 |
457+ | date_invoice | 2012-03-15 |
458 | address_invoice_id | by oid: scen.customer_4_add |
459 | partner_id | by oid: scen.customer_4 |
460 | account_id | by name: Debtors |
461@@ -376,7 +376,7 @@
462 And having:
463 | name | value |
464 | name | SI_13 |
465- | date_invoice | %Y-01-18 |
466+ | date_invoice | 2012-01-18 |
467 | address_invoice_id | by oid: scen.customer_5_add |
468 | partner_id | by oid: scen.customer_5 |
469 | account_id | by name: Debtors USD |
470@@ -405,7 +405,7 @@
471 And having:
472 | name | value |
473 | name | SI_14 |
474- | date_invoice | %Y-02-15 |
475+ | date_invoice | 2012-02-15 |
476 | address_invoice_id | by oid: scen.customer_5_add |
477 | partner_id | by oid: scen.customer_5 |
478 | account_id | by name: Debtors USD |
479@@ -433,7 +433,7 @@
480 And having:
481 | name | value |
482 | name | SI_15 |
483- | date_invoice | %Y-03-15 |
484+ | date_invoice | 2012-03-15 |
485 | address_invoice_id | by oid: scen.customer_5_add |
486 | partner_id | by oid: scen.customer_5 |
487 | account_id | by name: Debtors USD |
488@@ -454,5 +454,105 @@
489 Given I find a "account.invoice" with oid: scen._inv_15
490 And I open the credit invoice
491
492-
493-
494+ @inv_16
495+ Scenario: Create invoice 16
496+ Given I need a "account.invoice" with oid: scen._inv_16
497+ And having:
498+ | name | value |
499+ | name | SI_16 |
500+ | date_invoice | 2012-03-15 |
501+ | address_invoice_id | by oid: scen.customer_4_add |
502+ | partner_id | by oid: scen.customer_4 |
503+ | account_id | by name: Debtors |
504+ | journal_id | by name: Sales |
505+ | currency_id | by name: EUR |
506+ | payment_term | by name: 30 Net Days |
507+ | type | out_invoice |
508+
509+ And I need a "account.invoice.line" with oid: scen._inv16_line1
510+ And having:
511+ | name | value |
512+ | name | invoice line 1 |
513+ | quantity | 1 |
514+ | price_unit | 1500 |
515+ | account_id | by name: Sales |
516+ | invoice_id | by oid:scen._inv_16 |
517+ Then I find a "account.invoice" with oid: scen._inv_16
518+ And I open the credit invoice
519+
520+ @inv_17
521+ Scenario: Create invoice 17
522+ Given I need a "account.invoice" with oid: scen._inv_17
523+ And having:
524+ | name | value |
525+ | name | SI_17 |
526+ | date_invoice | 2012-03-15 |
527+ | address_invoice_id | by oid: scen.customer_partial_pay_address |
528+ | partner_id | by oid: scen.customer_partial_pay |
529+ | account_id | by name: Debtors |
530+ | journal_id | by name: Sales |
531+ | currency_id | by name: EUR |
532+ | payment_term | by name: 30 Net Days |
533+ | type | out_invoice |
534+
535+ And I need a "account.invoice.line" with oid: scen._inv17_line1
536+ And having:
537+ | name | value |
538+ | name | invoice line 1 |
539+ | quantity | 1 |
540+ | price_unit | 1500 |
541+ | account_id | by name: Sales |
542+ | invoice_id | by oid:scen._inv_17 |
543+ Then I find a "account.invoice" with oid: scen._inv_17
544+ And I open the credit invoice
545+
546+ @inv_18
547+ Scenario: Create invoice 18
548+ Given I need a "account.invoice" with oid: scen._inv_18
549+ And having:
550+ | name | value |
551+ | name | SI_18 |
552+ | date_invoice | 2012-03-15 |
553+ | address_invoice_id | by oid: scen.customer_add_multiple_payterm |
554+ | partner_id | by oid: scen.customer_multiple_payterm |
555+ | account_id | by name: Debtors |
556+ | journal_id | by name: Sales |
557+ | currency_id | by name: EUR |
558+ | payment_term | by name: 30% Advance End 30 Days |
559+ | type | out_invoice |
560+
561+ And I need a "account.invoice.line" with oid: scen._inv18_line1
562+ And having:
563+ | name | value |
564+ | name | invoice line 1 |
565+ | quantity | 1 |
566+ | price_unit | 1500 |
567+ | account_id | by name: Sales |
568+ | invoice_id | by oid:scen._inv_18 |
569+ Then I find a "account.invoice" with oid: scen._inv_18
570+ And I open the credit invoice
571+
572+ @inv_19
573+ Scenario: Create invoice 19
574+ Given I need a "account.invoice" with oid: scen._inv_19
575+ And having:
576+ | name | value |
577+ | name | SI_19 |
578+ | date_invoice | 2012-03-15 |
579+ | address_invoice_id | by oid: scen.customer_add_multiple_payterm2 |
580+ | partner_id | by oid: scen.customer_multiple_payterm2 |
581+ | account_id | by name: Debtors |
582+ | journal_id | by name: Sales |
583+ | currency_id | by name: EUR |
584+ | payment_term | by name: 30% Advance End 30 Days |
585+ | type | out_invoice |
586+ And I need a "account.invoice.line" with oid: scen._inv19_line1
587+ And having:
588+ | name | value |
589+ | name | invoice line 1 |
590+ | quantity | 1 |
591+ | price_unit | 1500 |
592+ | account_id | by name: Sales |
593+ | invoice_id | by oid:scen._inv_19 |
594+ Then I find a "account.invoice" with oid: scen._inv_19
595+ And I open the credit invoice
596
597=== modified file 'features/oerp_addons/account_credit_control/03_credit_control_run_jan.feature'
598--- features/oerp_addons/account_credit_control/03_credit_control_run_jan.feature 2012-10-19 12:46:17 +0000
599+++ features/oerp_addons/account_credit_control/03_credit_control_run_jan.feature 2012-11-09 07:35:21 +0000
600@@ -8,25 +8,23 @@
601 # Features Generic tags (none for all)
602 ##############################################################################
603
604-@credit_management @credit_management_run @credit_management_run_jan
605+@credit_control @credit_control_run @credit_control_run_jan
606
607 Feature: Ensure that mail credit line generation first pass is correct
608
609-
610- @credit_management_first_run
611 Scenario: clean data
612 Given I clean all the credit lines
613 #Given I unreconcile and clean all move line
614
615- @credit_management_first_run
616+ @credit_control_run_month
617 Scenario: Create run
618- Given I need a "credit.management.run" with oid: credit_management.run1
619+ Given I need a "credit.control.run" with oid: credit_control.run1
620 And having:
621 | name | value |
622 | date | 2012-01-31 |
623 When I launch the credit run
624 Then my credit run should be in state "done"
625- And credit lines should have following values:
626- | balance | date due | account | profile | date | partner | canal | level | move line | profile rule | state | amount due | currency |
627- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net | draft | 300 | |
628-
629\ No newline at end of file
630+ And the generated credit lines should have the following values:
631+ | balance | date due | account | policy | date | partner |channel| level | move line | policy level | state | amount due | currency |
632+ | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1 | SI_10 | 10 days net | draft | 300 | |
633+
634
635=== modified file 'features/oerp_addons/account_credit_control/04_credit_control_run_feb.feature'
636--- features/oerp_addons/account_credit_control/04_credit_control_run_feb.feature 2012-10-19 12:46:17 +0000
637+++ features/oerp_addons/account_credit_control/04_credit_control_run_feb.feature 2012-11-09 07:35:21 +0000
638@@ -8,30 +8,27 @@
639 # Features Generic tags (none for all)
640 ##############################################################################
641
642- @credit_management_run @credit_management_run_feb
643+@credit_control_run @credit_control_run_feb
644
645 Feature: Ensure that mail credit line generation first pass is correct
646
647- @credit_management_mark
648+ @credit_control_mark
649 Scenario: mark lines
650 Given there is "draft" credit lines
651- And I mark all draft mail to state "to_be_sent"
652+ And I mark all draft email to state "to_be_sent"
653 Then the draft line should be in state "to_be_sent"
654-
655- @credit_management_first_run
656+
657+ @credit_control_run_month
658 Scenario: Create run
659- Given I need a "credit.management.run" with oid: credit_management.run2
660+ Given I need a "credit.control.run" with oid: credit_control.run2
661 And having:
662 | name | value |
663- | date | 2012-02-28 |
664+ | date | 2012-02-29 |
665 When I launch the credit run
666 Then my credit run should be in state "done"
667- And credit lines should have following values:
668- | balance | date due | account | profile | date | partner | canal | level | move line | profile rule | state | amount due | currency |
669- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |to_be_sent | 300 | |
670- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 1.00 | SI_11 | 10 days net | draft | 360 | USD |
671- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-02-28 | customer_5_usd | mail | 1.00 | SI_13 | 10 days net | draft | 1000 | USD |
672- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month | draft | 300 | |
673-
674- # bug on the last line --> has to be level 2 instead of level 3 / manual / sommation
675-
676\ No newline at end of file
677+ And the generated credit lines should have the following values:
678+ | balance | date due | account | policy | date | partner | channel | level | move line | policy level | state | amount due | currency |
679+ | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-02-29 | customer_4 | email | 1 | SI_11 | 10 days net | draft | 360 | USD |
680+ | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-02-29 | customer_5_usd | email | 1 | SI_13 | 10 days net | draft | 1000 | USD |
681+ | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-02-29 | customer_4 | email | 2 | SI_10 | 30 days end of month | draft | 300 | |
682+
683
684=== modified file 'features/oerp_addons/account_credit_control/05_credit_control_run_mar.feature'
685--- features/oerp_addons/account_credit_control/05_credit_control_run_mar.feature 2012-10-19 12:46:17 +0000
686+++ features/oerp_addons/account_credit_control/05_credit_control_run_mar.feature 2012-11-09 07:35:21 +0000
687@@ -8,35 +8,59 @@
688 # Features Generic tags (none for all)
689 ##############################################################################
690
691- @credit_management_run @credit_management_run_mar
692-
693-Feature: Ensure that mail credit line generation first pass is correct
694-
695- @credit_management_mark
696+@credit_control_run @credit_control_run_mar
697+
698+Feature: Ensure that email credit line generation first pass is correct
699+
700+ @credit_control_mark
701 Scenario: mark lines
702 Given there is "draft" credit lines
703- And I mark all draft mail to state "to_be_sent"
704+ And I mark all draft email to state "to_be_sent"
705 Then the draft line should be in state "to_be_sent"
706-
707- @credit_management_run
708+
709+ @pay_invoice_si_19_part1
710+ Scenario: I pay a part of the first part of the invoice SI 19,
711+ Given I need a "account.bank.statement" with oid: scen.voucher_statement_si_19
712+ And having:
713+ | name | value |
714+ | name | Bk.St.si_19_part1 |
715+ | date | 2012-03-31 |
716+ | currency_id | by name: EUR |
717+ | journal_id | by oid: scen.voucher_eur_journal |
718+ And the bank statement is linked to period "03/2012"
719+ And I import invoice "SI_19" using import invoice button
720+ And I should have a "account.bank.statement.line" with name: SI_19 and amount: 450
721+ And the line amount should be 450
722+ And I set the voucher paid amount to "300"
723+ And I save the voucher
724+ Then I modify the line amount to 300
725+ And I should have a "account.bank.statement.line" with name: SI_19 and amount: 1050
726+ And the line amount should be 1050
727+ And I set the voucher paid amount to "0"
728+ And I save the voucher
729+ Then I modify the line amount to 0
730+ And I should have a "account.bank.statement" with oid: scen.voucher_statement_si_19
731+ And I set bank statement end-balance
732+ When I confirm bank statement
733+ Then My invoice "SI_19" is in state "open" reconciled with a residual amount of "1200.0"
734+
735+ @credit_control_run_month
736 Scenario: Create run
737- Given I need a "credit.management.run" with oid: credit_management.run3
738+ Given I need a "credit.control.run" with oid: credit_control.run3
739 And having:
740 | name | value |
741 | date | 2012-03-31 |
742 When I launch the credit run
743 Then my credit run should be in state "done"
744- And credit lines should have following values:
745- | balance | date due | account | profile | date | partner | canal | level | move line | profile rule | state | amount due | currency |
746- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 300 | |
747- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 360 | USD |
748- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-02-28 | customer_5_usd | mail | 1.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
749- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 300 | |
750- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-03-31 | customer_2 | mail | 1.00 | SI_4 | 30 days end of month | draft | 360 | USD |
751- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-03-31 | customer_3 | mail | 1.00 | SI_7 | 30 days end of month | draft | 1000 | |
752- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net | draft | 700 | |
753- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_12 | 10 days net | draft | 450 | USD |
754- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 1.00 | SI_14 | 10 days net | draft | 1200 | USD |
755- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 2.00 | SI_11 | 10 days net | draft | 360 | USD |
756- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 2.00 | SI_13 | 10 days net | draft | 1000 | USD |
757- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-03-31 | customer_4 | manual| 3.00 | SI_10 | 10 days net | draft | 300 | |
758\ No newline at end of file
759+ And the generated credit lines should have the following values:
760+ | balance | date due | account | policy | date | partner | channel | level | move line | policy level | state | amount due | currency |
761+ | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-03-31 | customer_2 | email | 1 | SI_4 | 30 days end of month | draft | 1000 | |
762+ | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-03-31 | customer_3 | email | 1 | SI_7 | 30 days end of month | draft | 1000 | |
763+ | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-03-31 | customer_4 | email | 1 | SI_10 | 10 days net | draft | 700 | |
764+ | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | email | 1 | SI_12 | 10 days net | draft | 450 | |
765+ | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | email | 1 | SI_14 | 10 days net | draft | 1200 | USD |
766+ | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | email | 2 | SI_11 | 30 days end of month | draft | 360 | USD |
767+ | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | email | 2 | SI_13 | 30 days end of month | draft | 1000 | USD |
768+ | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-03-31 | customer_4 | letter | 3 | SI_10 | 10 days last reminder | draft | 300 | |
769+ | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | Donald Duck | email | 1 | SI_18 | 10 days net | draft | 450 | |
770+ | 150 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | Gus Goose | email | 1 | SI_19 | 10 days net | draft | 450 | |
771
772=== modified file 'features/oerp_addons/account_credit_control/06_credit_control_run_apr.feature'
773--- features/oerp_addons/account_credit_control/06_credit_control_run_apr.feature 2012-10-19 12:46:17 +0000
774+++ features/oerp_addons/account_credit_control/06_credit_control_run_apr.feature 2012-11-09 07:35:21 +0000
775@@ -8,48 +8,37 @@
776 # Features Generic tags (none for all)
777 ##############################################################################
778
779- @credit_management_run @credit_management_run_apr
780-
781-Feature: Ensure that mail credit line generation first pass is correct
782-
783- @credit_management_mark
784+@credit_control_run @credit_control_run_apr
785+
786+Feature: Ensure that email credit line generation first pass is correct
787+
788+ @credit_control_mark
789 Scenario: mark lines
790 Given there is "draft" credit lines
791- And I mark all draft mail to state "to_be_sent"
792+ And I mark all draft email to state "to_be_sent"
793 Then the draft line should be in state "to_be_sent"
794
795- @credit_management_run
796+ @credit_control_run_month
797 Scenario: Create run
798- Given I need a "credit.management.run" with oid: credit_management.run4
799+ Given I need a "credit.control.run" with oid: credit_control.run4
800 And having:
801 | name | value |
802 | date | 2012-04-30 |
803 When I launch the credit run
804 Then my credit run should be in state "done"
805- And credit lines should have following values:
806- | balance | date due | account | profile | date | partner | canal | level | move line | profile rule | state | amount due | currency |
807- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 300 | |
808- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 360 | USD |
809- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-02-28 | customer_5_usd | mail | 1.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
810- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 300 | |
811- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-03-31 | customer_2 | mail | 1.00 | SI_4 | 30 days end of month |To be sent | 360 | USD |
812- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-03-31 | customer_3 | mail | 1.00 | SI_7 | 30 days end of month |To be sent | 1000 | |
813- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 700 | |
814- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_12 | 10 days net |To be sent | 450 | USD |
815- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 1.00 | SI_14 | 10 days net |To be sent | 1200 | USD |
816- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 2.00 | SI_11 | 10 days net |To be sent | 360 | USD |
817- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 2.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
818- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-03-31 | customer_4 | manual| 3.00 | SI_10 | 10 days net |To be sent | 300 | |
819- | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-04-30 | customer_2 | mail | 1.00 | SI_5 | 30 days end of month | draft | 1200 | USD |
820- | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-04-30 | customer_3 | mail | 1.00 | SI_8 | 30 days end of month | draft | 1200 | USD |
821- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 1.00 | SI_11 | 10 days net | draft | 840 | USD |
822- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 1.00 | SI_15 | 10 days net | draft | 1500 | USD |
823- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month | draft | 700 | USD |
824- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_12 | 30 days end of month | draft | 450 | USD |
825- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 2.00 | SI_14 | 30 days end of month | draft | 1200 | USD |
826- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation | draft | 360 | USD |
827- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | manual| 3.00 | SI_14 | 10 days sommation | draft | 1000 | USD |
828-
829-
830-
831-
832\ No newline at end of file
833+ And the generated credit lines should have the following values:
834+ | balance | date due | account | policy | date | partner | channel | level | move line | policy level | state | amount due | currency |
835+ | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-04-30 | customer_2 | email | 1 | SI_5 | 30 days end of month | draft | 1200 | USD |
836+ | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-04-30 | customer_3 | email | 1 | SI_8 | 30 days end of month | draft | 1200 | USD |
837+ | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-04-30 | customer_4 | email | 1 | SI_11 | 10 days net | draft | 840 | USD |
838+ | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | email | 1 | SI_15 | 10 days net | draft | 1500 | USD |
839+ | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-04-30 | customer_4 | email | 2 | SI_10 | 30 days end of month | draft | 700 | |
840+ | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | email | 2 | SI_12 | 30 days end of month | draft | 450 | USD |
841+ | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | email | 2 | SI_14 | 30 days end of month | draft | 1200 | USD |
842+ | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | letter | 3 | SI_12 | 10 days last reminder | draft | 360 | USD |
843+ | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | letter | 3 | SI_14 | 10 days last reminder | draft | 1000 | USD |
844+ | 1500 | 2012-04-14 | Debtors | 3 time policy | 2012-04-30 | customer_4 | email | 1 | SI_16 | 10 days net | draft | 1500 | |
845+ | 1500 | 2012-04-14 | Debtors | 3 time policy | 2012-04-30 | customer_4 | email | 1 | SI_17 | 10 days net | draft | 1500 | |
846+ | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-04-30 | Donald Duck | email | 2 | SI_18 | 30 days end of month | draft | 450 | |
847+ | 150 | 2012-03-15 | Debtors | 3 time policy | 2012-04-30 | Gus Goose | email | 2 | SI_19 | 30 days end of month | draft | 450 | |
848+
849
850=== modified file 'features/oerp_addons/account_credit_control/07_credit_control_run_may.feature'
851--- features/oerp_addons/account_credit_control/07_credit_control_run_may.feature 2012-10-19 12:46:17 +0000
852+++ features/oerp_addons/account_credit_control/07_credit_control_run_may.feature 2012-11-09 07:35:21 +0000
853@@ -8,57 +8,104 @@
854 # Features Generic tags (none for all)
855 ##############################################################################
856
857- @credit_management_run @credit_management_run_may
858-
859-Feature: Ensure that mail credit line generation first pass is correct
860-
861- @credit_management_mark
862+@credit_control_run @credit_control_run_may
863+
864+Feature: Ensure that email credit line generation first pass is correct
865+
866+ @credit_control_mark
867 Scenario: mark lines
868 Given there is "draft" credit lines
869- And I mark all draft mail to state "to_be_sent"
870+ And I mark all draft email to state "to_be_sent"
871 Then the draft line should be in state "to_be_sent"
872-
873- @credit_management_run
874+
875+ @pay_invoice_si_16
876+ Scenario: I pay entirely the invoice SI 16,
877+ so it should no longer appear in the credit control lines
878+ Given I need a "account.bank.statement" with oid: scen.voucher_statement_si_16
879+ And having:
880+ | name | value |
881+ | name | Bk.St.si_16 |
882+ | date | 2012-05-30 |
883+ | currency_id | by name: EUR |
884+ | journal_id | by oid: scen.voucher_eur_journal |
885+ And the bank statement is linked to period "05/2012"
886+ And I import invoice "SI_16" using import invoice button
887+ And I set bank statement end-balance
888+ When I confirm bank statement
889+ Then My invoice "SI_16" is in state "paid" reconciled with a residual amount of "0.0"
890+
891+ @pay_invoice_si_17
892+ Scenario: I pay entirely the invoice SI 17,
893+ so it should no longer appear in the credit control lines
894+ Given I need a "account.bank.statement" with oid: scen.voucher_statement_si_17
895+ And having:
896+ | name | value |
897+ | name | Bk.St.si_17 |
898+ | date | 2012-05-30 |
899+ | currency_id | by name: EUR |
900+ | journal_id | by oid: scen.voucher_eur_journal |
901+ And the bank statement is linked to period "05/2012"
902+ And I import invoice "SI_17" using import invoice button
903+ And I need a "account.bank.statement.line" with name: SI_17
904+ And the line amount should be 1500
905+ And I set the voucher paid amount to "1000"
906+ And I save the voucher
907+ Then I modify the line amount to 1000
908+ And I should have a "account.bank.statement" with oid: scen.voucher_statement_si_17
909+ And I set bank statement end-balance
910+ When I confirm bank statement
911+ Then My invoice "SI_17" is in state "open" reconciled with a residual amount of "500.0"
912+
913+ @pay_invoice_si_18_part1
914+ Scenario: I pay the first part of the invoice SI 18,
915+ so it should no longer appear in the credit control lines
916+ however, the second move lines should still appears
917+ Given I need a "account.bank.statement" with oid: scen.voucher_statement_si_18
918+ And having:
919+ | name | value |
920+ | name | Bk.St.si_18_part1 |
921+ | date | 2012-05-30 |
922+ | currency_id | by name: EUR |
923+ | journal_id | by oid: scen.voucher_eur_journal |
924+ And the bank statement is linked to period "05/2012"
925+ And I import invoice "SI_18" using import invoice button
926+ And I should have a "account.bank.statement.line" with name: SI_18 and amount: 450
927+ And the line amount should be 450
928+ And I set the voucher paid amount to "450"
929+ And I save the voucher
930+ Then I modify the line amount to 450
931+ And I should have a "account.bank.statement.line" with name: SI_18 and amount: 1050
932+ And the line amount should be 1050
933+ And I set the voucher paid amount to "0"
934+ And I save the voucher
935+ Then I modify the line amount to 0
936+ And I should have a "account.bank.statement" with oid: scen.voucher_statement_si_18
937+ And I set bank statement end-balance
938+ When I confirm bank statement
939+ Then My invoice "SI_18" is in state "open" reconciled with a residual amount of "1050.0"
940+
941+ @credit_control_run_month
942 Scenario: Create run
943- Given I need a "credit.management.run" with oid: credit_management.run5
944+ Given I need a "credit.control.run" with oid: credit_control.run5
945 And having:
946 | name | value |
947 | date | 2012-05-31 |
948 When I launch the credit run
949 Then my credit run should be in state "done"
950- And credit lines should have following values:
951- | balance | date due | account | profile | date | partner | canal | level | move line | profile rule | state | amount due | currency |
952- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 300 | |
953- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 360 | USD |
954- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-02-28 | customer_5_usd | mail | 1.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
955- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 300 | |
956- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-03-31 | customer_2 | mail | 1.00 | SI_4 | 30 days end of month |To be sent | 360 | USD |
957- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-03-31 | customer_3 | mail | 1.00 | SI_7 | 30 days end of month |To be sent | 1000 | |
958- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 700 | |
959- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_12 | 10 days net |To be sent | 450 | USD |
960- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 1.00 | SI_14 | 10 days net |To be sent | 1200 | USD |
961- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 2.00 | SI_11 | 10 days net |To be sent | 360 | USD |
962- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 2.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
963- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-03-31 | customer_4 | manual| 3.00 | SI_10 | 10 days net |To be sent | 300 | |
964- | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-04-30 | customer_2 | mail | 1.00 | SI_5 | 30 days end of month |To be sent | 1200 | USD |
965- | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-04-30 | customer_3 | mail | 1.00 | SI_8 | 30 days end of month |To be sent | 1200 | USD |
966- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 840 | USD |
967- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 1.00 | SI_15 | 10 days net |To be sent | 1500 | USD |
968- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 700 | USD |
969- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_12 | 30 days end of month |To be sent | 450 | USD |
970- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 2.00 | SI_14 | 30 days end of month |To be sent | 1200 | USD |
971- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation |To be sent | 360 | USD |
972- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | manual| 3.00 | SI_14 | 10 days sommation |To be sent | 1000 | USD |
973- | 1500 | 2012-04-30 | Debtors | 2 time policy | 2012-05-31 | customer_2 | mail | 1.00 | SI_6 | 30 days end of month | draft | 1500 | USD |
974- | 1500 | 2012-04-14 | Debtors | 2 time policy | 2012-05-31 | customer_3 | mail | 1.00 | SI_8 | 30 days end of month | draft | 1500 | USD |
975- | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-05-31 | customer_4 | mail | 1.00 | SI_11 | 10 days net | draft | 1050 | USD |
976- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-05-31 | customer_2 | manual| 2.00 | SI_4 | 60 days sommation | draft | 1000 | |
977- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-05-31 | customer_3 | manual| 2.00 | SI_7 | 60 days sommation | draft | 1000 | |
978- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-05-31 | customer_4 | mail | 2.00 | SI_11 | 30 days end of month | draft | 840 | USD |
979- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | mail | 2.00 | SI_15 | 30 days end of month | draft | 1500 | USD |
980- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-05-31 | customer_4 | manual| 3.00 | SI_10 | 10 days sommation | draft | 700 | |
981- | 450 | 2012-03-15 | Debtors USD | 3 time policy | 2012-05-31 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation | draft | 450 | USD |
982- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | manual| 3.00 | SI_14 | 10 days sommation | draft | 1200 | USD |
983-
984-
985-
986\ No newline at end of file
987+ And the generated credit lines should have the following values:
988+ | balance | date due | account | policy | date | partner | channel | level | move line | policy level | state | amount due | currency |
989+ | 1500 | 2012-04-30 | Debtors | 2 time policy | 2012-05-31 | customer_2 | email | 1 | SI_6 | 30 days end of month | draft | 1500 | USD |
990+ | 1500 | 2012-04-14 | Debtors | 2 time policy | 2012-05-31 | customer_3 | email | 1 | SI_8 | 30 days end of month | draft | 1500 | USD |
991+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-05-31 | customer_4 | email | 1 | SI_11 | 10 days net | draft | 1050 | USD |
992+ | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-05-31 | customer_2 | letter | 2 | SI_4 | 60 days last reminder | draft | 1000 | |
993+ | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-05-31 | customer_3 | letter | 2 | SI_7 | 60 days last reminder | draft | 1000 | |
994+ | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-05-31 | customer_4 | email | 2 | SI_11 | 30 days end of month | draft | 840 | USD |
995+ | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | email | 2 | SI_15 | 30 days end of month | draft | 1500 | USD |
996+ | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-05-31 | customer_4 | letter | 3 | SI_10 | 10 days last reminder | draft | 700 | |
997+ | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-05-31 | customer_4 | letter | 3 | SI_12 | 10 days last reminder | draft | 450 | USD |
998+ | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | letter | 3 | SI_14 | 10 days last reminder | draft | 1200 | USD |
999+ | 500 | 2012-04-14 | Debtors | 3 time policy | 2012-05-31 | Scrooge McDuck | email | 2 | SI_17 | 30 days end of month | draft | 1500 | |
1000+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-05-31 | Donald Duck | email | 1 | SI_18 | 10 days net | draft | 1050 | |
1001+ | 150 | 2012-03-15 | Debtors | 3 time policy | 2012-05-31 | Gus Goose | letter | 3 | SI_19 | 10 days last reminder | draft | 450 | |
1002+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-05-31 | Gus Goose | email | 1 | SI_19 | 10 days net | draft | 1050 | |
1003+
1004
1005=== modified file 'features/oerp_addons/account_credit_control/08_credit_control_run_jun.feature'
1006--- features/oerp_addons/account_credit_control/08_credit_control_run_jun.feature 2012-10-19 12:46:17 +0000
1007+++ features/oerp_addons/account_credit_control/08_credit_control_run_jun.feature 2012-11-09 07:35:21 +0000
1008@@ -8,61 +8,32 @@
1009 # Features Generic tags (none for all)
1010 ##############################################################################
1011
1012- @credit_management_run @credit_management_run_jun
1013-
1014-Feature: Ensure that mail credit line generation first pass is correct
1015-
1016- @credit_management_mark
1017+@credit_control_run @credit_control_run_jun
1018+
1019+Feature: Ensure that email credit line generation first pass is correct
1020+
1021+ @credit_control_mark
1022 Scenario: mark lines
1023 Given there is "draft" credit lines
1024- And I mark all draft mail to state "to_be_sent"
1025+ And I mark all draft email to state "to_be_sent"
1026 Then the draft line should be in state "to_be_sent"
1027-
1028- @credit_management_run
1029+
1030+ @credit_control_run_month
1031 Scenario: Create run
1032- Given I need a "credit.management.run" with oid: credit_management.run6
1033+ Given I need a "credit.control.run" with oid: credit_control.run6
1034 And having:
1035 | name | value |
1036 | date | 2012-06-30 |
1037 When I launch the credit run
1038 Then my credit run should be in state "done"
1039- And credit lines should have following values:
1040- | balance | date due | account | profile | date | partner | canal | level | move line | profile rule | state | amount due | currency |
1041- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 300 | |
1042- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 360 | USD |
1043- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-02-28 | customer_5_usd | mail | 1.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
1044- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 300 | |
1045- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-03-31 | customer_2 | mail | 1.00 | SI_4 | 30 days end of month |To be sent | 360 | USD |
1046- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-03-31 | customer_3 | mail | 1.00 | SI_7 | 30 days end of month |To be sent | 1000 | |
1047- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 700 | |
1048- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_12 | 10 days net |To be sent | 450 | USD |
1049- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 1.00 | SI_14 | 10 days net |To be sent | 1200 | USD |
1050- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 2.00 | SI_11 | 10 days net |To be sent | 360 | USD |
1051- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 2.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
1052- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-03-31 | customer_4 | manual| 3.00 | SI_10 | 10 days net |To be sent | 300 | |
1053- | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-04-30 | customer_2 | mail | 1.00 | SI_5 | 30 days end of month |To be sent | 1200 | USD |
1054- | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-04-30 | customer_3 | mail | 1.00 | SI_8 | 30 days end of month |To be sent | 1200 | USD |
1055- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 840 | USD |
1056- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 1.00 | SI_15 | 10 days net |To be sent | 1500 | USD |
1057- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 700 | USD |
1058- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_12 | 30 days end of month |To be sent | 450 | USD |
1059- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 2.00 | SI_14 | 30 days end of month |To be sent | 1200 | USD |
1060- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation |To be sent | 360 | USD |
1061- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | manual| 3.00 | SI_14 | 10 days sommation |To be sent | 1000 | USD |
1062- | 1500 | 2012-04-30 | Debtors | 2 time policy | 2012-05-31 | customer_2 | mail | 1.00 | SI_6 | 30 days end of month |To be sent | 1500 | USD |
1063- | 1500 | 2012-04-14 | Debtors | 2 time policy | 2012-05-31 | customer_3 | mail | 1.00 | SI_8 | 30 days end of month |To be sent | 1500 | USD |
1064- | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-05-31 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 1050 | USD |
1065- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-05-31 | customer_2 | manual| 2.00 | SI_4 | 60 days sommation |To be sent | 1000 | |
1066- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-05-31 | customer_3 | manual| 2.00 | SI_7 | 60 days sommation |To be sent | 1000 | |
1067- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-05-31 | customer_4 | mail | 2.00 | SI_11 | 30 days end of month |To be sent | 840 | USD |
1068- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | mail | 2.00 | SI_15 | 30 days end of month |To be sent | 1500 | USD |
1069- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-05-31 | customer_4 | manual| 3.00 | SI_10 | 10 days sommation |To be sent | 700 | |
1070- | 450 | 2012-03-15 | Debtors USD | 3 time policy | 2012-05-31 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation |To be sent | 450 | USD |
1071- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | manual| 3.00 | SI_14 | 10 days sommation |To be sent | 1200 | USD |
1072- | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-06-30 | customer_2 | manual| 2.00 | SI_5 | 60 days sommation | draft | 1200 | USD |
1073- | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-06-30 | customer_3 | manual| 2.00 | SI_8 | 60 days sommation | draft | 1200 | USD |
1074- | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-06-30 | customer_4 | mail | 2.00 | SI_12 | 30 days end of month | draft | 1050 | USD |
1075- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-06-30 | customer_4 | manual| 3.00 | SI_11 | 10 days sommation | draft | 840 | USD |
1076- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-06-30 | customer_5_usd | manual| 3.00 | SI_15 | 10 days sommation | draft | 1500 | USD |
1077-
1078-
1079\ No newline at end of file
1080+ And the generated credit lines should have the following values:
1081+ | balance | date due | account | policy | date | partner | channel | level | move line | policy level | state | amount due | currency |
1082+ | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-06-30 | customer_2 | letter | 2 | SI_5 | 60 days last reminder | draft | 1200 | USD |
1083+ | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-06-30 | customer_3 | letter | 2 | SI_8 | 60 days last reminder | draft | 1200 | USD |
1084+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-06-30 | customer_4 | email | 2 | SI_12 | 30 days end of month | draft | 1050 | USD |
1085+ | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-06-30 | customer_4 | letter | 3 | SI_11 | 10 days last reminder | draft | 840 | USD |
1086+ | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-06-30 | customer_5_usd | letter | 3 | SI_15 | 10 days last reminder | draft | 1500 | USD |
1087+ | 500 | 2012-04-14 | Debtors | 3 time policy | 2012-06-30 | Scrooge McDuck | letter | 3 | SI_17 | 10 days last reminder | draft | 1500 | |
1088+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-06-30 | Donald Duck | email | 2 | SI_18 | 30 days end of month | draft | 1050 | |
1089+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-06-30 | Gus Goose | email | 2 | SI_19 | 30 days end of month | draft | 1050 | |
1090+
1091
1092=== modified file 'features/oerp_addons/account_credit_control/09_credit_control_run_jul.feature'
1093--- features/oerp_addons/account_credit_control/09_credit_control_run_jul.feature 2012-10-19 12:46:17 +0000
1094+++ features/oerp_addons/account_credit_control/09_credit_control_run_jul.feature 2012-11-09 07:35:21 +0000
1095@@ -8,62 +8,29 @@
1096 # Features Generic tags (none for all)
1097 ##############################################################################
1098
1099- @credit_management_run @credit_management_run_jul
1100-
1101-Feature: Ensure that mail credit line generation first pass is correct
1102-
1103- @credit_management_mark
1104+@credit_control_run @credit_control_run_jul
1105+
1106+Feature: Ensure that email credit line generation first pass is correct
1107+
1108+ @credit_control_mark
1109 Scenario: mark lines
1110 Given there is "draft" credit lines
1111- And I mark all draft mail to state "to_be_sent"
1112+ And I mark all draft email to state "to_be_sent"
1113 Then the draft line should be in state "to_be_sent"
1114-
1115- @credit_management_run
1116+
1117+ @credit_control_run_month
1118 Scenario: Create run
1119- Given I need a "credit.management.run" with oid: credit_management.run7
1120+ Given I need a "credit.control.run" with oid: credit_control.run7
1121 And having:
1122 | name | value |
1123 | date | 2012-07-31 |
1124 When I launch the credit run
1125 Then my credit run should be in state "done"
1126- And credit lines should have following values:
1127- | balance | date due | account | profile | date | partner | canal | level | move line | profile rule | state | amount due | currency |
1128- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-01-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 300 | |
1129- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 360 | USD |
1130- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-02-28 | customer_5_usd | mail | 1.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
1131- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-02-28 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 300 | |
1132- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-03-31 | customer_2 | mail | 1.00 | SI_4 | 30 days end of month |To be sent | 360 | USD |
1133- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-03-31 | customer_3 | mail | 1.00 | SI_7 | 30 days end of month |To be sent | 1000 | |
1134- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_10 | 10 days net |To be sent | 700 | |
1135- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 1.00 | SI_12 | 10 days net |To be sent | 450 | USD |
1136- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 1.00 | SI_14 | 10 days net |To be sent | 1200 | USD |
1137- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-03-31 | customer_4 | mail | 2.00 | SI_11 | 10 days net |To be sent | 360 | USD |
1138- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-03-31 | customer_5_usd | mail | 2.00 | SI_13 | 10 days net |To be sent | 1000 | USD |
1139- | 300 | 2012-01-18 | Debtors | 3 time policy | 2012-03-31 | customer_4 | manual| 3.00 | SI_10 | 10 days net |To be sent | 300 | |
1140- | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-04-30 | customer_2 | mail | 1.00 | SI_5 | 30 days end of month |To be sent | 1200 | USD |
1141- | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-04-30 | customer_3 | mail | 1.00 | SI_8 | 30 days end of month |To be sent | 1200 | USD |
1142- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 840 | USD |
1143- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 1.00 | SI_15 | 10 days net |To be sent | 1500 | USD |
1144- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_10 | 30 days end of month |To be sent | 700 | USD |
1145- | 450 | 2012-03-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | mail | 2.00 | SI_12 | 30 days end of month |To be sent | 450 | USD |
1146- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | mail | 2.00 | SI_14 | 30 days end of month |To be sent | 1200 | USD |
1147- | 360 | 2012-02-15 | Debtors | 3 time policy | 2012-04-30 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation |To be sent | 360 | USD |
1148- | 1000 | 2012-02-17 | Debtors USD | 3 time policy | 2012-04-30 | customer_5_usd | manual| 3.00 | SI_14 | 10 days sommation |To be sent | 1000 | USD |
1149- | 1500 | 2012-04-30 | Debtors | 2 time policy | 2012-05-31 | customer_2 | mail | 1.00 | SI_6 | 30 days end of month |To be sent | 1500 | USD |
1150- | 1500 | 2012-04-14 | Debtors | 2 time policy | 2012-05-31 | customer_3 | mail | 1.00 | SI_8 | 30 days end of month |To be sent | 1500 | USD |
1151- | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-05-31 | customer_4 | mail | 1.00 | SI_11 | 10 days net |To be sent | 1050 | USD |
1152- | 1000 | 2012-02-29 | Debtors | 2 time policy | 2012-05-31 | customer_2 | manual| 2.00 | SI_4 | 60 days sommation |To be sent | 1000 | |
1153- | 1000 | 2012-02-17 | Debtors | 2 time policy | 2012-05-31 | customer_3 | manual| 2.00 | SI_7 | 60 days sommation |To be sent | 1000 | |
1154- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-05-31 | customer_4 | mail | 2.00 | SI_11 | 30 days end of month |To be sent | 840 | USD |
1155- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | mail | 2.00 | SI_15 | 30 days end of month |To be sent | 1500 | USD |
1156- | 700 | 2012-02-29 | Debtors | 3 time policy | 2012-05-31 | customer_4 | manual| 3.00 | SI_10 | 10 days sommation |To be sent | 700 | |
1157- | 450 | 2012-03-15 | Debtors USD | 3 time policy | 2012-05-31 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation |To be sent | 450 | USD |
1158- | 1200 | 2012-03-16 | Debtors USD | 3 time policy | 2012-05-31 | customer_5_usd | manual| 3.00 | SI_14 | 10 days sommation |To be sent | 1200 | USD |
1159- | 1200 | 2012-03-31 | Debtors | 2 time policy | 2012-06-30 | customer_2 | manual| 2.00 | SI_5 | 60 days sommation |To be sent | 1200 | USD |
1160- | 1200 | 2012-03-16 | Debtors | 2 time policy | 2012-06-30 | customer_3 | manual| 2.00 | SI_8 | 60 days sommation |To be sent | 1200 | USD |
1161- | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-06-30 | customer_4 | mail | 2.00 | SI_12 | 30 days end of month |To be sent | 1050 | USD |
1162- | 840 | 2012-03-31 | Debtors | 3 time policy | 2012-06-30 | customer_4 | manual| 3.00 | SI_11 | 10 days sommation |To be sent | 840 | USD |
1163- | 1500 | 2012-04-14 | Debtors USD | 3 time policy | 2012-06-30 | customer_5_usd | manual| 3.00 | SI_15 | 10 days sommation |To be sent | 1500 | USD |
1164- | 1500 | 2012-04-30 | Debtors | 2 time policy | 2012-07-31 | customer_2 | manual| 2.00 | SI_6 | 60 days sommation | draft | 1500 | USD |
1165- | 1500 | 2012-04-14 | Debtors | 2 time policy | 2012-07-31 | customer_3 | manual| 2.00 | SI_9 | 60 days sommation | draft | 1500 | USD |
1166- | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-07-31 | customer_4 | manual| 3.00 | SI_12 | 10 days sommation | draft | 1050 | USD |
1167\ No newline at end of file
1168+ And the generated credit lines should have the following values:
1169+ | balance | date due | account | policy | date | partner | channel | level | move line | policy level | state | amount due | currency |
1170+ | 1500 | 2012-04-30 | Debtors | 2 time policy | 2012-07-31 | customer_2 | letter | 2 | SI_6 | 60 days last reminder | draft | 1500 | USD |
1171+ | 1500 | 2012-04-14 | Debtors | 2 time policy | 2012-07-31 | customer_3 | letter | 2 | SI_9 | 60 days last reminder | draft | 1500 | USD |
1172+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-07-31 | customer_4 | letter | 3 | SI_12 | 10 days last reminder | draft | 1050 | USD |
1173+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-07-31 | Donald Duck | letter | 3 | SI_18 | 10 days last reminder | draft | 1050 | |
1174+ | 1050 | 2012-04-30 | Debtors | 3 time policy | 2012-07-31 | Gus Goose | letter | 3 | SI_19 | 10 days last reminder | draft | 1050 | |
1175+
1176
1177=== renamed file 'features/oerp_addons/account_credit_control/step_definitions/credit_management.rb' => 'features/oerp_addons/account_credit_control/step_definitions/credit_control.rb'
1178--- features/oerp_addons/account_credit_control/step_definitions/credit_management.rb 2012-10-18 11:38:49 +0000
1179+++ features/oerp_addons/account_credit_control/step_definitions/credit_control.rb 2012-11-09 07:35:21 +0000
1180@@ -7,6 +7,19 @@
1181 # @found_item.wkf_action('invoice_open')
1182 # end
1183 # end
1184+#
1185+
1186+Given /^I configure the following accounts on the credit control policy with oid: "(.+)":$/ do |policy_xmlid, table|
1187+ @policy = CreditControlPolicy.find(policy_xmlid)
1188+ @policy.should_not be_nil, "Policy with oid #{policy_xmlid} not found"
1189+ account_ids = table.rows.map do |code|
1190+ AccountAccount.find_by_code(code[0], :fields => %w(id)).tap do |res|
1191+ res.should_not be_nil, "Account with code #{code} not found"
1192+ end
1193+ end
1194+ @policy.account_ids = account_ids.map(&:id)
1195+ @policy.save
1196+end
1197
1198 Then /^I launch the credit run$/ do
1199 @found_item.should_not be_nil,
1200@@ -15,79 +28,85 @@
1201 end
1202
1203 Given /^there is "(.*?)" credit lines$/ do |state|
1204- @credit_lines = CreditManagementLine.find_all_by_state(state)
1205+ @credit_lines = CreditControlLine.find_all_by_state(state)
1206 @credit_lines.should_not be_empty,
1207 "not #{state} lines found"
1208 end
1209
1210-Given /^I mark all draft mail to state "(.*?)"$/ do | state |
1211- wiz = CreditManagementMarker.new
1212+Given /^I mark all draft email to state "(.*?)"$/ do | state |
1213+ wiz = CreditControlMarker.new
1214 wiz.name = state
1215- wiz.mark_all = true
1216+ lines = CreditControlLine.find(:all, :domain => [['state', '=', 'draft']], :fields => %w(id))
1217+ wiz.line_ids = lines.map(&:id)
1218 wiz.save
1219 wiz.mark_lines
1220 end
1221
1222 Then /^the draft line should be in state "(.*?)"$/ do | state |
1223 @credit_lines.should_not be_nil,
1224- "no line where stored"
1225+ "no line were stored"
1226 @credit_lines.each do |line|
1227- line = CreditManagementLine.find(line.id)
1228+ line = CreditControlLine.find(line.id)
1229 line.state.should eql(state),
1230 "The line #{line.id} is not in state #{state} he is is in state #{line.state} "
1231 end
1232
1233 end
1234
1235-Given /^I mail all ready lines$/ do
1236+Given /^I email all ready lines$/ do
1237 @credit_lines.should_not be_nil,
1238- "no line where stored"
1239- wiz = CreditManagementMailer.new
1240- wiz.mail_all = true
1241+ "no line were stored"
1242+ wiz = CreditControlEmailer.new
1243+ lines = CreditControlLine.find(:all,
1244+ :domain => [['state', '=', 'to_be_sent'],
1245+ ['channel', '=', 'email']],
1246+ :fields => %w(id))
1247+ wiz.line_ids = lines.map(&:id)
1248 wiz.save
1249- wiz.mail_lines
1250+ wiz.email_lines
1251 end
1252
1253 Given /^I clean all the credit lines$/ do
1254- CreditManagementLine.find(:all).each do | line |
1255+ CreditControlLine.find(:all).each do | line |
1256 line.destroy
1257 end
1258 end
1259
1260 Then /^my credit run should be in state "(.*?)"$/ do |state|
1261 @found_item.should_not be nil
1262- @run = CreditManagementRun.find(@found_item.id)
1263+ @run = CreditControlRun.find(@found_item.id)
1264 @run.state.should eq(state),
1265 "Run state is in state #{@run.state} instead of #{state}"
1266 end
1267
1268
1269-Then /^All sent lines should be linked to a mail and in mail status "(.*?)"$/ do |status|
1270+Then /^All sent lines should be linked to a email and in email status "(.*?)"$/ do |status|
1271 @credit_lines.should_not be_nil,
1272 "no line where stored"
1273 @credit_lines.each do |line|
1274- line = CreditManagementLine.find(line.id)
1275+ line = CreditControlLine.find(line.id)
1276 line.state.should eql(status),
1277- "The line #{line.id} is has no mail status #{status} but #{line.state}"
1278+ "The line #{line.id} is has no email status #{status} but #{line.state}"
1279 end
1280 end
1281
1282 Then /^I should have "(.*?)" credit lines of level "(.*?)"$/ do |number, level|
1283- CreditManagementLine.find_all_by_level(level).length.should eq (number.to_i)
1284+ CreditControlLine.find_all_by_level(level).length.should eq (number.to_i)
1285 end
1286
1287-Then /^credit lines should have following values:$/ do |table|
1288+Then /^the generated credit lines should have the following values:$/ do |table|
1289 h_list = table.hashes
1290 h_list.each do | h |
1291 h.delete_if {|k, v| v.empty?}
1292 end
1293+
1294 errors = []
1295 h_list.each do | row |
1296 account = AccountAccount.find_by_name(row['account'], :fields=>['id'])
1297 account.should_not be_nil, "no account named #{row['account']} found"
1298
1299- profile = CreditManagementProfile.find_by_name(row['profile'], :fields=>['id'])
1300- profile.should_not be_nil, "No account #{row['account']} found"
1301+ policy = CreditControlPolicy.find_by_name(row['policy'], :fields=>['id'])
1302+ policy.should_not be_nil, "No account #{row['account']} found"
1303
1304 partner = ResPartner.find_by_name(row['partner'], :fields=>['id'])
1305 partner.should_not be_nil, "No partner #{row['partner']} found"
1306@@ -95,21 +114,25 @@
1307 move_line = AccountMoveLine.find_by_name(row['move line'], :fields=>['id'])
1308 move_line.should_not be_nil, "No move line #{row['move line']} found"
1309
1310- rule = CreditManagementProfileRule.find_by_name(row['profile rule'], :fields=>['id'])
1311- rule.should_not be_nil, "No profile rune #{row['profile rule']} found"
1312+ level = CreditControlPolicyLevel.find_by_name_and_policy_id(row['policy level'], policy.id, :fields=>['id'])
1313+ level.should_not be_nil, "No policy level #{row['policy level']} found"
1314
1315- domain = [['account_id', '=', account.id], ['profile_id', '=', profile.id],
1316- ['partner_id', '=', partner.id],
1317- ['profile_rule_id', '=', rule.id], ['amount_due', '=', row.fetch('amount due', 0.0)],
1318+ domain = [['account_id', '=', account.id], ['policy_id', '=', policy.id],
1319+ ['partner_id', '=', partner.id],
1320+ ['policy_level_id', '=', level.id], ['amount_due', '=', row.fetch('amount due', 0.0)],
1321 ['state', '=', row.fetch('state')], ['level', '=', row.fetch('level', 0.0)],
1322- ['canal', '=', row.fetch('canal')], ['balance_due', '=', row.fetch('balance', 0.0)],
1323+ ['channel', '=', row.fetch('channel')], ['balance_due', '=', row.fetch('balance', 0.0)],
1324 ['date_due', '=', row.fetch('date due')], ['date', '=', row.fetch('date')]]
1325 if row['currency']
1326 curreny = ResCurrency.find_by_name(row['currency'], :fields=>['id'])
1327 domain.push ['currency_id', '=', curreny.id]
1328 end
1329- pp domain
1330- line = CreditManagementLine.find(:first, :domain=>domain)
1331- line.should_not be_nil, "Can not find line #{row.inspect}"
1332+ line = CreditControlLine.find(:all, :domain=>domain)
1333+ line.first.should_not be_nil, "Can not find line #{row.inspect}"
1334+ line.should have(1).things, "More than one found for #{row.inspect}"
1335 end
1336+
1337+ date_lines = CreditControlLine.find(:all, :domain => [['date', '=', @found_item.date.to_s]], :fields => %w(id))
1338+ date_lines.should have(h_list.count).items, "Too many lines generated: #{date_lines.inspect}"
1339 end
1340+
1341
1342=== modified file 'features/oerp_addons/account_voucher/steps_definition/account_voucher.rb'
1343--- features/oerp_addons/account_voucher/steps_definition/account_voucher.rb 2012-09-14 11:35:39 +0000
1344+++ features/oerp_addons/account_voucher/steps_definition/account_voucher.rb 2012-11-09 07:35:21 +0000
1345@@ -140,20 +140,12 @@
1346 end
1347
1348 Given /^the line amount should be (.*)$/ do |amount|
1349- pp amount
1350- pp @found_item.save
1351- pp @found_item.statement_id
1352 @statement = AccountBankStatement.find(@found_item.statement_id.id)
1353- pp @statement
1354 @statement.save
1355- pp @statement
1356 @found_item.save
1357- pp @found_item
1358 @voucher = AccountVoucher.find(@found_item.voucher_id.id)
1359 @voucher.save
1360- pp @voucher
1361 @found_item.amount.should eq amount.to_f
1362- pp @found_item.amount
1363 end
1364 Given /^I modify the line amount to (.*)$/ do |amount|
1365 @found_item.amount = amount.to_f
1366@@ -163,7 +155,6 @@
1367 Then /^I modify the bank statement line amount to (.*)$/ do |amount|
1368 line = @found_item.voucher_id.line_cr_ids[0]
1369 @voucher = AccountVoucher.find(@found_item.voucher_id.id)
1370- pp @voucher
1371 @voucher.save
1372 @found_item.on_change('onchange_amount',:amount,[],amount.to_f)
1373 @found_item.amount = amount.to_f

Subscribers

People subscribed via source and target branches

to all changes: