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

[10][MIGR] account_invoice_pricelist #342

Closed
wants to merge 4 commits into from

Conversation

rvalyi
Copy link
Member

@rvalyi rvalyi commented Dec 15, 2017

No description provided.

@rvalyi rvalyi changed the title 10 migr account invoice pricelist [10][MIGR] account_invoice_pricelist Dec 15, 2017
@pedrobaeza pedrobaeza mentioned this pull request Dec 15, 2017
34 tasks
@rvalyi rvalyi force-pushed the 10-migr-account_invoice_pricelist branch 3 times, most recently from cd53cac to fde4ecc Compare December 15, 2017 17:48
@pedrobaeza
Copy link
Member

Why haven't you used the migration guide, but changing 9.0 by 8.0? You need to preserve commit history

@rvalyi
Copy link
Member Author

rvalyi commented Dec 18, 2017

@pedrobaeza my bad. Somebody told me version 8.0 was the most advanced and I admitted it was true without checking if it was ported to 9.0 before... I'll review your 9.0 port and start from here again sorry.

@rvalyi
Copy link
Member Author

rvalyi commented Dec 18, 2017

@pedrobaeza I should say I have been induced in error because I checked too quickly on this addons-table https://github.com/OCA/account-invoicing/tree/10.0#unported-addons where it says last version of
account_invoice_pricelist was 8.0.1.0.0 and I assumed the table was correct.

is it a known issue this table can miss that kind of information? and also is there a reason we don't we have such a table for v11?

@pedrobaeza
Copy link
Member

@pedrobaeza I should say I have been induced in error because I checked too quickly on this addons-table https://github.com/OCA/account-invoicing/tree/10.0#unported-addons where it says last version of
account_invoice_pricelist was 8.0.1.0.0 and I assumed the table was correct.

This is because the 10.0 branch was created before the module was merged in 9.0

is it a known issue this table can miss that kind of information? and also is there a reason we don't we have such a table for v11?

I removed that tables as part of the 11.0 branch creation for avoiding this kind of situations, as now if the module is not there, it means is not migrated. And even more, there's no possibility of having outdated sources hosted in the repo. That was one of the advantages I enumerated when announcing this change of paradigm if you remember.

# © 2014-2016 GRAP <http://www.grap.coop>.
# © 2017 Therp BV <http://therp.nl>.
# License AGPL-3.0 or later <http://www.gnu.org/licenses/agpl.html>.
from openerp import api, fields, models
Copy link
Member

Choose a reason for hiding this comment

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

s/openerp/odoo

# -*- coding: utf-8 -*-
# © 2015-2016 GRAP <http://www.grap.coop>.
# © 2017 Therp BV <http://therp.nl>.
# License AGPL-3.0 or later <http://www.gnu.org/licenses/agpl.html>.
Copy link
Member

Choose a reason for hiding this comment

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

Not blocking for me but here there is no content (just import), then authors and license can be removed (it's just my opinion ;-) )

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

if hasattr(self.partner_id,
'property_product_pricelist_purchase'):
self.pricelist_id =\
self.partner_id.property_product_pricelist_purchase
Copy link
Member

Choose a reason for hiding this comment

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

Partner model has attribute property_product_pricelist_purchase which is defined in product module.
Why a condition here ?

<button
type="object"
name="button_update_prices_from_pricelist"
string="Update prices from product and/or pricelist"
Copy link
Member

Choose a reason for hiding this comment

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

This button string is too long in the interface (mobile render !? etc)
=> 'Update prices' is sufficient I think

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe "Apply Pricelist" ?

Copy link
Member

Choose a reason for hiding this comment

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

Or "Update prices"?

# © 2015-2016 GRAP <http://www.grap.coop>.
# © 2017 Therp BV <http://therp.nl>.
# License AGPL-3.0 or later <http://www.gnu.org/licenses/agpl.html>.
from openerp import models, api
Copy link
Member

Choose a reason for hiding this comment

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

s/openerp/odoo

@legalsylvain
Copy link
Contributor

Hi @rvalyi, the res_groups.yml demo file is not useless for me. By this way, it is more easy to test the module. (On runbot, mainly) to avoid functional users to have to set this settings each time.

For that reason, I regurlarly add a demo file, adding admin user to the groups, required for the module.
In that module, if users is not part of pricelist group, it will not have the possibility to test fully the module. (but maybe some groups changed since V8)

If you're agree, to add it again, maybe add a xml file, as yml is deprecated.

Thanks for porting this module.

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.

Hi @rvalyi, more deeply review.

  1. minor remark, on readme file, I think runbot link is usefull.

  2. I think there are a problem in your code. you don't seems to overload the function _compute_price()
    This function should be overloaded to allow to compute price, based on the correct pricelist. Don't you think ? otherwise, changing quantity will not recompute the price, based on the correct pricelist.

  3. you can add you in creditor section ! This work is not a /s/openerp/odoo work, lot of changes since V8.

@rvalyi
Copy link
Member Author

rvalyi commented Dec 20, 2017

@legalsylvain I'll redo the migration starting from the 9.0 branch again anyway. Thanks for your comments, I'll take them into account.

@angelmoya
Copy link
Member

Hi @rvalyi, did you redo this migration? Maybe I could do it if you don't plan to do.

Thanks

@rvalyi
Copy link
Member Author

rvalyi commented Mar 26, 2018

Hello guys, just wanted to say, I'm on it today finally

@rvalyi
Copy link
Member Author

rvalyi commented Mar 30, 2018

Here is the new PR superseding this one
#368

@rvalyi rvalyi closed this Mar 30, 2018
# -*- coding: utf-8 -*-
# © 2015-2016 GRAP <http://www.grap.coop>.
# © 2015-2017 Therp BV <http://therp.nl>.
# License AGPL-3.0 or later <http://www.gnu.org/licenses/agpl.html>.
{
'name': 'Account - Pricelist on Invoices',
'version': '8.0.1.0.0',
Copy link
Contributor

Choose a reason for hiding this comment

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

Version number should be updated to 10.0 as well

© 2017 Therp BV <http://therp.nl>.
License AGPL-3.0 or later <http://www.gnu.org/licenses/agpl.html>.
-->
<openerp>
Copy link
Contributor

Choose a reason for hiding this comment

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

s/openerp/odoo and <data> is deprecated.

Copy link
Contributor

@NL66278 NL66278 left a comment

Choose a reason for hiding this comment

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

👍 LGTM. Some suggestions for style changes and small fixes. See comments.

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.

6 participants