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
v9 Migration of sale_cancel_reason #261
Conversation
Can you please squash the commits a bit? |
sale_cancel_reason/__openerp__.py
Outdated
'complexity': 'normal', | ||
'images': [], | ||
'website': "http://www.camptocamp.com", | ||
'description': """ | ||
Sale Cancel Reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put description in a README.rst according conventions (https://raw.githubusercontent.com/OCA/maintainer-tools/master/template/module/README.rst)
Please also have a look at https://travis-ci.org/OCA/sale-workflow/builds/105690296 errors. |
Hey @JayVora-SerpentCS, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
e079556
to
145efa8
Compare
Please check. |
You must import the commit history from the migration moment following this guide: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-9.0 and squash commits to only relevant ones. |
Sure, will do! Sounds pretty good set of notes (y) |
sale_cancel_reason/README.rst
Outdated
|
||
* To configure this module, you need to: | ||
|
||
* You can cofigure cancel reason from Sale -> Configuration -> Sale Order Cancel Reason. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
n/cofigure/configure
code reviewed 👍 |
</form> | ||
</field> | ||
</record> | ||
<data noupdate="0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<odoo>
, not <data>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JayVora-SerpentCS would you be able to fix this misunderstanding? Like @pedrobaeza says, the data tag is redundant in 9.0, so please replace with the odoo tag.
sale_cancel_reason/models/sale.py
Outdated
@@ -28,8 +29,7 @@ class SaleOrder(models.Model): | |||
cancel_reason_id = fields.Many2one( | |||
'sale.order.cancel.reason', | |||
string="Reason for cancellation", | |||
readonly=True, | |||
ondelete="restrict") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By removing the ondelete behaviour the default 'set null' will apply. Reasons that were applied to sale orders can be removed, leaving the value empty. Is that what you want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More common is not to allow this, but to allow reasons to be set to inactive so that they cannot be assigned anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an active field to manage this.
Thanks.
@JayVora-SerpentCS should be very easy to have this in a mergeable state, if you have a couple of minute. Nice description page! |
Any update of this? |
Will find some tome and push |
Are you going to finally work on this? |
Sorry, lost it. doing in this week for sure! |
fceb406
to
59b903b
Compare
You may proceed please. |
@pedrobaeza I am unable to see what fails on runbot. Can you help please? |
@JayVora-SerpentCS I think it's the warnings raised by sale_rental. Don't worry about it. |
Kindly check. |
Runbots errors are in fact warnings from other module (sale_rental):
|
sale_cancel_reason/README.rst
Outdated
:target: https://www.gnu.org/licenses/agpl.html | ||
:alt: License: AGPL-3 | ||
|
||
Sale Cancel Reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put the same lines above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests would be welcome.
sale_cancel_reason/README.rst
Outdated
This module introduce the following features: | ||
|
||
* This module allows cancel sale order and reason must be given. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't put this extra line
sale_cancel_reason/README.rst
Outdated
============= | ||
|
||
* To configure this module, you need to: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra line and replace *
by #.
for numbered list.
sale_cancel_reason/README.rst
Outdated
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/167/8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/8.0/9.0
sale_cancel_reason/README.rst
Outdated
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/167/8.0 | ||
|
||
For further information, please visit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this paragraph
sale_cancel_reason/README.rst
Outdated
Maintainer | ||
---------- | ||
|
||
.. image:: http://odoo-community.org/logo.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/http/https in both places
sale_cancel_reason/__openerp__.py
Outdated
'name': 'Sale Cancel Reason', | ||
'version': '9.0.1.0.0', | ||
'author': 'Camptocamp, Odoo Community Association (OCA), ' | ||
'Serpent Consulting Services Pvt. Ltd.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indentation
<record id="cancel_reason_other_provider" model="sale.order.cancel.reason"> | ||
<field name="name">Other Service Provider selected</field> | ||
</record> | ||
</odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done, I wonder why the diff shows it open.
sale_cancel_reason/models/sale.py
Outdated
@@ -29,11 +30,15 @@ class SaleOrder(models.Model): | |||
'sale.order.cancel.reason', | |||
string="Reason for cancellation", | |||
readonly=True, | |||
ondelete="restrict") | |||
ondelete='restrict') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next time, don't make these stylistic changes that increases diffs.
@@ -3,6 +3,7 @@ | |||
# | |||
# Author: Guewen Baconnier | |||
# Copyright 2013 Camptocamp SA | |||
# Copyright 2016 Serpent Consulting Services Pvt. Ltd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add your copyright on non touched files (and more if they are __init__.py
files.
Will do the changes asap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work! Some comments in line.
sale_cancel_reason/README.rst
Outdated
Installation | ||
============ | ||
|
||
No external library is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can remove unneeded sections. Also this is displayed as a quotation due to the initial space in the line.
sale_cancel_reason/README.rst
Outdated
============= | ||
|
||
* To configure this module, you need to: | ||
*#. You can configure cancel reason from Sale -> Configuration -> Sale Order Cancel Reason. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove initial asterisks, this is not going to be displayed well.
sale_cancel_reason/__openerp__.py
Outdated
'Serpent Consulting Services Pvt. Ltd.', | ||
'category': 'Sale', | ||
'license': 'AGPL-3', | ||
'complexity': 'normal', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed I think
sale_cancel_reason/__openerp__.py
Outdated
], | ||
'installable': False, | ||
} | ||
'test': ['test/sale_order_cancel.yml'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the tests to python?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
@@ -1,14 +1,13 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<openerp> | |||
<data noupdate="1"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the original noupdate="1"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental due to removal of , its back now.
</div> | ||
</div> | ||
</div> | ||
</section> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final extra line
<h3 class="oe_slogan">It is chosen from a configured list</h3> | ||
<div class="oe_span6"> | ||
<p class="oe_mt32"> | ||
1) Sale Order Configuretion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuretion - > Configuration
sale_cancel_reason/__openerp__.py
Outdated
} | ||
'installable': True, | ||
'application': True, | ||
'auto_install': False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JayVora-SerpentCS not necessary, and can you also please add OCA icon in static/description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[IMP] Improved the code / content as per GIT review and OCA standards.
[IMP] Fix the travis.
@StefanRijnhart @lreficent @pedrobaeza Please review and provide feedback if any. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on runbot 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review LGTM 👍
* [10.0] re-introduce state field on product * [ADD] add setup for product state
No description provided.