Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0] new module sale_order_note_template (Sale Orders Terms and conditions Templates) #1431

Merged
merged 2 commits into from
May 12, 2021

Conversation

petrus-v
Copy link

No description provided.

@rousseldenis rousseldenis added this to the 14.0 milestone Jan 27, 2021
@petrus-v petrus-v changed the title [14.0] new sale_termps_template [14.0] new sale_terms_template Jan 27, 2021
|badge1| |badge2| |badge3| |badge4| |badge5|

This module add terms and condition template and change existing terms and condition
(`sale_order.note`) field type from `Text` to `Html`.
Copy link
Contributor

Choose a reason for hiding this comment

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

as the field is note, I think the technical name of module should use note also. like sale_order_note_template.

Copy link
Author

Choose a reason for hiding this comment

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

Do you suggest to use a technical name sale_order_note_template different from the module name Sale terms template in order to let functional users to find the module in apps store and let technical guys understand which fields is used ?

Copy link
Contributor

Choose a reason for hiding this comment

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

My proposal is to use the same words as Odoo sale module, so :

  • technical module name sale_order_note_template.
  • Friendly module name Sale Orders Terms and conditions Templates

https:/odoo/odoo/blob/12.0/addons/sale/models/sale.py#L202

Copy link
Author

Choose a reason for hiding this comment

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

ok, thanks let's do that :)

Copy link
Author

Choose a reason for hiding this comment

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

I've renamed the module as suggest !

@petrus-v petrus-v changed the title [14.0] new sale_terms_template [14.0] new module sale_order_note_template (Sale Orders Terms and conditions Templates) Feb 1, 2021
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

end of the review.
some minor remarks. LGTM otherwise. Thanks.
(code review / no test).

("jinja", "Jinja"),
# Figure out why while saving qweb instructions there are wiped out
# wich makes qweb templating not usable (probably for security reasons)
# ("qweb", "QWeb"),
Copy link
Contributor

Choose a reason for hiding this comment

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

this text could be maybe moved in a ROADMAP.rst file. Don't you think ?

https:/OCA/maintainer-tools/tree/master/template/module/readme

Copy link
Author

Choose a reason for hiding this comment

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

I've done few more test without success, I don't realy needs qweb support so as suggest I've added a line in roadmap and removed that field at the moment.

readonly=True,
states={"draft": [("readonly", False)]},
)
note = fields.Html(readonly=True, states={"draft": [("readonly", False)]})
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand correctly. you change the type of the field note.
you should maybe add a post_init_hook and / or a uninstall_hook to handle correctly the conversion (Text <--> Html). Otherwise, I guess if you uninstall the module, you'll have a lot of html anchors in all the note column. Don't you think ? (or maybe there is a core feature in Odoo to handle such conversion, I must confess that I have not tested to install your module, add some text in the note field, and then, uninstall the module.)

If it's not in the scope of your PR, you can make a mention in a ROADMAP.rst section.

Copy link
Author

Choose a reason for hiding this comment

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

I'll move that in roadmap at the moment !

thanks for review

sale_order_note_template/models/sale_terms_template.py Outdated Show resolved Hide resolved
Copy link
Contributor

@dsolanki-initos dsolanki-initos left a comment

Choose a reason for hiding this comment

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

Code review and Functional Review Looks Good to me.

Copy link
Contributor

@alan196 alan196 left a comment

Choose a reason for hiding this comment

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

Tested Functionally

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Contributor

@danimv5 danimv5 left a comment

Choose a reason for hiding this comment

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

Functional review! LGTM

@dsolanki-initos dsolanki-initos mentioned this pull request Apr 5, 2021
87 tasks
@dsolanki-initos
Copy link
Contributor

Its seems that PR is ready to merge. It would be great if someone get merge this PR .

@dsolanki-initos
Copy link
Contributor

Can this be merged?

@dsolanki-initos
Copy link
Contributor

@legalsylvain It would be great if you can merge this PR.

@dsolanki-initos
Copy link
Contributor

Seems that PR is approved is it possible to merge it ?

@dreispt
Copy link
Sponsor Member

dreispt commented May 12, 2021

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 14.0-ocabot-merge-pr-1431-by-dreispt-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 0b19b26 into OCA:14.0 May 12, 2021
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 900612d. 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.

8 participants