[FIX]l10n_it_riba_oca fix add riba cost issue https://github.com/OCA/…#5119
[FIX]l10n_it_riba_oca fix add riba cost issue https://github.com/OCA/…#5119mmircoli-nexapp wants to merge 2 commits intoOCA:18.0from
Conversation
|
i test falliscono per #5118 |
|
@francesco-ooops se qui fai rebase perfavore che ora hanno mergiato la pr che sistema i test |
|
/ocabot rebase |
|
Congratulations, PR rebased to 18.0. |
ed9c849 to
385ceb5
Compare
|
@monen17 se riesci a fare review che alla fine di fatto ho fatto come suggerivi. |
|
qualcuno riesce a fare review? cosi da arrivare a due e review e arrivare al merge? |
monen17
left a comment
There was a problem hiding this comment.
Grazie della PR!
Visto che è una fix, secondo me ci vorrebbe anche il suo test, potresti aggiungerlo?
Inoltre puoi descrivere brevemente il problema nel titolo del commit?
Così si capisce perché il commit è stato fatto senza dover aprire la issue linkata
|
Salve, io ho fatto ulteriori test e credo sia tutto ok. |
Ciao, grazie! |
385ceb5 to
a262413
Compare
|
@monen17 ho aggiunto il test e cambiato il messaggio del commit |
|
se per caso occorre che diventa un unico commit dimmelo |
|
@monen17 quando puoi fammi sapere perfavore |
|
@monen17 riesci a fare review? |
… cost of riba is not added if the invoice is confirmed when the user is in list view, because from list skip some check, with this fix the cost is always added.
…ice is confirmed from tree
f099aee to
4f7f0ba
Compare
Ciao, riusciamo a mergiare? |
monen17
left a comment
There was a problem hiding this comment.
Grazie delle modifiche, puoi sistemare i commit in modo che seguano https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#71commit-message ? Al momento sono 
Puoi mettere tutto in unico commit? Così è chiaro che il test è stato aggiunto per verificare le altre modifiche nello stesso commit.
| when confirming invoices from the list view using 'Confirm Entries', | ||
| the collection fees must be added. Before this fix, the fee-adding | ||
| logic was only in action_post() and was skipped when _post() was | ||
| called directly. | ||
| """ | ||
| # ---- Set Service in Company Config | ||
| self.invoice.company_id.due_cost_service_id = self.service_due_cost.id | ||
| # ---- Validate Invoice using _post() directly, simulating the code | ||
| # ---- path used by batch confirmation from list view | ||
| self.invoice._post(soft=False) |
There was a problem hiding this comment.
Grazie del test!
Però non ho capito come mai bisogna simulare il comportamento del wizard.
Se il problema è che le spese non vengono aggiunte quando viene eseguito il wizard "Confirm Entries" sulla lista di fatture, il test dovrebbe verificare quel caso: creare un wizard per più fatture ed eseguirlo.
Il fatto che il wizard usi un metodo (_post) piuttosto che un altro (action_post) è un particolare dell'implementazione che non interessa al test, come non interessa a un testatore che prova la funzionalità.
| # ---- Test Cost lines total is equal to 10.00 (5.00 x 2 due dates) | ||
| self.assertEqual( | ||
| ( | ||
| self.invoice.invoice_line_ids[1].price_unit | ||
| + self.invoice.invoice_line_ids[2].price_unit | ||
| ), | ||
| 10.00, | ||
| ) |
There was a problem hiding this comment.
Grazie dei commenti, saranno molto utili ai posteri!
Però puoi togliere il ---- all'inizio di ogni commento? Ti immagini come sarebbe il codice se ognuno aggiungesse cose del genere nei propri commenti?
…l10n-italy/issues/5063