OCA / pos

GNU Affero General Public License v3.0
285 stars 602 forks source link

[16.0][ADD] pos_auto_invoice #1258

Open huguesdk opened 2 weeks ago

huguesdk commented 2 weeks ago

module to set point-of-sale orders as to-invoice by default.

legalsylvain commented 2 weeks ago

hi @huguesdk. Thanks for this contribution.

At a first look, LGTM to me. some remarks :

What do you think ?

huguesdk commented 2 weeks ago

i completely agree. like this?

do you think that it should be enabled by default and disabled by demo data? i think that disabled by default makes sense, especially since having a different default behavior with and without demo data could be confusing for users.

legalsylvain commented 2 weeks ago

do you think that it should be enabled by default and disabled by demo data? i think that disabled by default makes sense, especially since having a different default behavior with and without demo data could be confusing for users

totally agree!

huguesdk commented 2 weeks ago

thanks a lot for the review! i added your suggestion to avoid variable shadowing.

i also ensured that the value of to_invoice is kept for existing orders. strangely, the default behavior in init_from_JSON() is to always set it to false, although it is correctly handled in export_as_JSON().