-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD][br_deliverable] move the estimation pricelist from the project …
…to the customer (#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
- Loading branch information
Showing
5 changed files
with
79 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- 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' | ||
|
||
property_product_estimation_pricelist = fields.Many2one( | ||
string='Estimation Pricelist', | ||
comodel_name='product.pricelist', | ||
company_dependent=True, | ||
help="""Pricelist used for the estimation of the Business Requirements | ||
Deliverables linked to this Customer. | ||
Currency of the Deliverables will be the one from the pricelist.""") | ||
|
||
def _commercial_fields(self, cr, uid, context=None): | ||
return super( | ||
ResPartner, | ||
self | ||
)._commercial_fields( | ||
cr, | ||
uid, | ||
context=context | ||
) + ['property_product_estimation_pricelist'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="property_product_estimation_pricelist" groups="product.group_sale_pricelist"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |