add option save cloudinary files
This commit is contained in:
parent
1b8de5745e
commit
6024810b2f
|
@ -1 +0,0 @@
|
|||
,dannybarajas,danny-Notebook,24.02.2022 22:14,file:///home/dannybarajas/.config/libreoffice/4;
|
|
@ -1 +0,0 @@
|
|||
,dannybarajas,danny-Notebook,09.03.2022 16:38,file:///home/dannybarajas/.config/libreoffice/4;
|
|
@ -10,9 +10,9 @@ from . import survey
|
|||
from . import activity
|
||||
from . import opportunity
|
||||
from . import party_validation
|
||||
from . import exceptions
|
||||
from . import contract
|
||||
from . import ir
|
||||
from . import company
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -48,6 +48,7 @@ def register():
|
|||
party_validation.OpportunityValidation,
|
||||
party_validation.ValidationHistoryAsk,
|
||||
contract.Contract,
|
||||
company.Company,
|
||||
# opportunity.OpportunityEmployee,
|
||||
# opportunity.OpportunityEmployeeContext,
|
||||
# opportunity.OpportunityMonthly,
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
|
||||
class Company(metaclass=PoolMeta):
|
||||
__name__ = 'company.company'
|
||||
|
||||
cloudinary_name = fields.Char('Cloudinary Name')
|
||||
cloudinary_api_key = fields.Char('Cloudinary Api Key')
|
||||
cloudinary_api_secret = fields.Char('Cloudinary Api Secret')
|
||||
cloudinary_upload_preset = fields.Char('Cloudinary Upload Preset')
|
||||
cloudinary_upload_url = fields.Char('Cloudinary Upload Url')
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="company_view_form">
|
||||
<field name="model">company.company</field>
|
||||
<field name="type" eval="None"/>
|
||||
<field name="inherit" ref="company.company_view_form"/>
|
||||
<field name="name">company_form</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
|
@ -3,13 +3,13 @@
|
|||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pyson import Id
|
||||
from trytond import backend
|
||||
from trytond.pyson import Eval
|
||||
from trytond.pool import PoolMeta, Pool
|
||||
|
||||
|
||||
class Configuration(ModelSQL, ModelView):
|
||||
'CRM Configuration'
|
||||
__name__ = 'crm.configuration'
|
||||
|
||||
customer_service_sequence = fields.Many2One('ir.sequence',
|
||||
'Customer Service Sequence', required=True,
|
||||
domain=[('sequence_type', '=',
|
||||
|
|
|
@ -5,8 +5,9 @@ from trytond.model import fields
|
|||
class Contract(metaclass=PoolMeta):
|
||||
__name__ = 'sale.contract'
|
||||
|
||||
department = fields.Many2One('company.department','Department',states={'required':False})
|
||||
department = fields.Many2One('company.department', 'Department', states={'required': False})
|
||||
|
||||
@classmethod
|
||||
def _get_origin(cls):
|
||||
'Return list of Model names for origin Reference'
|
||||
return super(Contract,cls)._get_origin() + ['crm.opportunity']
|
||||
return super(Contract, cls)._get_origin() + ['crm.opportunity']
|
||||
|
|
|
@ -7,7 +7,7 @@ from trytond.model import Workflow, ModelView, ModelSQL, fields
|
|||
from trytond.pyson import Eval, If, In, Get
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
from trytond.wizard import Wizard, StateView, Button, StateReport, StateTransition
|
||||
from trytond.wizard import (Wizard, StateView, Button, StateReport, StateTransition)
|
||||
from trytond.report import Report
|
||||
from .exceptions import CustomerServiceError, CrmConfigurationError
|
||||
from trytond.i18n import gettext
|
||||
|
@ -53,7 +53,6 @@ ETHNICAL_GROUP = [
|
|||
]
|
||||
|
||||
|
||||
|
||||
class CustomerService(Workflow, ModelSQL, ModelView):
|
||||
'Customer Service'
|
||||
__name__ = 'crm.customer_service'
|
||||
|
@ -61,10 +60,10 @@ class CustomerService(Workflow, ModelSQL, ModelView):
|
|||
number = fields.Char('Number', readonly=True)
|
||||
reference = fields.Char('Reference', states=STATES)
|
||||
party = fields.Many2One('party.party', 'Party',
|
||||
states={
|
||||
'readonly': (Eval('state') != 'draft'),
|
||||
# 'required': (Eval('state') == 'open'),
|
||||
}, select=True)
|
||||
states={
|
||||
'readonly': (Eval('state') != 'draft'),
|
||||
# 'required': (Eval('state') == 'open'),
|
||||
}, select=True)
|
||||
route = fields.Char('Route', states=STATES, select=True)
|
||||
customer = fields.Char('Customer', states=STATES,
|
||||
required=True, select=True)
|
||||
|
@ -83,14 +82,14 @@ class CustomerService(Workflow, ModelSQL, ModelView):
|
|||
response = fields.Text('Response', states=STATES_CLOSE)
|
||||
cs_date = fields.DateTime('Date', states={'readonly': True})
|
||||
effective_date = fields.DateTime('Effective Datetime',
|
||||
states=STATES_CLOSE, depends=['state'])
|
||||
states=STATES_CLOSE, depends=['state'])
|
||||
responsible_employee = fields.Many2One('company.employee',
|
||||
'Responsible', states=STATES_CLOSE)
|
||||
'Responsible', states=STATES_CLOSE)
|
||||
company = fields.Many2One('company.company', 'Company', required=True,
|
||||
states=STATES, domain=[
|
||||
('id', If(In('company',
|
||||
Eval('context', {})), '=', '!='), Get(Eval('context', {}),
|
||||
'company', 0)), ])
|
||||
states=STATES, domain=[
|
||||
('id', If(In('company',
|
||||
Eval('context', {})), '=', '!='), Get(Eval('context', {}),
|
||||
'company', 0)), ])
|
||||
satisfaction = fields.Selection(OPTION_SELECT, 'Satisfaction')
|
||||
satisfaction_string = satisfaction.translated('satisfaction')
|
||||
notes = fields.Text('Notes', states=STATES_CLOSE)
|
||||
|
|
|
@ -23,8 +23,6 @@ from trytond.modules.company import CompanyReport
|
|||
# Manage errors
|
||||
from trytond.exceptions import UserError
|
||||
from .exceptions import IncompletePartyValidation, ChangeStateWarning
|
||||
from trytond.exceptions import UserWarning
|
||||
|
||||
from trytond.ir.attachment import AttachmentCopyMixin
|
||||
from trytond.ir.note import NoteCopyMixin
|
||||
from trytond.modules.company.model import employee_field, set_employee
|
||||
|
|
|
@ -17,3 +17,4 @@ xml:
|
|||
party_validation.xml
|
||||
opportunity.xml
|
||||
message.xml
|
||||
company.xml
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="//page[@name='employees']" position="after">
|
||||
<page string="Storage" id="storage">
|
||||
<label name="cloudinary_name"/>
|
||||
<field name="cloudinary_name"/>
|
||||
<label name="cloudinary_api_key"/>
|
||||
<field name="cloudinary_api_key"/>
|
||||
<label name="cloudinary_api_secret"/>
|
||||
<field name="cloudinary_api_secret"/>
|
||||
<label name="cloudinary_upload_preset"/>
|
||||
<field name="cloudinary_upload_preset"/>
|
||||
<label name="cloudinary_upload_url"/>
|
||||
<field name="cloudinary_upload_url"/>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
Loading…
Reference in New Issue