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
Changes from 1 commit
712d1a8
841373b
9d96063
2f0b236
53be9cd
5e9e71b
2231dc1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Elico Corp (https://www.elico-corp.com). | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import business | ||
from . import res_partner |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Elico Corp (https://www.elico-corp.com). | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openerp import fields, models | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = 'res.partner' | ||
|
||
pricelist_id = fields.Many2one( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. @victormartinelicocorp To be discussed |
||
string='Estimation Pricelist', | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. remove "Linked to this project" |
||
Currency of the Deliverables will be the one from this pricelist.''' | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<openerp> | ||
<data> | ||
|
||
<record id="view_partner_property_form" model="ir.ui.view"> | ||
<field name="name">res.partner.product.property.form.inherit</field> | ||
<field name="model">res.partner</field> | ||
<field name="inherit_id" ref="product.view_partner_property_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='property_product_pricelist']" position="after"> | ||
<field name="pricelist_id" groups="product.group_sale_pricelist"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
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