[ADD] cost_price to crm.lead model

This commit is contained in:
Stepan Savelyev 2020-01-16 18:51:19 +05:00
parent a233e0a3c6
commit bd7097a156
5 changed files with 35 additions and 0 deletions

View File

@ -17,6 +17,7 @@
"data/fields_default.xml", "data/fields_default.xml",
"data/payment_terms.xml", "data/payment_terms.xml",
"security/ir.model.access.csv", "security/ir.model.access.csv",
"views/crm_lead.xml",
"views/res_partner_contract.xml", "views/res_partner_contract.xml",
"views/res_partner_contract_annex.xml", "views/res_partner_contract_annex.xml",
"views/res_partner_document_template.xml", "views/res_partner_document_template.xml",

View File

@ -251,6 +251,11 @@ msgstr "Информация"
msgid "Contracts" msgid "Contracts"
msgstr "Договоры" msgstr "Договоры"
#. module: client_contracts
#: model:ir.model.fields,field_description:client_contracts.field_crm_lead_cost_price
msgid "Cost Price"
msgstr "Себестоимость"
#. module: client_contracts #. module: client_contracts
#: model:ir.model.fields,help:client_contracts.field_res_partner_contract_contract_annex_number #: model:ir.model.fields,help:client_contracts.field_res_partner_contract_contract_annex_number
msgid "Counter for generate Annex name" msgid "Counter for generate Annex name"
@ -480,6 +485,11 @@ msgstr "Последний раз обновил"
msgid "Last Updated on" msgid "Last Updated on"
msgstr "Последнее обновление" msgstr "Последнее обновление"
#. module: client_contracts
#: model:ir.model,name:client_contracts.model_crm_lead
msgid "Lead/Opportunity"
msgstr "Лид / Потенциальная сделка"
#. module: client_contracts #. module: client_contracts
#: model:ir.ui.view,arch_db:client_contracts.res_partner_contract_annex_view_form #: model:ir.ui.view,arch_db:client_contracts.res_partner_contract_annex_view_form
msgid "Leave empty for compute" msgid "Leave empty for compute"

View File

@ -1,3 +1,4 @@
from . import crm_lead
from . import res_partner from . import res_partner
from . import res_partner_contract from . import res_partner_contract
from . import res_partner_contract_annex from . import res_partner_contract_annex

7
models/crm_lead.py Normal file
View File

@ -0,0 +1,7 @@
from odoo import fields, models
class CrmLead(models.Model):
_inherit = "crm.lead"
cost_price = fields.Integer(string="Cost Price", default=0)

16
views/crm_lead.xml Normal file
View File

@ -0,0 +1,16 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<!-- crm.lead inherit form view -->
<record id="crm_case_form_view_oppor" model="ir.ui.view">
<field name="name">crm.lead.inherit.view.form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date_deadline']" position="after">
<field name="cost_price"/>
</xpath>
</field>
</record>
</odoo>