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
[ADD][br_deliverable] move the estimation pricelist from the project to the customer #117
[ADD][br_deliverable] move the estimation pricelist from the project to the customer #117
Conversation
Improve customer model to add additional pricelist for estimations
Hey @victormartinelicocorp, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
@elicoidal @seb-elico this is for the pricelist estimation Others is weird that ask me to sign again my CLA. What should I do? |
@jbeficent Any idea about the CLA? |
class ResPartner(models.Model): | ||
_inherit = 'res.partner' | ||
|
||
pricelist_id = fields.Many2one( |
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.
should not this be a property (like customer pricelists)?
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/pricelist_id/estimation_pricelist_id
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.
@victormartinelicocorp I remember you told me the Sales Pricelist was a computed field. Reason is: when the partner is a contact of a company, his Sales Pricelist is the one from his company. As discussed, we should replicate this behavior.
EDIT: after checking with @elicoidal, we are looking for a slightly different behavior for the estimation pricelist. For the contacts, the sales pricelist is "inherited": it comes from their parent res_partner (e.g. their company). For the estimation pricelist, we don't need to implement this "heritage". But, in multi-company context, we need to be able to define different estimation pricelists for a customer when we work on different companies, this is what @elicoidal means by property (it's a "dynamic" field that can have different value based on the current company).
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.
@victormartinelicocorp To be discussed
comodel_name='product.pricelist', | ||
domain=[('type', '=', 'sale')], | ||
help='''Pricelist used for the estimation of the Business Requirements | ||
Deliverables linked to this project. |
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 "Linked to this project"
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.
What about the pricelist calculation methods in the deliverable lines?
class ResPartner(models.Model): | ||
_inherit = 'res.partner' | ||
|
||
pricelist_id = fields.Many2one( |
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/pricelist_id/estimation_pricelist_id
I am thinking that we should maybe think about migration script but it is complex (cross module). |
@@ -6,7 +6,7 @@ | |||
'category': 'Business Requirements Management', | |||
'summary': 'Manage the Business Requirement Deliverables and \ | |||
Resources for your customers', | |||
'version': '8.0.4.0.0', | |||
'version': '8.0.4.0.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.
I think we should bump to 8.0.5.0.0 because this modules implies a manual migration of the data
class ResPartner(models.Model): | ||
_inherit = 'res.partner' | ||
|
||
pricelist_id = fields.Many2one( |
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.
@victormartinelicocorp I remember you told me the Sales Pricelist was a computed field. Reason is: when the partner is a contact of a company, his Sales Pricelist is the one from his company. As discussed, we should replicate this behavior.
EDIT: after checking with @elicoidal, we are looking for a slightly different behavior for the estimation pricelist. For the contacts, the sales pricelist is "inherited": it comes from their parent res_partner (e.g. their company). For the estimation pricelist, we don't need to implement this "heritage". But, in multi-company context, we need to be able to define different estimation pricelists for a customer when we work on different companies, this is what @elicoidal means by property (it's a "dynamic" field that can have different value based on the current company).
@victormartinelicocorp |
@victormartinelicocorp if you can fix this one we can merge it |
@elicoidal I'll try to use 2 hours at end of day if I couldn't dedicate this time I let you know |
@victormartinelicocorp It's very strange indeed, it looks like the OCA CLA bot didn't detect your GitHub login. This is probably the root cause of this error... @jbeficent What to you think? |
Propery on new API is mean company dependent
Add company dependent (property) pricelist for estimation
The remark on known issues is added and also now is company dependent. @elicoidal @seb-elico Could you review? |
@seb-elico @dreispt @pedrobaeza I think we can move forward |
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.
Other than a couple of nitpicks, LGTM
@@ -16,6 +16,9 @@ Two new concepts complement the main business requirements model: | |||
* Deliverable lines | |||
* Resource lines | |||
|
|||
A new field for pricelist estimation has been added to the partner to be used in the Deliverable | |||
lines and Resources lines. |
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.
Since we are describing the module features, instead of "has been added" I would rather say "is available".
company_dependent=True, | ||
help='''Pricelist used for the estimation of the Business Requirements | ||
Deliverables linked to this project. | ||
Currency of the Deliverables will be the one from this pricelist.''') |
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.
Prefer using triple double quotes instead of triple single quotes.
@dreispt I corrected the README and quotes. I move forward :) |
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
…to the customer (OCA#117) * [IMP] business_requirement_deliverable Improve customer model to add additional pricelist for estimations * Update README.rst * Bumped version number * [ADD] business_requirement_deliverable Propery on new API is mean company dependent * [ADD] business_requirement_deliverable Add company dependent (property) pricelist for estimation * Refreshed the README * Removed the single quotes
Improve customer model to add additional pricelist for estimations