Skip to content

[16.0][MIG] l10n_it_delivery_note#3020

Merged
OCA-git-bot merged 29 commits into
OCA:16.0from
Borruso:16.0-mig-l10n_it_delivery_note
Feb 14, 2023
Merged

[16.0][MIG] l10n_it_delivery_note#3020
OCA-git-bot merged 29 commits into
OCA:16.0from
Borruso:16.0-mig-l10n_it_delivery_note

Conversation

@Borruso

@Borruso Borruso commented Nov 10, 2022

Copy link
Copy Markdown
Contributor

Migration l10n_it_delivery_note from 14.0 to 16.0
Dipende da #3019

--
Confermo di aver firmato il CLA https://odoo-community.org/page/cla e di aver letto le linee guida su https://odoo-community.org/page/contributing

@tafaRU

tafaRU commented Nov 18, 2022

Copy link
Copy Markdown
Member

@Borruso devi aggiungere nel file test-requirements.txt: #3019
In questo modo sia i tests che runboat dovrebbero diventare 🟢

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_delivery_note branch from 63e671d to a3599e1 Compare November 18, 2022 09:32
@Borruso

Borruso commented Nov 18, 2022

Copy link
Copy Markdown
Contributor Author

@Borruso devi aggiungere nel file test-requirements.txt: #3019 In questo modo sia i tests che runboat dovrebbero diventare green_circle

provato a inserire il file .txt mi dici se ho fatto giusto o sbagliato qualcosa?

@tafaRU

tafaRU commented Nov 18, 2022

Copy link
Copy Markdown
Member

dici se ho fatto giusto o sbagliato qualcosa?

la sintassi non è giusta, puoi prendere spunto da 42641f0
altra cosa: aggiungilo in un commit separato così lo eliminerai una volta mergiata la PR dipendenza.

Grazie.

@MarcoCalcagni

Copy link
Copy Markdown

Test Funzionali
in questa form/tab
qualsiasi cosa inserisco non viene salvata
image

stampa ddt i numeri vanno allineati a dx. sia qty che prezzo.

manca l'azione che consente di fatturare dalla tree ddt

in fattura, la nota "DDt xx del xx " dovrebbe essere inserita una sola volta e non su tutte le righe.
inoltre se ho un ddt con 2 picking, lo stesso prodotto è presente nei due picking, quando creo la fattura aggiunge 2 volte la riga nota "DDt xx del xx "

per i trasferimenti interno tra 2 magazzini della stessa company la form è disallineata
image
nel report
image

@MarcoCalcagni

Copy link
Copy Markdown

Riflessione funzionale.

odoo installa automaticamente l10n_it_stock_ddt se poi si installa l10n_it_delivery_note nella form ci sono 2 button per generare il report che chiamano modelli diversi di report. Questa cosa più generare confusione per gli user.
Quindi suggerisco di :
inserire incompatibilità tra i 2 moduli
oppure
visto, che il modulo l10n_it_stock_ddt la funzione di l10n_it_delivery_note non avanzata, di escludere questa modalità nel delivery note. chi ha bisogno un pick un ddt userà il modulo std di odoo che invece deve accorpare più picking in un ddt userà il modulo delivery note.

#~ "confermato."

#~ msgid "Notify if delivery note isn't validated"
#~ msgstr "Notifica se il DdT non è validato"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come mai sono commentati questi termini?


changed |= self._update_generic_shipping_information(partner)

return changed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perché i campi:

  1. transport_condition_id
  2. goods_appearance_id
  3. transport_reason_id
  4. transport_method_id
  5. delivery_method_id

non sono definiti qui nel Mixin e ogni volta nei singoli Model che ereditano questo Mixin?

<!--<p>-->
<!--Bla, bla, bla...-->
<!--</p>-->
<!--</field>-->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O si elimina o si scrive la descrizione

return res


class AccountInvoiceLine(models.Model):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non ha senso portare iu un file tutto suo la classe?

default_transport_condition_id = fields.Many2one(
"stock.picking.transport.condition",
string="Condition of transport",
default=False,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non penso sia necessario il defaul in questa definizione

return action


class SaleOrderLine(models.Model):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sposterei in un altro file dedicato al model

return location_address


class StockDeliveryNoteLine(models.Model):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Farei un'altro file dedicato a questo Model

validator(pickings)

except ValidationError as exc:
errors.append(exc.name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserError attribute 'name' is a deprecated alias to args[0]

@TonyMasciI

Copy link
Copy Markdown
Contributor

Inoltre avviato il test con questo comando:

--config=PATH\odoo.conf --test-tags=/l10n_it_delivery_note --init=l10n_it_delivery_note --database=NOME_DATABASE --test-enable --stop-after-init

Questo è il risultato:

0 failed, 5 error(s) of 7 tests when loading database 'NOME_DATABASE'

Con questi errori:

  • odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale
  • odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale
  • odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale
  • odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale
  • odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale

andando in errore in questa linea

@Borruso

Borruso commented Dec 2, 2022

Copy link
Copy Markdown
Contributor Author

Inoltre avviato il test con questo comando:

--config=PATH\odoo.conf --test-tags=/l10n_it_delivery_note --init=l10n_it_delivery_note --database=NOME_DATABASE --test-enable --stop-after-init

Questo è il risultato:

0 failed, 5 error(s) of 7 tests when loading database 'NOME_DATABASE'

Con questi errori:

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

andando in errore in questa linea

come se il database che stai usando non abbia caricato i dati di test

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_delivery_note branch 3 times, most recently from e91a6da to b35b394 Compare December 2, 2022 11:15
@TonyMasciI

Copy link
Copy Markdown
Contributor

Inoltre avviato il test con questo comando:
--config=PATH\odoo.conf --test-tags=/l10n_it_delivery_note --init=l10n_it_delivery_note --database=NOME_DATABASE --test-enable --stop-after-init
Questo è il risultato:
0 failed, 5 error(s) of 7 tests when loading database 'NOME_DATABASE'
Con questi errori:

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

* `odoo.exceptions.UserError: No journal could be found in company My Company (San Francisco) for any of those types: sale`

andando in errore in questa linea

come se il database che stai usando non abbia caricato i dati di test

In teoria il DB che ho usato è stato generato al momento dell'avvio del comando dato che non esisteva, data la combinazione dei comandi --init, --database e --test-enable come da guida

@andreampiovesana

andreampiovesana commented Dec 16, 2022

Copy link
Copy Markdown
Contributor

avete aggiunto le modifiche di #3087 ?

@MarcoCalcagni

Copy link
Copy Markdown

avete aggiunto le modifiche di #3087 ?

dopo il merge di questa

@MarcoCalcagni

Copy link
Copy Markdown

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Sorry @As400it you are not allowed to merge.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@andreampiovesana andreampiovesana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
tested in staging 16

@tafaRU

tafaRU commented Dec 23, 2022

Copy link
Copy Markdown
Member

I commenti di @TonyMasciI sono stati tutti risolti? Non mi pare di vedere la sua approvazione.

image

@Borruso

Borruso commented Dec 23, 2022

Copy link
Copy Markdown
Contributor Author

I commenti di @TonyMasciI sono stati tutti risolti? Non mi pare di vedere la sua approvazione.

image

tutti i commenti sono stati risolti almeno quelli.
per i commenti dei test come risposto solo i dati di demo che non sono presenti.
per il commento del *.po non infliuisce con la PR.
mentre per il discorso del mixin in questa sede non è possibile dato che è una migrazione, ma con un PR successiva con beckport anche alla 12 e 14

@TheMule71

Copy link
Copy Markdown
Contributor

@tafaRU

tafaRU commented Dec 27, 2022

Copy link
Copy Markdown
Member

tutti i commenti sono stati risolti almeno quelli.

ok grazie @Borruso grazie del feedback, attendiamo comunque l'approvazione di @TonyMasciI prima di procedere con il merge.

@Borruso

Borruso commented Feb 10, 2023

Copy link
Copy Markdown
Contributor Author

I test sono red_circle @Borruso puoi verificare come mai?

@tafaRU @SimoRubi @TheMule71 @eLBati
l'errore lo da sulla creazione del prodotto nella company2
product2 = self.product_product_10.copy({"company_id": self.company2.id})
se però la copy la facciamo con il with_company(company=self.company2.id)
quindi:
product2 = self.product_product_10.with_company(company=self.company2.id).copy({"company_id": self.company2.id})
oppure
product2 = self.product_product_10.with_company(company=self.company2.id).copy()
in questo caso non da errore
non sono io a causarlo perché nelle funzioni del DdT non passa
forse è cambiato qualcosa su Odoo
oppure nel merge non abbiamo visto il test rosso ma questo lo escludo

@tafaRU

tafaRU commented Feb 10, 2023

Copy link
Copy Markdown
Member

@Borruso applica le modifiche su un commit separato e documentalo bene. Grazie.

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_delivery_note branch from 2772af2 to 8bb119c Compare February 10, 2023 12:03
@Borruso

Borruso commented Feb 10, 2023

Copy link
Copy Markdown
Contributor Author

@Borruso applica le modifiche su un commit separato e documentalo bene. Grazie.

commit fatto puoi verificare??

@tafaRU

tafaRU commented Feb 10, 2023

Copy link
Copy Markdown
Member

commit fatto puoi verificare??

grazie, meglio se il commit message lo scrivi in inglese: potresti modificarlo?

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_delivery_note branch from 8bb119c to 21e1d6c Compare February 10, 2023 14:07
@Borruso

Borruso commented Feb 10, 2023

Copy link
Copy Markdown
Contributor Author

commit fatto puoi verificare??

grazie, meglio se il commit message lo scrivi in inglese: potresti modificarlo?

fatto

Comment thread l10n_it_delivery_note/tests/test_stock_delivery_note_invoicing.py
"res.partner",
string="Recipient",
states=DRAFT_EDITABLE_STATE,
default=_default_company,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qui e nei due campi successivi come mai usi _default_company come default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

errore durante la migrazione correggo

@Borruso Borruso force-pushed the 16.0-mig-l10n_it_delivery_note branch from 21e1d6c to f862812 Compare February 13, 2023 16:12
@tafaRU

tafaRU commented Feb 13, 2023

Copy link
Copy Markdown
Member

@Borruso le ultime correzioni non dovrebbero andare a finire in f862812 bensì nel commit di migrazione.

…'with_company()' instead of putting the company in 'copy()'

https://github.com/OCA/l10n-italy/actions/runs/4082549051/jobs/7037035918#step:8:381
Traceback (most recent call last):
  File "/__w/l10n-italy/l10n-italy/l10n_it_fatturapa_out/tests/test_fatturapa_xml_validation.py", line 816, in test_multicompany_fail
    product2 = self.product_product_10.copy(
  File "/opt/odoo/addons/product/models/product_product.py", line 393, in copy
    template = self.product_tmpl_id.copy(default=default)
  File "/opt/odoo/addons/stock/models/product.py", line 878, in copy
    res = super().copy(default=default)
  File "/opt/odoo/addons/product/models/product_template.py", line 474, in copy
    return super(ProductTemplate, self).copy(default=default)
  File "/opt/odoo/odoo/models.py", line 4776, in copy
    record_copy = self.create(vals)
  File "<decorator-gen-169>", line 2, in create
  File "/opt/odoo/odoo/api.py", line 409, in _model_create_multi
    return create(self, [arg])
  File "/opt/odoo/addons/product/models/product_template.py", line 428, in create
    templates = super(ProductTemplate, self).create(vals_list)
  File "<decorator-gen-142>", line 2, in create
  File "/opt/odoo/odoo/api.py", line 410, in _model_create_multi
    return create(self, arg)
  File "/opt/odoo/addons/mail/models/mail_thread.py", line 258, in create
    threads = super(MailThread, self).create(vals_list)
  File "<decorator-gen-65>", line 2, in create
  File "/opt/odoo/odoo/api.py", line 410, in _model_create_multi
    return create(self, arg)
  File "/opt/odoo/odoo/addons/base/models/ir_fields.py", line 665, in create
    recs = super().create(vals_list)
  File "<decorator-gen-13>", line 2, in create
  File "/opt/odoo/odoo/api.py", line 410, in _model_create_multi
    return create(self, arg)
  File "/opt/odoo/odoo/models.py", line 3971, in create
    records._check_company()
  File "/opt/odoo/odoo/models.py", line 3413, in _check_company
    raise UserError("\n".join(lines))
odoo.exceptions.UserError: Incompatible companies on records:
- 'Cabinet with Doors (copy)' belongs to company 'YourCompany (copy)' and 'Production Location' (property_stock_production: 'Virtual Locations/Production') belongs to another company.
- 'Cabinet with Doors (copy)' belongs to company 'YourCompany (copy)' and 'Inventory Location' (property_stock_inventory: 'Virtual Locations/Inventory adjustment') belongs to another company.
@Borruso Borruso force-pushed the 16.0-mig-l10n_it_delivery_note branch from f862812 to ad4b4b2 Compare February 14, 2023 08:09
@tafaRU

tafaRU commented Feb 14, 2023

Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-3020-by-tafaRU-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit c81f4eb into OCA:16.0 Feb 14, 2023
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 028dbcd. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.