28 Commits

Author SHA1 Message Date
Stéphan Sainléger
10f1185e5a [I18N] partner_profiles_portal: improve french translations 2023-06-28 15:31:54 +02:00
Stéphan Sainléger
b839b8379f [IMP] partner_profiles: apply migration only on contact type partner 2023-06-28 15:31:54 +02:00
Stéphan Sainléger
6e55e69918 [IMP] partner_profiles_portal: add required asterisk in portal forms 2023-06-28 15:31:54 +02:00
Stéphan Sainléger
6e277c0a29 [IMP] partner_profiles_portal: remove position profile frm child_ids 2023-06-28 15:31:54 +02:00
Stéphan Sainléger
3e9f6f62e8 [IMP] partner_profiles: remove position profiles from child_ids 2023-06-28 15:31:54 +02:00
Stéphan Sainléger
83433f7856 [IMP] partner_profiles_portal: improve /my/account name field label 2023-06-28 15:31:54 +02:00
Stéphan Sainléger
eb6658d10f [I18N] partner_profiles_portal: modify profiles french translations
"Profil principal" -> "Fiche administrative"
"Profil public" -> "Coordonnées publiques"
"Profil position" -> "Fonction"
2023-06-28 15:31:54 +02:00
Stéphan Sainléger
b2d77fa926 [I18N] partner_profiles: modify profile name french translations
"Profil principal" -> "Fiche administrative"
"Profil public" -> "Coordonnées publiques"
"Profil position" -> "Fonction"
2023-06-28 15:31:54 +02:00
Stéphan Sainléger
eb25ed7d0b [FIX] partner_profiles_portal: fix portal boolean fields handling 2023-06-27 14:30:54 +02:00
Stéphan Sainléger
b7496f99b5 [IMP] partner_profiles: sync active field values between profiles
Change in main profile is synchronized in public and position profiles.
Change in public profile is sy,chronized in main and position profiles.
Change in position profile is NOT synchronized in main and public profiles.
2023-06-27 14:30:54 +02:00
Stéphan Sainléger
8e48fde08f [IMP] partner_profiles: add profile in partner kanban view 2023-06-27 14:30:54 +02:00
Stéphan Sainléger
b1161bc709 [IMP] partner_profiles_portal: add positions details in portal
Adds several portal views to consult all the positions of a structure,
and their details.
2023-06-27 14:30:54 +02:00
Stéphan Sainléger
5d6d5668e3 [IMP] partner_profiles_portal: add website page edition slots 2023-06-27 14:30:54 +02:00
Stéphan Sainléger
f262aad42a [IMP] partner_profiles: clarify position profiles display
separates the notebook pages of the child_ids and the position
profiles in both company and individual partner form views.
2023-06-27 14:30:54 +02:00
Stéphan Sainléger
4ce4709767 [IMP] partner_profiles_portal: refactor position profil creation 2023-06-27 14:30:54 +02:00
Stéphan Sainléger
97e3dd5c04 [IMP] partner_profiles: refactoring of position profile creation 2023-06-27 14:30:54 +02:00
Stéphan Sainléger
dd184128af [IMP] partner_profiles: prevent company type edit in several cases
Prevents the modification of the company type of res.partner:
- if partner is a public or a position profile
- if the partner has position profiles attached

Also synchronize the company type between main and public profiles.
2023-06-27 14:30:54 +02:00
Stéphan Sainléger
7fbbb4f396 [I18N] partner_profiles_portal: update french translations 2023-06-27 14:30:54 +02:00
Stéphan Sainléger
e0849d3d81 [I18N] partner_profiles: update french translations 2023-06-26 15:01:00 +02:00
Stéphan Sainléger
d8077861ac [IMP] partner_profiles_portal: hide My structures button for company users 2023-06-26 15:01:00 +02:00
Stéphan Sainléger
69bcbc788e [IMP] partner_profiles_portal: add odoo user in partner form view 2023-06-26 15:01:00 +02:00
Stéphan Sainléger
ffec9795e6 [IMP] partner_profiles: remove useless fields in position form view 2023-06-26 15:01:00 +02:00
Stéphan Sainléger
56bec1eed7 [IMP] partner_profiles_portal: new portal structures data management
refactors the way a portal user can edit the data of the structures he
is affiliated with.
All main, public and position profiles data are gathered in one
"structure" form.
Adds several navigation improvement (back to structures list,
validation message, ...)
2023-06-26 15:01:00 +02:00
Stéphan Sainléger
69de81a9e0 [IMP] partner_profiles_portal: refactoring of user information
Merge the main and public information edition in /my/account portal
page.
2023-06-26 15:01:00 +02:00
Stéphan Sainléger
6f7629aba8 [IMP] partner_profiles: remove useless fields in public profile view
Hides from the partner public form view the fields and data not
considered as relevant for public profile. The public profile aims to
protect the contact data, but not to replace the other ones which are
considered as "administrative" data.
2023-06-26 15:01:00 +02:00
Stéphan Sainléger
eb21e1914e [IMP] partner_profiles: delete profiles when main partner deleted
When a main partner is unlinked, all the linked profiles (public
profile and position profiles) are deleted.
2023-06-26 15:01:00 +02:00
Stéphan Sainléger
ffff6e683c [IMP] partner_profiles: filter public profiles in name_search answer 2023-04-18 18:11:51 +02:00
Stéphan Sainléger
9d7d859cb1 [FIX] partner_profiles: add missing add-on dependency 2023-03-21 15:37:53 +01:00
66 changed files with 11 additions and 1362 deletions

View File

@@ -1 +0,0 @@
from . import models

View File

@@ -1,21 +0,0 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Partner Favorite',
'summary': "Add favorite star on Partner, and filter for favorite",
'version': '12.0.1.1.0',
'author': "Nicolas JEUDY, "
"Myceliandre, "
"Lokavaluto, "
"Odoo Community Association (OCA)",
'license': "AGPL-3",
'maintainer': 'Nicolas JEUDY',
'category': 'Extra Tools',
'website': 'https://odoo-community.org/',
'depends': ['base'],
'data': [
'views/res_partner.xml',
],
'auto_install': False,
'installable': True,
}

View File

@@ -1,45 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_favorite
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-10 20:53+0000\n"
"PO-Revision-Date: 2021-05-10 20:53+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_favorite
#: model:ir.model,name:partner_favorite.model_res_partner
msgid "Contact"
msgstr "Contact"
#. module: partner_favorite
#: model:ir.model.fields,help:partner_favorite.field_res_partner__is_favorite
#: model:ir.model.fields,help:partner_favorite.field_res_users__is_favorite
msgid "Display this partner with favorite filter"
msgstr "Afficher les partenaires favoris"
#. module: partner_favorite
#: model:ir.model.fields,field_description:partner_favorite.field_res_partner__favorite_user_ids
#: model:ir.model.fields,field_description:partner_favorite.field_res_users__favorite_user_ids
msgid "Members"
msgstr "Membres"
#. module: partner_favorite
#: model_terms:ir.ui.view,arch_db:partner_favorite.view_partner_search_favorite
msgid "My Favorites"
msgstr "Mes favoris"
#. module: partner_favorite
#: model:ir.model.fields,field_description:partner_favorite.field_res_partner__is_favorite
#: model:ir.model.fields,field_description:partner_favorite.field_res_users__is_favorite
msgid "Show Favorite Partner"
msgstr "Afficher les partenaire favoris"

View File

@@ -1 +0,0 @@
from . import res_partner

View File

@@ -1,39 +0,0 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import fields, models
_logger = logging.getLogger(__name__)
class ResPartner(models.Model):
"""Adds last name and first name; name becomes a stored function field."""
_inherit = 'res.partner'
def _compute_is_favorite(self):
for partner in self:
partner.is_favorite = self.env.user in partner.favorite_user_ids
def _inverse_is_favorite(self):
favorite_partners = not_fav_partners = self.env['res.partner']
for partner in self:
if self.env.user in partner.favorite_user_ids:
favorite_partners |= partner
else:
not_fav_partners |= partner
# partner User has no write access for partner.
not_fav_partners.write({'favorite_user_ids': [(4, self.env.uid)]})
favorite_partners.write({'favorite_user_ids': [(3, self.env.uid)]})
def _get_default_favorite_user_ids(self):
return [(6, 0, [self.env.uid])]
favorite_user_ids = fields.Many2many(
'res.users', 'partner_favorite_user_rel', 'partner_id', 'user_id',
default=_get_default_favorite_user_ids,
string='Members')
is_favorite = fields.Boolean(
compute='_compute_is_favorite',
inverse='_inverse_is_favorite',
string='Show Favorite Partner',
help="Display this partner with favorite filter")

View File

@@ -1 +0,0 @@
N/A

View File

@@ -1 +0,0 @@
* Nicolas JEUDY <https://github.com/njeudy>

View File

@@ -1,2 +0,0 @@
This module was written to extend the functionality of contacts to support
having favorite mechanism.

View File

@@ -1 +0,0 @@
* add filters

View File

@@ -1 +0,0 @@
After installing this module you can select a partner as favorite and filter on "My favorite".

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_form_favorite" model="ir.ui.view">
<field name="name">Add favorite star</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="arch" type="xml">
<data>
<field name="type" position="after">
<field name="is_favorite"/>
</field>
<xpath expr="//strong/field[@name='display_name']" position="before">
<span class="o_right"><field name="is_favorite" widget="boolean_favorite" nolabel="1" force_save="1" /></span>
</xpath>
</data>
</field>
</record>
<record id="view_partner_search_favorite" model="ir.ui.view">
<field name="name">Add favorite star</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<data>
<filter name="filter_my_partners" position="after">
<filter string="My Favorites" name="my_partners" domain="[('favorite_user_ids', 'in', uid)]"/>
</filter>
</data>
</field>
</record>
</odoo>

View File

@@ -1,2 +0,0 @@
*.*~
*pyc

View File

@@ -1,56 +0,0 @@
=============================
partner_geolocalize_usability
=============================
Brings several enhancements on geolocalize functionnalities
Installation
============
Use Odoo normal module installation procedure to install
``partner_geolocalize_usability``.
Description
===========
This module allows:
- to block or not the edition of partner_latitude and partner_longitude fields in partner form view.
- to massively trigger the geolocalize function
It also modify the partner form vieww for a better understanding of the geolocation data.
Configuration
=============
No configuration needed.
Known issues / Roadmap
======================
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://github.com/elabore-coop/partner-tools/issues>`_. In case of
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Stéphan Sainléger
Funders
-------
The development of this module has been financially supported by:
* Elabore (https://elabore.coop)
Maintainer
----------
This module is maintained by Elabore.

View File

@@ -1,5 +0,0 @@
# -*- coding: utf-8 -*-
from . import models
# from . import controllers
# from . import wizard

View File

@@ -1,35 +0,0 @@
# Copyright 2023 Stéphan Sainléger (Elabore)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "partner_geolocalize_usability",
"version": "12.0.1.0.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Stéphan Sainléger",
"license": "AGPL-3",
"category": "Tools",
"summary": "Brings several enhancements on geolocalize functionnalities",
# any module necessary for this one to work correctly
"depends": [
"base",
"base_geolocalize"
],
"qweb": [],
"external_dependencies": {
"python": [],
},
# always loaded
"data": [
"views/res_partner.xml",
],
# only loaded in demonstration mode
"demo": [],
"js": [],
"css": [],
"installable": True,
# Install this module automatically if all dependency have been previously
# and independently installed. Used for synergetic or glue modules.
"auto_install": False,
"application": False,
}

View File

@@ -1 +0,0 @@
This directory should contain the *.po for Odoo translation.

View File

@@ -1,39 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_geolocalize_usability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 13:48+0000\n"
"PO-Revision-Date: 2023-09-12 13:48+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_geolocalize_usability
#: model:ir.model,name:partner_geolocalize_usability.model_res_partner
msgid "Contact"
msgstr ""
#. module: partner_geolocalize_usability
#: model:ir.actions.server,name:partner_geolocalize_usability.geolocata_partner_action_server
#: model_terms:ir.ui.view,arch_db:partner_geolocalize_usability.partner_geolocalize_form_view
msgid "Geolocate"
msgstr "Géolocaliser"
#. module: partner_geolocalize_usability
#: model:ir.model.fields,field_description:partner_geolocalize_usability.field_res_partner__manual_geolocate
#: model:ir.model.fields,field_description:partner_geolocalize_usability.field_res_users__manual_geolocate
msgid "Geolocate yourself"
msgstr "Géolocaliser manuellement"
#. module: partner_geolocalize_usability
#: model_terms:ir.ui.view,arch_db:partner_geolocalize_usability.partner_geolocalize_form_view
msgid "Geolocation"
msgstr "Géolocalisation"

View File

@@ -1,39 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_geolocalize_usability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 13:50+0000\n"
"PO-Revision-Date: 2023-09-12 13:50+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_geolocalize_usability
#: model:ir.model,name:partner_geolocalize_usability.model_res_partner
msgid "Contact"
msgstr ""
#. module: partner_geolocalize_usability
#: model:ir.actions.server,name:partner_geolocalize_usability.geolocata_partner_action_server
#: model_terms:ir.ui.view,arch_db:partner_geolocalize_usability.partner_geolocalize_form_view
msgid "Geolocate"
msgstr ""
#. module: partner_geolocalize_usability
#: model:ir.model.fields,field_description:partner_geolocalize_usability.field_res_partner__manual_geolocate
#: model:ir.model.fields,field_description:partner_geolocalize_usability.field_res_users__manual_geolocate
msgid "Geolocate yourself"
msgstr ""
#. module: partner_geolocalize_usability
#: model_terms:ir.ui.view,arch_db:partner_geolocalize_usability.partner_geolocalize_form_view
msgid "Geolocation"
msgstr ""

View File

@@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-
from . import res_partner

View File

@@ -1,12 +0,0 @@
from odoo import models, fields, api
class ResPartner(models.Model):
_inherit = 'res.partner'
manual_geolocate = fields.Boolean('Geolocate yourself')
@api.multi
def geo_localize(self):
partners = self.filtered(lambda a: a.manual_geolocate == False)
return super(ResPartner, partners).geo_localize()

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="geolocata_partner_action_server" model="ir.actions.server">
<field name="name">Geolocate</field>
<field name="model_id" ref="model_res_partner" />
<field
name="binding_model_id" ref="model_res_partner" />
<field name="state">code</field>
<field name="code">records.geo_localize() </field>
</record>
<record model="ir.ui.view" id="partner_geolocalize_form_view">
<field name="name">partner.geolocalize.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name='priority'>99</field>
<field name="arch" type="xml">
<xpath expr="//page[@name='geo_location']" position="replace">
<page name="geolocalize" string="Geolocation">
<group colspan="2" col="2">
<separator string="Geolocation" colspan="2" />
<field name="manual_geolocate" />
<button
string="Geolocate"
name="geo_localize"
colspan="2"
icon="fa-check"
type="object" attrs="{'invisible':[('manual_geolocate', '=', True)]}" />
<field name="partner_latitude" attrs="{'readonly':[('manual_geolocate', '=', False)]}" />
<field name="partner_longitude" attrs="{'readonly':[('manual_geolocate', '=', False)]}" />
</group>
</page>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,2 +0,0 @@
*.*~
*pyc

View File

@@ -1,66 +0,0 @@
============================
partner_gogocarto_export_api
============================
Gogocarto Export module, to export the partner data needed for a Gogocarto map.
This module allow the users to decide:
* the partners to be exported
* the fields exported for each partner (*name*, *partner_longitude* and *partner_lattitude* automatically exported)
Installation
============
Use Odoo normal module installation procedure to install
``partner_gogocarto_export_api``, all dependencies will be installed by default.
Configuration
=============
To export partners data:
#. Set the fields you want to export in Settings / Gogocarto.
#. Check the field *"Export to Gogocarto"* in the partner form view.
And use the link *https://yourodoo.com/web/<company_id>/get_http_gogocarto_elements* in Gogocarto server import configuration (*https://video.colibris-outilslibres.org/videos/watch/c74fc469-c822-4ab8-82a7-a2555e49e576*)
Known issues / Roadmap
======================
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://github.com/elabore-coop/partner-tools/issues>`_. In case of
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Stéphan SAINLEGER <https://github.com/stephansainleger>
* Chloé Migayrou <https://github.com/MigayrouChloe>
* Nicolas Jeudy <https://github.com/njeudy>
* Lokavaluto Teams <https://lokavaluto.fr>
Funders
-------
The development of this module has been financially supported by:
* Lokavaluto (https://lokavaluto.fr)
* Mycéliandre (https://myceliandre.fr)
* Elabore (https://elabore.coop)
Maintainer
----------
This module is maintained by Elabore and Lokavaluto.

View File

@@ -1,2 +0,0 @@
from . import controllers
from . import models

View File

@@ -1,27 +0,0 @@
{
'name': 'partner_gogocarto_export_api',
'summary': '''HTTP JSON api to send partner data for Gogocarto import''',
'license': 'AGPL-3',
'author': (
'Lokavaluto',
'Elabore'
),
'website': 'https://lokavaluto.fr',
'category': 'Localization',
'version': '12.0.2.0.0',
'depends': [
'base',
'contacts',
'base_geolocalize',
'partner_geolocalize_usability',
'base_jsonify',
],
'data': [
'views/gogocarto_partner.xml',
'views/gogocarto_config_settings_view.xml',
'views/res_company_view.xml',
],
'demo': [],
'installable': True,
'auto_install': False,
}

View File

@@ -1 +0,0 @@
from . import main

View File

@@ -1,29 +0,0 @@
import json
import logging
from odoo import http
from odoo.http import Response, request
_logger = logging.getLogger(__name__)
class PartnerGogocartojs(http.Controller):
@http.route(
'/web/<company_id>/get_http_gogocarto_elements',
methods=['GET'],
type='http',
csrf=False,
auth="public",
website=True)
def get_gogocarto_elements_http(self, company_id):
data = self._jsonify_get_partner(company_id)
return Response(json.dumps(data))
def _jsonify_get_partner(self, company_id):
PartnerSudo = request.env['res.partner'].sudo()
parser = PartnerSudo._get_gogocarto_parser(company_id)
partners = PartnerSudo.with_context(force_company=company_id).search(
PartnerSudo._get_gogocarto_domain(company_id)
)
return partners.jsonify(parser)

View File

@@ -1,73 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_gogocarto_export_api
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 14:05+0000\n"
"PO-Revision-Date: 2023-09-12 14:05+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Check the export on /web/{COMPANY_ID}/get_http_gogocarto_elements."
msgstr "Vérifiez l'export sur /web/{COMPANY_ID}/get_http_gogocarto_elements.\""
#. module: partner_gogocarto_export_api
#: model:ir.model,name:partner_gogocarto_export_api.model_res_company
msgid "Companies"
msgstr "Sociétés"
#. module: partner_gogocarto_export_api
#: model:ir.model,name:partner_gogocarto_export_api.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de config"
#. module: partner_gogocarto_export_api
#: model:ir.model,name:partner_gogocarto_export_api.model_res_partner
msgid "Contact"
msgstr ""
#. module: partner_gogocarto_export_api
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_company__export_gogocarto_fields
msgid "Export Gogocarto Fields"
msgstr "Champs exportés dans Gogocarto"
#. module: partner_gogocarto_export_api
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_partner__in_gogocarto
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_users__in_gogocarto
msgid "Export to Gogocarto"
msgstr "Exporter dans Gogocarto"
#. module: partner_gogocarto_export_api
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_config_settings__export_gogocarto_fields
msgid "GogoCarto Exported fields"
msgstr "Champs exportés dans Gogocarto"
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_company_gogocarto_form_view
msgid "GogoCarto Setup"
msgstr "Gogocarto"
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Gogocarto"
msgstr ""
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Gogocarto export configuration"
msgstr "Configuration de l'export Gogocarto"
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Partner fields to export for Gogocarto map."
msgstr "Champs de contact à exporter vers Gogocarto."

View File

@@ -1,73 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_gogocarto_export_api
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 14:00+0000\n"
"PO-Revision-Date: 2023-09-12 14:00+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Check the export on /web/{COMPANY_ID}/get_http_gogocarto_elements."
msgstr ""
#. module: partner_gogocarto_export_api
#: model:ir.model,name:partner_gogocarto_export_api.model_res_company
msgid "Companies"
msgstr ""
#. module: partner_gogocarto_export_api
#: model:ir.model,name:partner_gogocarto_export_api.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: partner_gogocarto_export_api
#: model:ir.model,name:partner_gogocarto_export_api.model_res_partner
msgid "Contact"
msgstr ""
#. module: partner_gogocarto_export_api
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_company__export_gogocarto_fields
msgid "Export Gogocarto Fields"
msgstr ""
#. module: partner_gogocarto_export_api
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_partner__in_gogocarto
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_users__in_gogocarto
msgid "Export to Gogocarto"
msgstr ""
#. module: partner_gogocarto_export_api
#: model:ir.model.fields,field_description:partner_gogocarto_export_api.field_res_config_settings__export_gogocarto_fields
msgid "GogoCarto Exported fields"
msgstr ""
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_company_gogocarto_form_view
msgid "GogoCarto Setup"
msgstr ""
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Gogocarto"
msgstr ""
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Gogocarto export configuration"
msgstr ""
#. module: partner_gogocarto_export_api
#: model_terms:ir.ui.view,arch_db:partner_gogocarto_export_api.res_config_settings_view_form_gogocarto
msgid "Partner fields to export for Gogocarto map."
msgstr ""

View File

@@ -1,3 +0,0 @@
from . import res_partner
from . import res_config_settings
from . import company

View File

@@ -1,13 +0,0 @@
from odoo import models, fields
class Company(models.Model):
_inherit = "res.company"
export_gogocarto_fields = fields.Many2many(
'ir.model.fields',
domain=[
('model_id', '=', 'res.partner'),
('name', 'not in', ['id', 'name', 'partner_longitude', 'partner_latitude'])
]
)

View File

@@ -1,23 +0,0 @@
import logging
from odoo import fields, models
_logger = logging.getLogger(__name__)
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
export_gogocarto_fields = fields.Many2many(
related='company_id.export_gogocarto_fields',
relation='ir.model.fields',
string='GogoCarto Exported fields',
readonly=False,
domain=[
('model_id', '=', 'res.partner'),
('name', 'not in', ['name',
'partner_longitude',
'partner_latitude',
'id'])
]
)

View File

@@ -1,49 +0,0 @@
from odoo import models, fields
class ResPartner(models.Model):
""" Inherits partner, adds Gogocarto fields in the partner form, and functions"""
_inherit = 'res.partner'
in_gogocarto = fields.Boolean('Export to Gogocarto')
def _get_gogocarto_domain(self, company_id):
# To OVERRIDE in sub_modules to customize the partner selection
return [('in_gogocarto', '=', True)]
def _get_generic_parser(self, fields):
parser = []
for field in fields:
if field.ttype in [
"boolean",
"char",
"integer",
"monetary",
"text",
"selection",
"float",
"date_time",
"date",
"html"]:
parser.append(field.name)
elif field.ttype in ["many2one", "one2many", "many2many"]:
parser.append((field.name, ['id', 'name']))
elif field.ttype == "binary":
continue
else:
continue
return parser
def _get_gogocarto_parser(self, company_id):
fields = self._get_export_fields(company_id)
parser = self._get_generic_parser(fields)
return parser
def _get_export_fields(self, company_id):
CompanySudo = self.env['res.company'].sudo().search([('id', '=', company_id)])
default_fields = self.env['ir.model.fields'].sudo().search([
('model_id', '=', 'res.partner'),
('name', 'in', ['id', 'name', 'partner_longitude', 'partner_latitude'])])
company_fields = CompanySudo.export_gogocarto_fields
export_fields = default_fields | company_fields
return export_fields

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form_gogocarto" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.gogocarto</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="99" />
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div class="app_settings_block" data-string="Gogocarto" string="Gogocarto"
data-key="partner_gogocarto_export_api">
<h2>Gogocarto export configuration</h2>
<div class="text-muted mt16 o_settings_container">
Check the export on /web/{COMPANY_ID}/get_http_gogocarto_elements.
</div>
<div class="row mt16 o_settings_container" id="gogocarto_selection_settings">
<div class="col-12 col-lg-6 o_setting_box" id="gogocarto_fields">
<div class="o_setting_right_pane">
<div class="text-muted">
Partner fields to export for Gogocarto map.
</div>
<div class="content-group">
<div class="mt16">
<field name="export_gogocarto_fields"
widget="many2many_tags"
options="{'no_create': True, 'no_open': True}" />
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record model="ir.ui.view" id="partner_gogocarto_form_view">
<field name="name">partner.gogocarto.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_geolocalize_usability.partner_geolocalize_form_view" />
<field name='priority'>99</field>
<field name="arch" type="xml">
<xpath expr="//page[@name='geolocalize']/group" position="inside">
<field name="in_gogocarto" />
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record model="ir.ui.view" id="res_company_gogocarto_form_view">
<field name="name">res_company.gogocarto.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name='priority'>99</field>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="GogoCarto Setup" name="gogocarto">
<group>
<field name="export_gogocarto_fields"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>

View File

@@ -3,7 +3,7 @@
{
"name": "partner_profiles",
"version": "12.0.2.5.1",
"version": "12.0.2.4.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Stéphan Sainléger",

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 15:03+0000\n"
"PO-Revision-Date: 2023-09-12 15:03+0000\n"
"POT-Creation-Date: 2023-06-13 15:25+0000\n"
"PO-Revision-Date: 2023-06-13 15:25+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -73,7 +73,7 @@ msgstr "<span>Vous trouverez ici <strong>tou(te)s</strong> les adresses/contacts
msgid "<span>You are about to create a <strong>Position Profile</strong> which\n"
" represents the role or the job of a person in a structure.</span>"
msgstr "<span>Vous allez créer une <strong>fiche Fonction</strong> qui\n"
" représente le rôle que tient une personne au sein d'une structure.</span>\""
" représente le rôle que tient une personne au sein d'une structure.</span>""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
@@ -337,12 +337,12 @@ msgstr "État"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Street 2..."
msgstr "Rue 2..."
msgstr "Rue 2 ..."
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Street..."
msgstr "Rue..."
msgstr "Rue.."
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_create_position_profile__structure_id
@@ -355,16 +355,6 @@ msgstr ""
msgid "Structure's positions"
msgstr "Fonctions occupées dans la structures"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Sync data"
msgstr "Synchroniser"
#. module: partner_profiles
#: model:ir.actions.server,name:partner_profiles.sync_public_data_action_server
msgid "Synchronize main and public data"
msgstr "Synchroniser les données publiques"
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_res_partner__to_migrate
#: model:ir.model.fields,field_description:partner_profiles.field_res_users__to_migrate

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 15:02+0000\n"
"PO-Revision-Date: 2023-09-12 15:02+0000\n"
"POT-Creation-Date: 2023-06-13 15:24+0000\n"
"PO-Revision-Date: 2023-06-13 15:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -340,16 +340,6 @@ msgstr ""
msgid "Structure's positions"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Sync data"
msgstr ""
#. module: partner_profiles
#: model:ir.actions.server,name:partner_profiles.sync_public_data_action_server
msgid "Synchronize main and public data"
msgstr ""
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_res_partner__to_migrate
#: model:ir.model.fields,field_description:partner_profiles.field_res_users__to_migrate

View File

@@ -140,7 +140,7 @@ class res_partner(models.Model):
for partner in self:
if partner.is_company:
# Delete position profiles linked to the company main profile
for position in partner.structure_position_ids:
for position in self.structure_position_ids:
position.unlink()
return super(res_partner, self).unlink()
@@ -255,22 +255,6 @@ class res_partner(models.Model):
args.append(("is_public_profile", "=", False))
return super(res_partner, self).name_search(name, args, operator, limit)
@api.multi
def sync_admin_and_public_data(self):
for partner in self:
if partner.is_main_profile and partner.public_profile_id:
main_partner = partner
public_partner = partner.public_profile_id
elif partner.is_public_profile and partner.contact_id:
main_partner = partner.contact_id
public_partner = partner
public_fields = partner._get_public_profile_fields()
values = {}
for field_name in public_fields:
values[field_name] = main_partner._get_field_value(field_name)
public_partner.write(values)
##################################################################################
## Planned actions
##################################################################################

View File

@@ -42,10 +42,6 @@
<button type="object" name="create_public_profile"
string="Create Public Profile"
attrs="{'invisible': [('public_profile_id','!=',False)]}" />
<button string="Sync data"
name="sync_admin_and_public_data" type="object"
icon="fa-refresh"
attrs="{'invisible': [('public_profile_id','=',False)]}" />
</div>
</group>
</group>
@@ -177,7 +173,7 @@
<!-- PUBLIC PROFILE DISPLAY -->
<!-- ###################### -->
<xpath expr="//field[@name='type']/../.." position="after">
<group id="public_data" attrs="{'invisible': [('is_public_profile','=',False)]}">
<group attrs="{'invisible': [('is_public_profile','=',False)]}">
<group>
<label for="street" string="Address" />
<div class="o_address_format">
@@ -200,7 +196,6 @@
options='{"no_open": True, "no_create": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
</div>
</group>
<group>
<field name="phone" widget="phone" />
@@ -215,8 +210,7 @@
<!-- POSITION PROFILE DISPLAY -->
<!-- ######################## -->
<xpath expr="//field[@name='type']/../.." position="after">
<group id="position_data"
attrs="{'invisible': [('is_position_profile','=',False)]}">
<group attrs="{'invisible': [('is_position_profile','=',False)]}">
<group>
<field name="function" />
</group>
@@ -263,13 +257,5 @@
</xpath>
</field>
</record>
<record id="sync_public_data_action_server" model="ir.actions.server">
<field name="name">Synchronize main and public data</field>
<field name="model_id" ref="model_res_partner" />
<field name="groups_id" eval="[(4,ref('base.group_no_one'))]" />
<field name="state">code</field>
<field name="code">records.sync_admin_and_public_data() </field>
</record>
</data>
</odoo>

View File

@@ -1,2 +0,0 @@
*.*~
*pyc

View File

@@ -1,53 +0,0 @@
======================================
partner_profiles_geolocalize_usability
======================================
Adapt geolocalize usability to partner profiles logic
Installation
============
Use Odoo normal module installation procedure to install
``partner_profiles_geolocalize_usability``.
Description
===========
This module adds the geolocation data in the form view of public profiles.
Configuration
=============
No configuration needed.
Known issues / Roadmap
======================
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://github.com/elabore-coop/partner-tools/issues>`_. In case of
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Stéphan Sainléger
Funders
-------
The development of this module has been financially supported by:
* Elabore (https://elabore.coop)
Maintainer
----------
This module is maintained by Elabore.

View File

@@ -1,5 +0,0 @@
# -*- coding: utf-8 -*-
from . import models
# from . import controllers
# from . import wizard

View File

@@ -1,38 +0,0 @@
# Copyright 2023 Stéphan Sainléger (Elabore)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "partner_profiles_geolocalize_usability",
"version": "12.0.1.1.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Stéphan Sainléger",
"license": "AGPL-3",
"category": "Tools",
"summary": "Adapt geolocalize usability to partner profiles logic",
# any module necessary for this one to work correctly
"depends": [
"base",
"partner_geolocalize_usability",
"partner_profiles",
],
"qweb": [
# "static/src/xml/*.xml",
],
"external_dependencies": {
"python": [],
},
# always loaded
"data": [
"views/res_partner.xml",
],
# only loaded in demonstration mode
"demo": [],
"js": [],
"css": [],
"installable": True,
# Install this module automatically if all dependency have been previously
# and independently installed. Used for synergetic or glue modules.
"auto_install": False,
"application": False,
}

View File

@@ -1 +0,0 @@
This directory should contain the *.po for Odoo translation.

View File

@@ -1,22 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_profiles_geolocalize_usability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 13:52+0000\n"
"PO-Revision-Date: 2023-09-12 13:52+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_profiles_geolocalize_usability
#: model_terms:ir.ui.view,arch_db:partner_profiles_geolocalize_usability.partner_geolocalize_form_view_public
msgid "Geolocate"
msgstr "Géolocaliser"

View File

@@ -1,22 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_profiles_geolocalize_usability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 13:51+0000\n"
"PO-Revision-Date: 2023-09-12 13:51+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_profiles_geolocalize_usability
#: model_terms:ir.ui.view,arch_db:partner_profiles_geolocalize_usability.partner_geolocalize_form_view_public
msgid "Geolocate"
msgstr ""

View File

@@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-
from . import res_partner

View File

@@ -1,23 +0,0 @@
from odoo import models, api
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.multi
def sync_admin_and_public_data(self):
super(ResPartner, self).sync_admin_and_public_data()
for partner in self:
if partner.is_main_profile and partner.public_profile_id:
main_partner = partner
public_partner = partner.public_profile_id
elif partner.is_public_profile and partner.contact_id:
main_partner = partner.contact_id
public_partner = partner
values = {
"manual_geolocate": main_partner.manual_geolocate,
"partner_latitude": main_partner.partner_latitude,
"partner_longitude": main_partner.partner_longitude,
}
public_partner.write(values)

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record model="ir.ui.view" id="partner_geolocalize_form_view_public">
<field name="name">partner.gogocarto.form.public</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_profiles.partner_profiles_form_view" />
<field name='priority'>99</field>
<field name="arch" type="xml">
<xpath expr="//group[@id='public_data']" position="inside">
<group>
<field name="manual_geolocate" />
<button
string="Geolocate"
name="geo_localize"
colspan="2"
icon="fa-check"
type="object" attrs="{'invisible':[('manual_geolocate', '=', True)]}" />
<field name="partner_latitude" attrs="{'readonly':[('manual_geolocate', '=', False)]}" />
<field name="partner_longitude" attrs="{'readonly':[('manual_geolocate', '=', False)]}" />
</group>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,2 +0,0 @@
*.*~
*pyc

View File

@@ -1,56 +0,0 @@
================================
partner_profiles_gogocarto_export
================================
Adapt data export for gogocarto to partner profiles logic
Installation
============
Use Odoo normal module installation procedure to install
``partner_profiles_gogocarto_export``.
Configuration
=============
To export public partners data:
#. Set the fields you want to export in Settings / Gogocarto, in the dedicated parameter for public profiles.
#. Check the field *"Export to Gogocarto"* in the partner form view of the main profile.
And use the link *https://yourodoo.com/web/<company_id>/get_http_gogocarto_elements* in Gogocarto server import configuration (*https://video.colibris-outilslibres.org/videos/watch/c74fc469-c822-4ab8-82a7-a2555e49e576*)
Known issues / Roadmap
======================
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://github.com/elabore-coop/partner-tools/issues>`_. In case of
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Stéphan Sainléger
Funders
-------
The development of this module has been financially supported by:
* Elabore (https://elabore.coop)
* Lokavaluto (https://lokavaluto.fr)
Maintainer
----------
This module is maintained by Elabore and Lokavaluto.

View File

@@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -1,40 +0,0 @@
# Copyright 2023 Stéphan Sainléger (Elabore)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "partner_profiles_gogocarto_export",
"version": "12.0.1.0.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Stéphan Sainléger",
"license": "AGPL-3",
"category": "Tools",
"summary": "Adapt data export for gogocarto to partner profiles logic",
# any module necessary for this one to work correctly
"depends": [
"base",
"partner_gogocarto_export_api",
"partner_profiles",
"partner_profiles_geolocalize_usability",
],
"qweb": [
# "static/src/xml/*.xml",
],
"external_dependencies": {
"python": [],
},
# always loaded
"data": [
"views/config_settings_view.xml",
"views/res_company_view.xml",
],
# only loaded in demonstration mode
"demo": [],
"js": [],
"css": [],
"installable": True,
# Install this module automatically if all dependency have been previously
# and independently installed. Used for synergetic or glue modules.
"auto_install": False,
"application": False,
}

View File

@@ -1 +0,0 @@
This directory should contain the *.po for Odoo translation.

View File

@@ -1,46 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_profiles_gogocarto_export
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 14:02+0000\n"
"PO-Revision-Date: 2023-09-12 14:02+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_profiles_gogocarto_export
#: model:ir.model,name:partner_profiles_gogocarto_export.model_res_company
msgid "Companies"
msgstr "Sociétés"
#. module: partner_profiles_gogocarto_export
#: model:ir.model,name:partner_profiles_gogocarto_export.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de config"
#. module: partner_profiles_gogocarto_export
#: model:ir.model,name:partner_profiles_gogocarto_export.model_res_partner
msgid "Contact"
msgstr "Contact"
#. module: partner_profiles_gogocarto_export
#: model:ir.model.fields,field_description:partner_profiles_gogocarto_export.field_res_company__export_gogocarto_public_fields
msgid "Export Gogocarto Public Fields"
msgstr "Export Gogocarto des champs publics"
#. module: partner_profiles_gogocarto_export
#: model:ir.model.fields,field_description:partner_profiles_gogocarto_export.field_res_config_settings__export_gogocarto_public_fields
msgid "GogoCarto Exported Public fields"
msgstr "Champs publics exportés dans Gogocarto"
#. module: partner_profiles_gogocarto_export
#: model_terms:ir.ui.view,arch_db:partner_profiles_gogocarto_export.res_config_settings_view_form_gogocarto_public
msgid "Partner public fields to export for Gogocarto map."
msgstr "Champs publics à exporter dans Gogocarto"

View File

@@ -1,47 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_profiles_gogocarto_export
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-12 14:08+0000\n"
"PO-Revision-Date: 2023-09-12 14:08+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_profiles_gogocarto_export
#: model:ir.model,name:partner_profiles_gogocarto_export.model_res_company
msgid "Companies"
msgstr ""
#. module: partner_profiles_gogocarto_export
#: model:ir.model,name:partner_profiles_gogocarto_export.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: partner_profiles_gogocarto_export
#: model:ir.model,name:partner_profiles_gogocarto_export.model_res_partner
msgid "Contact"
msgstr ""
#. module: partner_profiles_gogocarto_export
#: model:ir.model.fields,field_description:partner_profiles_gogocarto_export.field_res_company__export_gogocarto_public_fields
msgid "Export Gogocarto Public Fields"
msgstr ""
#. module: partner_profiles_gogocarto_export
#: model:ir.model.fields,field_description:partner_profiles_gogocarto_export.field_res_config_settings__export_gogocarto_public_fields
msgid "GogoCarto Exported Public fields"
msgstr ""
#. module: partner_profiles_gogocarto_export
#: model_terms:ir.ui.view,arch_db:partner_profiles_gogocarto_export.res_config_settings_view_form_gogocarto_public
msgid "Partner public fields to export for Gogocarto map."
msgstr ""

View File

@@ -1,3 +0,0 @@
from . import res_config_settings
from . import company
from . import res_partner

View File

@@ -1,14 +0,0 @@
from odoo import models, fields
class Company(models.Model):
_inherit = "res.company"
export_gogocarto_public_fields = fields.Many2many(
'ir.model.fields',
relation='ir_model_fields_gogocarto_public',
domain=[
('model_id', '=', 'res.partner'),
('name', 'not in', ['id', 'name', 'partner_longitude', 'partner_latitude'])
]
)

View File

@@ -1,23 +0,0 @@
import logging
from odoo import fields, models
_logger = logging.getLogger(__name__)
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
export_gogocarto_public_fields = fields.Many2many(
related='company_id.export_gogocarto_public_fields',
relation='ir.model.fields',
string='GogoCarto Exported Public fields',
readonly=False,
domain=[
('model_id', '=', 'res.partner'),
('name', 'not in', ['name',
'partner_longitude',
'partner_latitude',
'id'])
]
)

View File

@@ -1,29 +0,0 @@
from odoo import models
import logging
class ResPartner(models.Model):
""" Inherits partner, adds Gogocarto public fields in the partner form, and functions"""
_inherit = 'res.partner'
def _get_gogocarto_domain(self, company_id):
# To OVERRIDE in sub_modules to customize the partner selection
res = super(ResPartner, self)._get_gogocarto_domain(company_id)
res.extend([('is_main_profile', '=', True)])
return res
def _get_gogocarto_parser(self, company_id):
parser = super(ResPartner, self)._get_gogocarto_parser(company_id)
public_fields = self._get_export_public_fields(company_id)
public_parser = self._get_generic_parser(public_fields)
parser.append(("public_profile_id", public_parser))
return parser
def _get_export_public_fields(self, company_id):
CompanySudo = self.env['res.company'].sudo().search([('id', '=', company_id)])
default_fields = self.env['ir.model.fields'].sudo().search([
('model_id', '=', 'res.partner'),
('name', 'in', ['id', 'name', 'partner_longitude', 'partner_latitude'])])
company_fields = CompanySudo.export_gogocarto_public_fields
export_fields = default_fields | company_fields
return export_fields

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form_gogocarto_public" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.gogocarto.public</field>
<field name="model">res.config.settings</field>
<field name="inherit_id"
ref="partner_gogocarto_export_api.res_config_settings_view_form_gogocarto" />
<field name="arch" type="xml">
<xpath expr="//div[@id='gogocarto_selection_settings']" position="inside">
<div class="col-12 col-lg-6 o_setting_box" id="gogocarto_public_fields">
<div class="o_setting_right_pane">
<div class="text-muted">
Partner public fields to export for Gogocarto map.
</div>
<div class="content-group">
<div class="mt16">
<field name="export_gogocarto_public_fields" widget="many2many_tags"
options="{'no_create': True, 'no_open': True}" />
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record model="ir.ui.view" id="res_company_gogocarto_public_form_view">
<field name="name">res_company.gogocarto.public.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="partner_gogocarto_export_api.res_company_gogocarto_form_view" />
<field name='priority'>99</field>
<field name="arch" type="xml">
<xpath expr="//page[@name='gogocarto']" position="inside">
<group>
<field name="export_gogocarto_public_fields" />
</group>
</xpath>
</field>
</record>
</odoo>