Browse Source

fiche contact, operation, traduction

master
root 3 years ago
parent
commit
7bc8e4b170
4 changed files with 151 additions and 44 deletions
  1. +38
    -6
      i18n/fr.po
  2. +8
    -1
      models/operation.py
  3. +2
    -0
      views/operation.xml
  4. +103
    -37
      views/partner.xml

+ 38
- 6
i18n/fr.po View File

@ -492,7 +492,7 @@ msgstr "Montant"
#. module: opendons
#: model:ir.actions.report,name:opendons.report_donation_tax_receipt
msgid "Donation Tax Receipt"
msgstr ""
msgstr "Reçus fiscal"
#. module: opendons
#: model:ir.model.fields,field_description:opendons.field_opendons_payment_batch__donation_amount
@ -577,7 +577,7 @@ msgstr ""
#. module: opendons
#: model:ir.model.fields.selection,name:opendons.selection__opendons_operation__chanel__event
msgid "Event"
msgstr "événement"
msgstr "Evénement"
#. module: opendons
#: model:ir.model.fields,field_description:opendons.field_opendons_segment__exclusion
@ -915,7 +915,7 @@ msgstr "Lieu dit"
#. module: opendons
#: model:ir.model.fields.selection,name:opendons.selection__opendons_operation__chanel__mail
msgid "Mailing"
msgstr ""
msgstr "Postale"
#. module: opendons
#: model:ir.model.fields,field_description:opendons.field_opendons_ensemble__message_main_attachment_id
@ -1351,14 +1351,14 @@ msgstr "Chercher"
#: model:ir.model.fields,field_description:opendons.field_opendons_payment_batch__segment_id
#: model:ir.model.fields,field_description:opendons.field_opendons_returnmail_npai__segment_id
msgid "Segment"
msgstr ""
msgstr "Code origine"
#. module: opendons
#: model:ir.actions.act_window,name:opendons.act_operation_segment
#: model:ir.model.fields,field_description:opendons.field_opendons_operation__segment_ids
#: model_terms:ir.ui.view,arch_db:opendons.operation_form
msgid "Segments"
msgstr ""
msgstr "Codes origine"
#. module: opendons
#: model_terms:ir.ui.view,arch_db:opendons.opendons_template_donation_tax_receipt
@ -2227,4 +2227,36 @@ msgstr "Champ du fichier"
#. module: opendons
#: model:ir.model.fields,field_description:opendons.field_opendons_partnerdraftfile_mapping__odoo_field
msgid "odoo field"
msgstr "Champ interne"
msgstr "Champ interne"
#. module: opendons
#: model_terms:ir.ui.view,arch_db:opendons.view_partner_form
msgid "<span>Marketing operations</span>"
msgstr "<span>Operations marketing </span>"
#. module: base
#: model:ir.model.fields.selection,name:base.selection__res_partner__company_type__person
msgid "Individual"
msgstr "Personne physique"
#. modules: base
#: model:ir.model.fields.selection,name:base.selection__res_partner__company_type__company
#: model_terms:ir.ui.view,arch_db:base.view_partner_form
#: model_terms:ir.ui.view,arch_db:base.view_partner_simple_form
#: model_terms:ir.ui.view,arch_db:base.view_res_partner_filter
msgid "Company"
msgstr "Personne morale"
#. module: donation_base
#: model:ir.model.fields,field_description:donation_base.field_res_partner__tax_receipt_ids
#: model:ir.model.fields,field_description:donation_base.field_res_users__tax_receipt_ids
#: model_terms:ir.ui.view,arch_db:donation_base.view_partner_property_form
msgid "Tax Receipts"
msgstr "Reçus fiscaux"
#. module: donation
#: model:ir.actions.act_window,name:donation.donation_action
#: model:ir.actions.act_window,name:donation.partner_donation_action
#: model_terms:ir.ui.view,arch_db:donation.view_partner_form
msgid "Donations"
msgstr "Dons"

+ 8
- 1
models/operation.py View File

@ -50,7 +50,8 @@ class opendons_operation(models.Model):
chanel=fields.Selection([
('mail', 'Mailing'),
('email', 'E-mailing'),
('event', 'Event')],
('event', 'Event'),
('face_to_face', 'Face to face')],
string='Chanel',required=True, translate=True,track_visibility='always')
user_id = fields.Many2one('res.users', string='Author', default=lambda self: self.env.uid)
@ -407,6 +408,12 @@ class opendons_segment(models.Model):
string="# of ensemble",
readonly=True
)
chanel=fields.Selection([
('mail', 'Mailing'),
('email', 'E-mailing'),
('event', 'Event'),
('face_to_face', 'Face to face')],
string='Chanel',required=True, translate=True,track_visibility='always')
@api.depends('mailing_domain')
def _count_partner_segment(self):


+ 2
- 0
views/operation.xml View File

@ -52,6 +52,7 @@
<field name="sequence" widget="handle"/>
<field name="id"/>
<field name="name"/>
<field name="chanel"/>
<field name="logical_operator"/>
<field name="operation_id"/>
<field name="partner_count"/>
@ -183,6 +184,7 @@
<field name="operation_id"/>
<field name="id"/>
<field name="name"/>
<field name="chanel"/>
<field name="logical_operator"/>
<field name="mailing_domain" widget="domain" options="{'model': 'res.partner', 'in_dialog': true}"/>


+ 103
- 37
views/partner.xml View File

@ -145,16 +145,25 @@
<xpath expr="//div[@class='o_address_format']" position="replace">
<field name="street" placeholder="Street..." class="o_address_street" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="street2" placeholder="Street 2..." class="o_address_street" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="city" placeholder="City" class="o_address_city" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" context="{'country_id': country_id, 'default_country_id': country_id, 'zip': zip}"/>
<field name="street" placeholder="Street..." class="o_address_street" attrs="{'readonly': [('parent_id', '!=', False)]}"/>
<field name="street2" placeholder="Street 2..." class="o_address_street" attrs="{'readonly': [('parent_id', '!=', False)]}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip" attrs="{'readonly': [('parent_id', '!=', False)]}"/>
<field name="city" placeholder="City" class="o_address_city" attrs="{'readonly': [('parent_id', '!=', False)]}"/>
<field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" attrs="{'readonly': [('parent_id', '!=', False)]}" context="{'country_id': country_id, 'default_country_id': country_id, 'zip': zip}"/>
<field name="country_id" placeholder="Country" class="o_address_country" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}" attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
<field name="country_id" placeholder="Country" class="o_address_country" options="{&quot;no_open&quot;: True, &quot;no_create&quot;: True}" attrs="{'readonly': [('parent_id', '!=', False)]}"/>
</xpath>
<xpath expr="//field[@name='type']" position="replace">
</xpath>
<xpath expr="//span[@name='address_name']" position="replace">
</xpath>
<xpath expr="//field[@name='zip']" position="before">
<field name="locality" string="Locality" placeholder="locality"/>
@ -178,42 +187,46 @@
</page>
</xpath>
<xpath expr="/form/sheet/div/h1" position="replace">
<group>
<group>
<field name="donor_id"/>
<field name="title" options="{&quot;no_open&quot;: True}" placeholder="" attrs="{'invisible': [('is_company', '=', True)],'required' : [('is_company', '=', False)]}"/>
<field id="individual" class="o_text_overflow" name="name" default_focus="1" placeholder="" attrs="{'required' : [('is_company', '=', False)], 'invisible': [('is_company','=', True)]}"/>
<field name="firstname" attrs="{'invisible':[('is_company','=',True)],'required' : [('is_company', '=', False)]}"/>
<field id="company" class="o_text_overflow" name="name" string="Raison sociale" default_focus="1" placeholder="" attrs="{'required' : [('is_company', '=', True)], 'invisible': [('is_company','=', False)]}"/>
<!-- <field name="source"/> -->
<!-- <field name="company_id"/> -->
<field name="parent_id" string="Company Name"
widget="res_partner_many2one"
placeholder="Company Name..."
domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'show_vat': True}"
attrs="{'invisible': ['|', '&amp;', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"/>
<field name="company_name" attrs="{'invisible': ['|', '|', ('company_name', '=', False), ('company_name', '=', ''), ('is_company', '=', True)]}"/>
<button name="create_company" icon="fa-plus-square" string="Create company"
type="object" class="oe_edit_only btn-link"
attrs="{'invisible': ['|', '|', ('is_company','=', True), ('company_name', '=', ''), ('company_name', '=', False)]}"/>
</group>
</group>
<xpath expr="//button[@name='%(donation.partner_donation_action)d']" position="replace">
</xpath>
<xpath expr="/form/sheet/div/div" position="replace">
<xpath expr="//button[@name='%(donation_base.partner_tax_receipt_action)d']" position="replace">
</xpath>
<xpath expr="//button[@name='294']" position="replace">
<xpath expr="//field[@name='type']" position="before">
<field name="npai_count"/>
</xpath>
<xpath expr="//button[@name='action_view_partner_invoices']" position="replace">
<xpath expr="//div[@name='button_box']" position="inside">
</xpath>
<xpath expr="//button[@name='action_event_view']" position="replace">
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button
class="oe_stat_button"
type="action"
name="%(donation.partner_donation_action)d"
attrs="{'invisible': [('donor_rank', '=', 0)]}"
icon="fa-heart-o">
<field string="Donations" name="donation_count" widget="statinfo" />
</button>
<button
class="oe_stat_button"
type="action"
name="%(donation_base.partner_tax_receipt_action)d"
attrs="{'invisible': [('parent_id', '!=', False)]}"
icon="fa-file-text"
>
<field
string="Tax Receipts"
name="tax_receipt_count"
widget="statinfo"
/>
</button>
<button class="oe_stat_button" type="action"
name="%(act_partner_recurring_donation)d"
@ -260,6 +273,59 @@
</button>
</xpath>
<xpath expr="//page[@name='sales_purchases']" position="after">
<page name="marketing_operation" string="Marketing operation">
<group col="12">
<group colspan="12">
<field name="operation_ids">
<tree>
<field name="name"/>
<field name="chanel"/>
<field name="exported_date"/>
</tree>
</field>
</group>
</group>
</page>
</xpath>
<xpath expr="/form/sheet/div/h1" position="replace">
<group>
<group>
<field name="donor_id"/>
<field name="title" options="{&quot;no_open&quot;: True}" placeholder="" attrs="{'invisible': [('is_company', '=', True)],'required' : [('is_company', '=', False)]}"/>
<field id="individual" class="o_text_overflow" name="name" default_focus="1" placeholder="" attrs="{'required' : [('is_company', '=', False)], 'invisible': [('is_company','=', True)]}"/>
<field name="firstname" attrs="{'invisible':[('is_company','=',True)],'required' : [('is_company', '=', False)]}"/>
<field id="company" class="o_text_overflow" name="name" string="Raison sociale" default_focus="1" placeholder="" attrs="{'required' : [('is_company', '=', True)], 'invisible': [('is_company','=', False)]}"/>
<!-- <field name="source"/> -->
<!-- <field name="company_id"/> -->
<field name="parent_id" string="Company Name"
widget="res_partner_many2one"
placeholder="Company Name..."
domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'show_vat': True}"
attrs="{'invisible': ['|', '&amp;', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"/>
<field name="company_name" attrs="{'invisible': ['|', '|', ('company_name', '=', False), ('company_name', '=', ''), ('is_company', '=', True)]}"/>
<button name="create_company" icon="fa-plus-square" string="Create company"
type="object" class="oe_edit_only btn-link"
attrs="{'invisible': ['|', '|', ('is_company','=', True), ('company_name', '=', ''), ('company_name', '=', False)]}"/>
</group>
</group>
</xpath>
<xpath expr="/form/sheet/div/div" position="replace">
</xpath>
<xpath expr="//field[@name='type']" position="before">
<field name="npai_count"/>
</xpath>
<xpath expr="//field[@name='state_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>


Loading…
Cancel
Save