Change design of report and update selection fields.
This commit is contained in:
parent
23662ea227
commit
5898a63d89
|
@ -0,0 +1 @@
|
||||||
|
,dannybarajas,danny-Notebook,24.02.2022 18:44,file:///home/dannybarajas/.config/libreoffice/4;
|
|
@ -32,6 +32,8 @@ def register():
|
||||||
opportunity.CrmOpportunityLine,
|
opportunity.CrmOpportunityLine,
|
||||||
opportunity.PartyValidationOpportunity,
|
opportunity.PartyValidationOpportunity,
|
||||||
opportunity.OpportunityTraceability,
|
opportunity.OpportunityTraceability,
|
||||||
|
opportunity.OpportunityKind,
|
||||||
|
opportunity.OpportunityKindConcept,
|
||||||
# opportunity.PartyEvaluationConcept,
|
# opportunity.PartyEvaluationConcept,
|
||||||
# opportunity.PartyEvaluation,
|
# opportunity.PartyEvaluation,
|
||||||
# party_validation.Validation,
|
# party_validation.Validation,
|
||||||
|
|
55
locale/es.po
55
locale/es.po
|
@ -262,6 +262,10 @@ msgctxt "field:crm.opportunity,amount:"
|
||||||
msgid "Amount"
|
msgid "Amount"
|
||||||
msgstr "Valor Estimado"
|
msgstr "Valor Estimado"
|
||||||
|
|
||||||
|
msgctxt "field:crm.opportunity,cancelled_reason:"
|
||||||
|
msgid "Cancelled Reason"
|
||||||
|
msgstr "Razón de la Anulación"
|
||||||
|
|
||||||
msgctxt "field:crm.opportunity,comment:"
|
msgctxt "field:crm.opportunity,comment:"
|
||||||
msgid "Comment"
|
msgid "Comment"
|
||||||
msgstr "Comentarios"
|
msgstr "Comentarios"
|
||||||
|
@ -314,6 +318,10 @@ msgctxt "field:crm.opportunity,is_prospect:"
|
||||||
msgid "Is Prospect"
|
msgid "Is Prospect"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "field:crm.opportunity,kind_opportunity:"
|
||||||
|
msgid "Opportunity Kind Concept"
|
||||||
|
msgstr "Clase"
|
||||||
|
|
||||||
msgctxt "field:crm.opportunity,lines:"
|
msgctxt "field:crm.opportunity,lines:"
|
||||||
msgid "Lines"
|
msgid "Lines"
|
||||||
msgstr "Líneas"
|
msgstr "Líneas"
|
||||||
|
@ -364,12 +372,20 @@ msgstr "Frecuencia de Facturación"
|
||||||
|
|
||||||
msgctxt "field:crm.opportunity,traceability:"
|
msgctxt "field:crm.opportunity,traceability:"
|
||||||
msgid "Opportunity Traceability"
|
msgid "Opportunity Traceability"
|
||||||
msgstr ""
|
msgstr "Trazabilidad"
|
||||||
|
|
||||||
msgctxt "field:crm.opportunity,type:"
|
msgctxt "field:crm.opportunity,type:"
|
||||||
msgid "Type"
|
msgid "Type"
|
||||||
msgstr "Tipo de Oportunidad"
|
msgstr "Tipo de Oportunidad"
|
||||||
|
|
||||||
|
msgctxt "field:crm.opportunity.kind,concept:"
|
||||||
|
msgid "Concept Opportunity Kind"
|
||||||
|
msgstr "Clase"
|
||||||
|
|
||||||
|
msgctxt "field:crm.opportunity.kind,opportunity:"
|
||||||
|
msgid "Opportunity"
|
||||||
|
msgstr "Oportunidad"
|
||||||
|
|
||||||
msgctxt "field:crm.opportunity.line,description:"
|
msgctxt "field:crm.opportunity.line,description:"
|
||||||
msgid "Description"
|
msgid "Description"
|
||||||
msgstr "Descripción"
|
msgstr "Descripción"
|
||||||
|
@ -434,40 +450,37 @@ msgctxt "field:crm.opportunity.validation,template:"
|
||||||
msgid "Template Ask"
|
msgid "Template Ask"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "field:crm.opportunity.validation,validated_by:"
|
msgctxt "field:crm.opportunity.validation,validated_by:"
|
||||||
msgid "User"
|
msgid "Validated By"
|
||||||
msgstr "Validado Por"
|
msgstr "Validado Por"
|
||||||
|
|
||||||
#, fuzzy
|
msgctxt "field:crm.opportunity_kind_concept,name:"
|
||||||
|
msgid "Concept Name"
|
||||||
|
msgstr "Concepto"
|
||||||
|
|
||||||
msgctxt "field:crm.opportunity_traceability,action:"
|
msgctxt "field:crm.opportunity_traceability,action:"
|
||||||
msgid "Action"
|
msgid "Action"
|
||||||
msgstr "Acción"
|
msgstr "Acción"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "field:crm.opportunity_traceability,date:"
|
msgctxt "field:crm.opportunity_traceability,date:"
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr "Fecha Venta"
|
msgstr "Fecha"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "field:crm.opportunity_traceability,date_action:"
|
msgctxt "field:crm.opportunity_traceability,date_action:"
|
||||||
msgid "Date"
|
msgid "Date"
|
||||||
msgstr "Fecha Venta"
|
msgstr "Fecha"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "field:crm.opportunity_traceability,observation:"
|
msgctxt "field:crm.opportunity_traceability,observation:"
|
||||||
msgid "Observation"
|
msgid "Observation"
|
||||||
msgstr "Observación"
|
msgstr "Observación"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "field:crm.opportunity_traceability,opportunity:"
|
msgctxt "field:crm.opportunity_traceability,opportunity:"
|
||||||
msgid "Opportunity"
|
msgid "Opportunity"
|
||||||
msgstr "Oporunidad"
|
msgstr "Oportunidad"
|
||||||
|
|
||||||
#, fuzzy
|
|
||||||
msgctxt "field:crm.opportunity_traceability,validated_by:"
|
msgctxt "field:crm.opportunity_traceability,validated_by:"
|
||||||
msgid "User"
|
msgid "User"
|
||||||
msgstr "Validado Por"
|
msgstr "Usuario"
|
||||||
|
|
||||||
msgctxt "field:crm.party_validation_opportunity,approved:"
|
msgctxt "field:crm.party_validation_opportunity,approved:"
|
||||||
msgid "Approved"
|
msgid "Approved"
|
||||||
|
@ -669,6 +682,10 @@ msgctxt "model:crm.opportunity,name:"
|
||||||
msgid "CRM Opportunity"
|
msgid "CRM Opportunity"
|
||||||
msgstr "CRM Oportunidad"
|
msgstr "CRM Oportunidad"
|
||||||
|
|
||||||
|
msgctxt "model:crm.opportunity.kind,name:"
|
||||||
|
msgid "Opportunity Kind"
|
||||||
|
msgstr "Clase"
|
||||||
|
|
||||||
msgctxt "model:crm.opportunity.line,name:"
|
msgctxt "model:crm.opportunity.line,name:"
|
||||||
msgid "CRM Opportunity Line"
|
msgid "CRM Opportunity Line"
|
||||||
msgstr "Linea Oportunidad"
|
msgstr "Linea Oportunidad"
|
||||||
|
@ -677,6 +694,10 @@ msgctxt "model:crm.opportunity.validation,name:"
|
||||||
msgid "Validation Ask"
|
msgid "Validation Ask"
|
||||||
msgstr "Linea de Validación"
|
msgstr "Linea de Validación"
|
||||||
|
|
||||||
|
msgctxt "model:crm.opportunity_kind_concept,name:"
|
||||||
|
msgid "Opportunity Kind Concept"
|
||||||
|
msgstr "Clase"
|
||||||
|
|
||||||
msgctxt "model:crm.opportunity_traceability,name:"
|
msgctxt "model:crm.opportunity_traceability,name:"
|
||||||
msgid "Model to save traceability of the opportunity"
|
msgid "Model to save traceability of the opportunity"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2119,6 +2140,14 @@ msgctxt "selection:crm.customer_service,victim_of_violence:"
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr "Si"
|
msgstr "Si"
|
||||||
|
|
||||||
|
msgctxt "selection:crm.opportunity,cancelled_reason:"
|
||||||
|
msgid "No rentable para la empresa"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "selection:crm.opportunity,cancelled_reason:"
|
||||||
|
msgid "No se llego a un acuerdo"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "selection:crm.opportunity,reference:"
|
msgctxt "selection:crm.opportunity,reference:"
|
||||||
msgid "Electronic"
|
msgid "Electronic"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
31055
opportunity.fodt
31055
opportunity.fodt
File diff suppressed because it is too large
Load Diff
|
@ -64,17 +64,20 @@ class Opportunity(
|
||||||
_depends_stop = ['state']
|
_depends_stop = ['state']
|
||||||
|
|
||||||
number = fields.Char('Number', readonly=True, required=True, select=True)
|
number = fields.Char('Number', readonly=True, required=True, select=True)
|
||||||
# reference = fields.Char('Reference', select=True,
|
reference = fields.Char('Reference', select=True,
|
||||||
# states={
|
|
||||||
# 'readonly': ~Eval('state').in_(['prospecting', 'analysis', 'quote_revision', 'review'])
|
|
||||||
# })
|
|
||||||
reference = fields.Selection([
|
|
||||||
('physical', "Physical"),
|
|
||||||
('electronic', "Electronic")], "Reference", select=True, sort=False,
|
|
||||||
states={
|
states={
|
||||||
'readonly': ~Eval('state').in_(['prospecting', 'analysis'])
|
'readonly': ~Eval('state').in_(['prospecting', 'analysis', 'quote_revision', 'review'])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
kind_opportunity = fields.Many2One('crm.opportunity_kind_concept', 'Opportunity Kind Concept', select=True)
|
||||||
|
|
||||||
|
# reference = fields.Selection([
|
||||||
|
# ('physical', "Physical"),
|
||||||
|
# ('electronic', "Electronic")], "Reference", select=True, sort=False,
|
||||||
|
# states={
|
||||||
|
# 'readonly': ~Eval('state').in_(['prospecting', 'analysis'])
|
||||||
|
# })
|
||||||
|
|
||||||
party = fields.Many2One(
|
party = fields.Many2One(
|
||||||
'party.party', "Party", select=True,
|
'party.party', "Party", select=True,
|
||||||
states={
|
states={
|
||||||
|
@ -194,6 +197,17 @@ class Opportunity(
|
||||||
('salesman', 'Salesman'),
|
('salesman', 'Salesman'),
|
||||||
('referred', 'Referred'),
|
('referred', 'Referred'),
|
||||||
], "Source", required=True, select=True)
|
], "Source", required=True, select=True)
|
||||||
|
cancelled_reason = fields.Selection([
|
||||||
|
('',''),
|
||||||
|
('Sin acuerdo', "No se llego a un acuerdo"),
|
||||||
|
('cliente_bloqueado', "No rentable para la empresa")], "Cancelled Reason", required=False,
|
||||||
|
states={
|
||||||
|
'invisible': ~Eval('state').in_(['analysis', 'review', 'quote_revision', 'cancelled', 'lost'])
|
||||||
|
}, depends=['state'])
|
||||||
|
# states={
|
||||||
|
# 'readonly': ~Eval('state').in_(['prospecting', 'analysis'])
|
||||||
|
# }
|
||||||
|
|
||||||
party_validations = fields.One2Many('crm.opportunity.validation', 'opportunity', 'Party Validations')
|
party_validations = fields.One2Many('crm.opportunity.validation', 'opportunity', 'Party Validations')
|
||||||
is_prospect = fields.Function(fields.Boolean('Is Prospect'), 'get_is_prospect')
|
is_prospect = fields.Function(fields.Boolean('Is Prospect'), 'get_is_prospect')
|
||||||
is_approved = fields.Function(fields.Boolean('Is Approved'), 'get_is_approved')
|
is_approved = fields.Function(fields.Boolean('Is Approved'), 'get_is_approved')
|
||||||
|
@ -210,6 +224,7 @@ class Opportunity(
|
||||||
('analysis', 'prospecting'),
|
('analysis', 'prospecting'),
|
||||||
('analysis', 'quotation'),
|
('analysis', 'quotation'),
|
||||||
('analysis', 'review'),
|
('analysis', 'review'),
|
||||||
|
('analysis', 'cancelled'),
|
||||||
('review', 'quotation'),
|
('review', 'quotation'),
|
||||||
('review', 'cancelled'),
|
('review', 'cancelled'),
|
||||||
('review', 'analysis'),
|
('review', 'analysis'),
|
||||||
|
@ -281,7 +296,7 @@ class Opportunity(
|
||||||
'invisible': ~Eval('state').in_(['customer_approbation']),
|
'invisible': ~Eval('state').in_(['customer_approbation']),
|
||||||
},
|
},
|
||||||
'cancelled': {
|
'cancelled': {
|
||||||
'invisible': ~Eval('state').in_(['quote_revision','review']),
|
'invisible': ~Eval('state').in_(['analysis', 'quote_revision','review']),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -708,6 +723,18 @@ class PartyValidationOpportunity(ModelSQL, ModelView):
|
||||||
date = fields.Date('Date')
|
date = fields.Date('Date')
|
||||||
observation = fields.Text('Observation')
|
observation = fields.Text('Observation')
|
||||||
|
|
||||||
|
class OpportunityKindConcept(ModelSQL, ModelView):
|
||||||
|
''' Opportunity Kind Concept '''
|
||||||
|
'Opportunity Kind Concept'
|
||||||
|
__name__ = 'crm.opportunity_kind_concept'
|
||||||
|
name = fields.Char('Concept Name', required=True)
|
||||||
|
|
||||||
|
class OpportunityKind(ModelSQL, ModelView):
|
||||||
|
''' Opportunity Kind'''
|
||||||
|
__name__ = 'crm.opportunity.kind'
|
||||||
|
concept = fields.Many2One('crm.opportunity_kind_concept', 'Concept Opportunity Kind', required=True )
|
||||||
|
opportunity = fields.Many2One('crm.opportunity', 'Opportunity')
|
||||||
|
|
||||||
class OpportunityTraceability(ModelSQL, ModelView):
|
class OpportunityTraceability(ModelSQL, ModelView):
|
||||||
''' Model to save traceability of the opportunity'''
|
''' Model to save traceability of the opportunity'''
|
||||||
'Opportunity Traceability'
|
'Opportunity Traceability'
|
||||||
|
@ -745,9 +772,9 @@ class CrmOpportunityLine(sequence_ordered(), ModelSQL, ModelView):
|
||||||
states=_states, depends=['unit_digits'] + _depends)
|
states=_states, depends=['unit_digits'] + _depends)
|
||||||
unit = fields.Many2One('product.uom', 'Unit', required=True,
|
unit = fields.Many2One('product.uom', 'Unit', required=True,
|
||||||
states=_states, depends=_depends)
|
states=_states, depends=_depends)
|
||||||
# unit = fields.Function(fields.Many2One('product.uom', 'Unit', required=True,
|
|
||||||
# states=_states, depends=_depends),
|
|
||||||
# 'on_change_with_unit')
|
|
||||||
unit_digits = fields.Function(fields.Integer('Unit Digits'),
|
unit_digits = fields.Function(fields.Integer('Unit Digits'),
|
||||||
'on_change_with_unit_digits')
|
'on_change_with_unit_digits')
|
||||||
|
|
||||||
|
@ -778,15 +805,10 @@ class CrmOpportunityLine(sequence_ordered(), ModelSQL, ModelView):
|
||||||
return self.unit.digits
|
return self.unit.digits
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# @fields.depends('product')
|
|
||||||
# def on_change_with_unit_digits(self, name=None):
|
|
||||||
# if self.product:
|
|
||||||
# return self.product.list_price_uom
|
|
||||||
|
|
||||||
@fields.depends('product')
|
@fields.depends('product')
|
||||||
def on_change_with_unit(self, name=None):
|
def on_change_with_unit_price(self, name=None):
|
||||||
if self.product:
|
if self.product:
|
||||||
return self.product.list_price_uom
|
return self.product.list_price
|
||||||
|
|
||||||
@fields.depends('product')
|
@fields.depends('product')
|
||||||
def on_change_with_description(self, name=None):
|
def on_change_with_description(self, name=None):
|
||||||
|
|
|
@ -13,14 +13,17 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="address" colspan="3"/>
|
<field name="address" colspan="3"/>
|
||||||
<label name="type"/>
|
<label name="type"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<newline/>
|
|
||||||
|
|
||||||
<label name="description"/>
|
<label name="description"/>
|
||||||
<field name="description" colspan="3"/>
|
<field name="description" colspan="5"/>
|
||||||
<label name="reference"/>
|
|
||||||
<field name="reference"/>
|
<label name="kind_opportunity"/>
|
||||||
|
<field name="kind_opportunity"/>
|
||||||
|
<!-- <newline/> -->
|
||||||
<label name="source"/>
|
<label name="source"/>
|
||||||
<field name="source"/>
|
<field name="source"/>
|
||||||
|
<label name="reference"/>
|
||||||
|
<field name="reference"/>
|
||||||
|
|
||||||
<label name="amount"/>
|
<label name="amount"/>
|
||||||
<field name="amount" symbol="currency"/>
|
<field name="amount" symbol="currency"/>
|
||||||
|
@ -43,15 +46,16 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<label name="converted_by"/>
|
<label name="converted_by"/>
|
||||||
<field name="converted_by"/>
|
<field name="converted_by"/>
|
||||||
<label name="start_date"/>
|
<label name="start_date"/>
|
||||||
<field name="start_date"/>
|
<field name="start_date"/>s
|
||||||
<label name="end_date"/>
|
<label name="end_date"/>
|
||||||
<field name="end_date"/>
|
<field name="end_date"/>
|
||||||
<label name="payment_term"/>
|
<label name="payment_term"/>
|
||||||
<field name="payment_term"/>
|
<field name="payment_term"/>
|
||||||
|
<!-- <separator name="cancelled_reason" colspan="4"/> -->
|
||||||
|
<label name="cancelled_reason"/>
|
||||||
|
<field name="cancelled_reason"/>
|
||||||
<separator name="comment" colspan="4"/>
|
<separator name="comment" colspan="4"/>
|
||||||
<field name="comment" colspan="4"/>
|
<field name="comment" colspan="4"/>
|
||||||
<separator name="lost_reason" colspan="4"/>
|
|
||||||
<field name="lost_reason" colspan="4"/>
|
|
||||||
</page>
|
</page>
|
||||||
<page name="lines">
|
<page name="lines">
|
||||||
<field name="lines"/>
|
<field name="lines"/>
|
||||||
|
|
|
@ -14,5 +14,5 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="unit"/>
|
<field name="unit"/>
|
||||||
<newline />
|
<newline />
|
||||||
<label name="description"/>
|
<label name="description"/>
|
||||||
<field name="description"/>
|
<field name="description"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue