OCA / stock-logistics-transport

Transport management in Odoo
GNU Affero General Public License v3.0
60 stars 128 forks source link

[ADD] tms #130

Closed max3903 closed 1 month ago

max3903 commented 3 months ago

127

pedrobaeza commented 2 months ago

Please remove the merge commits in the commit history.

rvalyi commented 2 months ago

@max3903 @rousseldenis @marcelsavegnago with the https://github.com/akretion/xsdata-odoo tool I presented at the OCA days 2021, you could quite easily generate all the Odoo data model for the UBL transport management entities: https://docs.oasis-open.org/ubl/os-UBL-2.3/UBL-2.3.html#S-INTERMODAL-FREIGHT-MANAGEMENT

Aside from having a universally accepted and standard data model, it would also make it a piece of cake to have import and export of UBL XML documents for it...

Wouldn't that be preferable over bootstrapping a custom data model from scratch where all messaging mapping would need to be made and maintained manually?

Again, for reference here is the kind of Abstract Odoo mixins it generates from xsd schemas, here for the Brazilian Electronic Invoicing (the most complex in the world): https://github.com/OCA/l10n-brazil/blob/16.0/l10n_br_nfe_spec/models/v4_0/leiaute_nfe_v4_00.py

For UBL, I may need to do small adaptations to xsdata-odoo to properly map the UBL intermediaries simple types to proper Odoo field types (I already started, it's not a lot of work.).

Disclaimer: may be the UBL Transport entities are not adapted to what you are trying to manage, but I believe it's pretty close to what @marcelsavegnago is dealing with for the Brazilian CT-e electronic documents. In this case, @marcelsavegnago is actually already using this datamodel generated by xsdata-odoo for the xsd CT-e Brazilian fiscal model https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_cte_spec/models/v4_0 But eventually UBL is a match for what you need, so I'm just mentioning the possibility.

What do you guys think?

(I'm also available for hire if you need a few days of work to make it work with that UBL schema properly)

max3903 commented 2 months ago

@rvalyi

Wouldn't that be preferable over bootstrapping a custom data model from scratch where all messaging mapping would need to be made and maintained manually?

Yes it would.

What do you guys think?

@santiagordz and @EdgarRetes are only available to work on this until August 15th, 2024. Their main objective is NOT to generate electronic documents complying with any standard but we should remain compatible so anyone can work on the missing parts in a separate module (part of the tms repo or the localization).

(I'm also available for hire if you need a few days of work to make it work with that UBL schema properly)

:) Based on our data model in #127, can you or @marcelsavegnago help them with mapping the models and fields? The data model seems very complicated to do a simple stuff though...

rvalyi commented 2 months ago

Hello @max3903 I mentioned UBL just in case because that was an easy reach. I know @marcelsavegnago is working on a Brazilian TMS project (Hey Marcel I believe we declined that project last year BTW) and I'm helping him with the Brazilian electronic document system, but I'm not working on TMS myself.

I looked at the Jarsa TMS, it looks quite complete. So indeed if it's already working well, why not use it. Indeed, I think generating the model from xsd schema mostly make sense when you want to be compliant with some standard or its messages, if you have a working vertical that's fine as well for sure. It's also good to remember UBL (and similar options) are quite complete and often derived from SAP like complex ERP's and can sometimes do the job better than re-inventing the wheel and then mapping it all again manually to UBL...

marcelsavegnago commented 2 months ago

At this stage, I believe that a squash of the commits would be a good idea.

Shide commented 1 month ago

Found an error when deleting dates on a Trip: https://www.loom.com/share/5a5d83222a3844d3af295a30179783d9?sid=34f37e1b-a117-4723-8df8-88302c6bde8f

EdgarRetes commented 1 month ago

Found an error when deleting dates on a Trip: https://www.loom.com/share/5a5d83222a3844d3af295a30179783d9?sid=34f37e1b-a117-4723-8df8-88302c6bde8f

Just fixed it

santiagordz commented 1 month ago

@max3903 I need that function to use the ''aggregates'' parameter. As can be seen in https://www.odoo.com/documentation/17.0/developer/reference/backend/orm.html#search-read

max3903 commented 1 month ago

@all We are close to getting this one merged. We can't take care of every comments and requests left but if you can create a separate issue for each, that would help. Thank you!

pedrobaeza commented 3 weeks ago

@max3903 you must use the ocabot command instead of manually merging branches. There's no approval from the reviewers here either. Please refrain from merging without these conditions.

rousseldenis commented 3 weeks ago

@max3903 I agree with @pedrobaeza. This is a little bit cavalier...

rousseldenis commented 3 weeks ago

@OCA/logistics-maintainers

rousseldenis commented 3 weeks ago

IMHO, some reviews comments should have been attended.

rousseldenis commented 3 weeks ago

As this is the only module available in 17.0 and there's no pending PR if not yours and nobody is using this yet, we could even rewrite the history of this branch.

Agree with that

rousseldenis commented 3 weeks ago

@OCA/core-maintainers Could we reset the 17.0 branch ?

@max3903 Could you do after that a better PR? Even if it is Alpha, some conventions should be respected at least. Many thanks

max3903 commented 1 week ago

Hello,

Sorry for the late answer, I was on vacation during the last 2 weeks.

@EdgarRetes will take care of the requested changes. I would like to get this merged prior to OCA Days to present it and to start migration to version 18.0 while in Belgium.

rousseldenis commented 1 week ago

I would like to get this merged prior to OCA Days to present it and to start migration to version 18.0 while in Belgium.

Ok, with that, but not at any price. Please respect OCA flows and requirements.

@simahawk Could you restore 17.0 branch?

@max3903 This will need a new PR for tms module.

I can help with review before OCA days.

simahawk commented 1 week ago

Here's a clean 17.0 branch reset to the commit before the module was introduced https://github.com/OCA/stock-logistics-transport/tree/17.0

Here's a backup of the 17.0 before the reset because translations have been added... in case you want to cherry-pick them

https://github.com/OCA/stock-logistics-transport/commits/17.0-tms-backup/

Let me know when is not needed anymore and I'll delete it.

rousseldenis commented 1 week ago

Here's a clean 17.0 branch reset to the commit before the module was introduced https://github.com/OCA/stock-logistics-transport/tree/17.0

Here's a backup of the 17.0 before the reset because translations have been added... in case you want to cherry-pick them

https://github.com/OCA/stock-logistics-transport/commits/17.0-tms-backup/

Let me know when is not needed anymore and I'll delete it.

thanks!

@EdgarRetes Could you recreate the PR from your ursais:17.0_tmsbranch ? Thanks

EdgarRetes commented 1 week ago

Here's a clean 17.0 branch reset to the commit before the module was introduced https://github.com/OCA/stock-logistics-transport/tree/17.0 Here's a backup of the 17.0 before the reset because translations have been added... in case you want to cherry-pick them https://github.com/OCA/stock-logistics-transport/commits/17.0-tms-backup/ Let me know when is not needed anymore and I'll delete it.

thanks!

@EdgarRetes Could you recreate the PR from your ursais:17.0_tmsbranch ? Thanks

Done! #145