Compare commits

..

8 Commits
10.0 ... 8.0

77 changed files with 99 additions and 4307 deletions

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import wizard

View File

@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2020 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{
'name': 'Account Bank Statement Import Crédit Coopératif',
'summary': 'Account Bank Statement Import Crédit Coopératif',
'description': """ Account Bank Statement Import Crédit Coopératif :
* For CSV published by Crédit Coopératif on their website customer space ;
* Adds option on bank import statement wizard ;
* Checks and processes file.""",
'version': '10.0.0.1.4',
'category': 'Banking addons',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['account_bank_statement_import'],
'data': ['wizard/account_bank_statement_import_views.xml']
}

View File

@ -1,27 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_bank_statement_import_ccoop
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-12 15:22+0000\n"
"PO-Revision-Date: 2018-09-12 15:22+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: account_bank_statement_import_ccoop
#: model:ir.ui.view,arch_db:account_bank_statement_import_ccoop.account_bank_statement_import_view_inherit_ccoop
msgid "Crédit Coop (.CSV)"
msgstr ""
#. module: account_bank_statement_import_ccoop
#: model:ir.model,name:account_bank_statement_import_ccoop.model_account_bank_statement_import
msgid "Import Bank Statement"
msgstr ""

View File

@ -1,27 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_bank_statement_import_ccoop
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-12 15:23+0000\n"
"PO-Revision-Date: 2018-09-12 15:23+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: account_bank_statement_import_ccoop
#: model:ir.ui.view,arch_db:account_bank_statement_import_ccoop.account_bank_statement_import_view_inherit_ccoop
msgid "Crédit Coop (.CSV)"
msgstr "Crédit Coop (.CSV)"
#. module: account_bank_statement_import_ccoop
#: model:ir.model,name:account_bank_statement_import_ccoop.model_account_bank_statement_import
msgid "Import Bank Statement"
msgstr "Import d'un relevé bancaire"

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import account_bank_statement_import

View File

@ -1,102 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018-2020 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Bank statement import : CSV from Credit Coop """
import time
from mimetypes import guess_type
import csv
from odoo import models, api, _
from odoo.exceptions import ValidationError
def str2float(string):
""" Transform CSV string to Python float """
return float(string.replace(',', '.'))
class AccountBankStatementImport(models.TransientModel):
""" Bank statement import : CSV from Credit Coop """
_inherit = 'account.bank.statement.import'
@api.model
def _load_ccop_csv(self, data_file):
""" Parses and load CSV from CCoop """
csv_data = csv.reader(data_file.split('\n'), delimiter=';')
return [[cell.decode('iso-8859-15').encode('utf8') for cell in line]
for line in csv_data]
@api.model
def _check_load_ccoop(self, data_file):
""" Check filetype and CCoop before loading data """
file_type = guess_type(self.filename)[0]
if file_type != 'text/csv':
return False
data = self._load_ccop_csv(data_file)
if not data[0][0].startswith('Code de la banque : '):
return False
return data
@api.model
def _get_coop_transaction(self, account_number, line):
""" Prepare transaction line """
# CCoop format change : old was YY, now YYYY
if len(line[0]) <= 8:
parsed_date = time.strptime(line[0], '%d/%m/%y')
else:
parsed_date = time.strptime(line[0], '%d/%m/%Y')
return {'name': line[2] or u'/',
'date': time.strftime('%Y-%m-%d', parsed_date),
'amount': str2float(line[3] or line[4]),
'unique_import_id': line[1],
'note': line[5],
'ref': line[1]}
@api.model
def _get_ccop_processed(self, data):
""" Prepare and return CCoop transaction """
currency = data[1][2].split(' : ')[1]
account_number = data[1][0].split(' : ')[1]
if not len(data[-1]): # If last line is empty, remove it
data.pop()
# Change in CSV produced from CCoop, now empty last cell
balance_start = data[-1][-1]
balance_end_real = data[3][-1]
if balance_start == '':
balance_start = data[-1][-2]
if balance_end_real == '':
balance_end_real = data[3][-2]
bank_statement_data = {
'date': time.strftime(
'%Y-%m-%d', time.strptime(data[0][3].split(' : ')[1], '%d/%m/%Y')),
'balance_start': str2float(balance_start),
'balance_end_real': str2float(balance_end_real)
}
bank_statement_data['name'] = '%s - %s' % (account_number,
bank_statement_data['date'])
bank_statement_data['transactions'] = [
self._get_coop_transaction(account_number, l) for l in data[5:-1]
]
return currency, account_number, bank_statement_data
def _parse_file(self, data_file):
""" Implements parse_file from parent, returning the required triplet """
data = self._check_load_ccoop(data_file)
if not data:
return super(AccountBankStatementImport, self)._parse_file(data_file)
currency, account_number, bank_statement_data = self._get_ccop_processed(data)
return currency, account_number, [bank_statement_data]

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Forms -->
<record id="account_bank_statement_import_view_inherit_ccoop" model="ir.ui.view">
<field name="name">Account Bank Statement Import Form adaptations</field>
<field name="model">account.bank.statement.import</field>
<field name="inherit_id"
ref="account_bank_statement_import.account_bank_statement_import_view" />
<field name="arch" type="xml">
<xpath expr="//ul[@id='statement_format']" position="inside">
<li>Crédit Coop (.CSV)</li>
</xpath>
</field>
</record>
</data>
</odoo>

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import models, wizard

View File

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{
'name': 'Grants follow-ups',
'summary': 'Grants follow-ups ',
'description': 'Grants follow-ups ',
'version': '10.0.1.0.0',
'category': 'Membership',
'author': 'Fabien Bourgeois, Youssef ELOUAHBY',
'license': 'AGPL-3',
'application': True,
'installable': True,
'depends': ['mail', 'document'],
'data': ['security/security.xml',
'security/ir.model.access.csv',
'views/grant_menu.xml',
'views/grant_file_views.xml',
'wizard/grant_file_edit_views.xml']
}

View File

@ -1,571 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * grant_followup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-26 12:47+0000\n"
"PO-Revision-Date: 2018-09-26 16:52+0200\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: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "<span style=\"color: grey;\">Reply deadline :</span>"
msgstr "<span style=\"color: grey;\">Date de réponse :</span>"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "<span style=\"font-style: italic;\">document(s) attached</span>"
msgstr "<span style=\"font-style: italic;\">pièce(s) jointe(s)</span>"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "All partners"
msgstr "Tous les partneraires"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Amount details"
msgstr "Détails des sommes"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_ids
msgid "Amount lines"
msgstr "Lignes des sommes"
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file_amount.py:29
#: sql_constraint:grant.file.amount.line:0
#, python-format
msgid "An amount line had already been named like that for this grant file"
msgstr "Ce nom a déjà été donné à l'une des lignes concernant le budget de ce dossier de subvention"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Are you sure you want to mark assessment as not sent ?"
msgstr "Êtes-vous sûr de vouloir marquer le bilan comme non envoyé ?"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Are you sure you want to mark assessment as sent ?"
msgstr "Êtes-vous sûr de vouloir marquer le bilan comme envoyé ?"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Are you sure you want to mark this file as refused ?"
msgstr "Êtes-vous sûr de vouloir marquer ce dossier comme refusé ?"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment Sent"
msgstr "Bilan Envoyé"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_assessment_deadline
msgid "Assessment deadline"
msgstr "Date d'envoi du bilan"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment deadline (month)"
msgstr "Date d'envoi du bilan (mois)"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment deadline (week)"
msgstr "Date d'envoi du bilan (semaine)"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment not sent"
msgstr "Bilan pas encore envoyé"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment sent"
msgstr "Bilan envoyé"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_attachment_ids
msgid "Attachments"
msgstr "Pièces jointes"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_edit_wizard_form
msgid "Cancel"
msgstr "Annuler"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_color
msgid "Color Index"
msgstr "Couleur"
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Common"
msgstr "Commune"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_edit_wizard_form
msgid "Confirm"
msgstr "Confirmer"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_create_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_create_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_create_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_create_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_create_date
msgid "Created on"
msgstr "Créé le"
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Critical"
msgstr "Critique"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_currency_id
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_currency_id
msgid "Currency"
msgstr "Devise"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Delete"
msgstr "Supprimer"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_description
msgid "Description"
msgstr "Description"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_display_name
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_display_name
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_display_partner_ids
msgid "Display partner ids"
msgstr "Display partner ids"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_doc_count
msgid "Doc count"
msgstr "Nombre de pièces jointes"
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Draft"
msgstr "Brouillon"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Edit"
msgstr "Modifier"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Edit file"
msgstr "Modifier le dossier"
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Edited"
msgstr "Modifié"
#. module: grant_followup
#: code:addons/grant_followup/wizard/grant_file_edit.py:37
#, python-format
msgid "File update reason : {}"
msgstr "Motif de mise à jour du dossier : {}"
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Finished"
msgstr "Terminé"
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "First Paiement Received"
msgstr "Premiers paiements reçus"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Go back to draft"
msgstr "Remettre en brouillon"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Grant"
msgstr "Subvention"
#. module: grant_followup
#: model:res.groups,name:grant_followup.group_grant_manager
msgid "Grant Manager"
msgstr "Responsable subventions"
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Grant Notification"
msgstr "Notification de subvention"
#. module: grant_followup
#: model:res.groups,name:grant_followup.group_grant_user
msgid "Grant User"
msgstr "Utilisateur subventions"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_id
msgid "Grant file"
msgstr "Dossier de subvention"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_grant_file_id
msgid "Grant file id"
msgstr "Dossier de subvention"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Grant notified"
msgstr "Subvention notifiée"
#. module: grant_followup
#: model:ir.actions.act_window,name:grant_followup.grant_action
#: model:ir.ui.menu,name:grant_followup.grant_menu
msgid "Grants"
msgstr "Subventions"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_assessment_sent
msgid "Has assessment been sent ?"
msgstr "Bilan envoyé ?"
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "High"
msgstr "Haute"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_id
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_id
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_id
msgid "ID"
msgstr "ID"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file___last_update
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line___last_update
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard___last_update
msgid "Last Modified on"
msgstr "Dernière Modification le"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_write_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_write_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_write_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_write_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_partner_id
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Main partner"
msgstr "Partenaire principal"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark Assessment as Not Sent"
msgstr "Marquer le bilan comme non envoyé"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark Assessment as Sent"
msgstr "Marquer le bilan comme envoyé"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark as refused"
msgstr "Marquer comme refusé"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark as sent"
msgstr "Marquer comme envoyé"
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Medium"
msgstr "Moyenne"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_name
msgid "Name"
msgstr "Nom"
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Not evaluated"
msgstr "Non évaluée"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_note
msgid "Note"
msgstr "Note"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Notes"
msgstr "Notes"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Notified :"
msgstr "Notifié :"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_notified_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_notified_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_notified_amount
msgid "Notified amount"
msgstr "Somme notifiée"
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:185
#, python-format
msgid "Operation not allowed, received amount should be a value between 0 and notified amount"
msgstr "L'opération n'est pas autorisée, la somme reçue doit être inférieure au montant notifié"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_partner_ids
msgid "Other partners"
msgstr "Autres partenaires"
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:156
#, python-format
msgid "Please enter the update reason"
msgstr "Merci de saisir le motif de mise à jour"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_reason
msgid "Reason"
msgstr "Motif"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Received :"
msgstr "Reçu :"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_received_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_received_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_received_amount
msgid "Received amount"
msgstr "Somme reçue"
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Refused"
msgstr "Refusé"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_remaining_amount
msgid "Remaining amount"
msgstr "Somme restante"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_reply_deadline
msgid "Reply deadline"
msgstr "Date de réponse"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Reply deadline (month)"
msgstr "Date de réponse (mois)"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Reply deadline (week)"
msgstr "Date de réponse (semaine)"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Requested :"
msgstr "Demandé :"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_requested_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_requested_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_requested_amount
msgid "Requested amount"
msgstr "Somme demandée"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_responsible_id
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Responsible"
msgstr "Responsable"
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Sent"
msgstr "Envoyé"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_significance
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Significance"
msgstr "Significance"
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_state
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "State"
msgstr "État"
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:195
#, python-format
msgid "Sum of notified amounts on amount details is not the same as global notified amount. Please check your fills."
msgstr "La somme des montants notifiés sur les détails ne correspond pas au montant global notifié. Merci de vérifier vos saisies."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:200
#, python-format
msgid "Sum of received amounts on amount details is not the same as global received amount. Please check your fills."
msgstr "La somme des montants reçues sur les détails ne correspond pas au montant global reçu. Merci de vérifier vos saisies."
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_title
msgid "Title"
msgstr "Titre"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total notified"
msgstr "Total notifié"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total received"
msgstr "Total reçu"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total remaining"
msgstr "Total restant"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total requested"
msgstr "Total demandé"
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_edit_wizard_form
msgid "Update reason"
msgstr "Motif de mise à jour"
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:219
#, python-format
msgid "You are only allowed to update to draft from sent or refused states."
msgstr "Vous n'êtes autorisé à mettre à jour vers brouillon que depuis les états envoyé et refusé."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:226
#, python-format
msgid "You are only allowed to update to edit from sent or edit states."
msgstr "Vous n'êtes autorisé à mettre à jour vers modifié que depuis les états envoyé et déjà modifié."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:231
#, python-format
msgid "You are only allowed to update to notidied from sent or edit states."
msgstr "Vous n'êtes autorisé à mettre à jour vers notifié que depuis les états envoyé et modifié."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:215
#, python-format
msgid "You are only allowed to update to refused from sent or edited states."
msgstr "Vous n'êtes autorisé à mettre à jour vers refusé que depuis les états envoyé et modifié."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:223
#, python-format
msgid "You are only allowed to update to sent state from draft."
msgstr "Vous n'êtes autorisé à mettre à jour vers envoyé que depuis l'état brouillon."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:235
#, python-format
msgid "You can not change manually to paid or finished state : fill received amount to achieve this."
msgstr "Vous ne pouvez pas modifier manuellement vers les états payé ou terminé : utiliser le champ de la somme reçue pour cela."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:141
#, python-format
msgid "You can only mark assessment as sent when grant had been notified."
msgstr "Vous pouvez seulement marquer le bilan comme envoyé quand la subvention a été notifiée."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:171
#, python-format
msgid "You must enter a signed notified amount."
msgstr "Vous devez saisir un montant notifié positif."
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:168
#, python-format
msgid "You must enter a signed requested amount."
msgstr "Vous devez saisir un montant demandé positif."
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "You must save your grant file before being able to enter amount lines."
msgstr "Vous devez sauvegarder votre dossier de subvention avant de pouvoir entrer les détails."
#. module: grant_followup
#: model:ir.model,name:grant_followup.model_grant_file
msgid "grant.file"
msgstr "grant.file"
#. module: grant_followup
#: model:ir.model,name:grant_followup.model_grant_file_amount_line
msgid "grant.file.amount.line"
msgstr "grant.file.amount.line"
#. module: grant_followup
#: model:ir.model,name:grant_followup.model_grant_file_edit_wizard
msgid "grant.file.edit.wizard"
msgstr "grant.file.edit.wizard"

View File

@ -1,571 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * grant_followup
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-26 12:47+0000\n"
"PO-Revision-Date: 2018-09-26 12:47+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: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "<span style=\"color: grey;\">Reply deadline :</span>"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "<span style=\"font-style: italic;\">document(s) attached</span>"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "All partners"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Amount details"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_ids
msgid "Amount lines"
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file_amount.py:29
#: sql_constraint:grant.file.amount.line:0
#, python-format
msgid "An amount line had already been named like that for this grant file"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Are you sure you want to mark assessment as not sent ?"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Are you sure you want to mark assessment as sent ?"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Are you sure you want to mark this file as refused ?"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment Sent"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_assessment_deadline
msgid "Assessment deadline"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment deadline (month)"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment deadline (week)"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment not sent"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Assessment sent"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_attachment_ids
msgid "Attachments"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_edit_wizard_form
msgid "Cancel"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_color
msgid "Color Index"
msgstr ""
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Common"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_edit_wizard_form
msgid "Confirm"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_create_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_create_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_create_uid
msgid "Created by"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_create_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_create_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_create_date
msgid "Created on"
msgstr ""
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Critical"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_currency_id
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_currency_id
msgid "Currency"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Delete"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_description
msgid "Description"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_display_name
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_display_name
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_display_name
msgid "Display Name"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_display_partner_ids
msgid "Display partner ids"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_doc_count
msgid "Doc count"
msgstr ""
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Draft"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Edit"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Edit file"
msgstr ""
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Edited"
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/wizard/grant_file_edit.py:37
#, python-format
msgid "File update reason : {}"
msgstr ""
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Finished"
msgstr ""
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "First Paiement Received"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Go back to draft"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Grant"
msgstr ""
#. module: grant_followup
#: model:res.groups,name:grant_followup.group_grant_manager
msgid "Grant Manager"
msgstr ""
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Grant Notification"
msgstr ""
#. module: grant_followup
#: model:res.groups,name:grant_followup.group_grant_user
msgid "Grant User"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_id
msgid "Grant file"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_grant_file_id
msgid "Grant file id"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Grant notified"
msgstr ""
#. module: grant_followup
#: model:ir.actions.act_window,name:grant_followup.grant_action
#: model:ir.ui.menu,name:grant_followup.grant_menu
msgid "Grants"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_assessment_sent
msgid "Has assessment been sent ?"
msgstr ""
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "High"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_id
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_id
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_id
msgid "ID"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file___last_update
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line___last_update
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard___last_update
msgid "Last Modified on"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_write_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_write_uid
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_write_uid
msgid "Last Updated by"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_write_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_write_date
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_write_date
msgid "Last Updated on"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_partner_id
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Main partner"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark Assessment as Not Sent"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark Assessment as Sent"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark as refused"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Mark as sent"
msgstr ""
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Medium"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_name
msgid "Name"
msgstr ""
#. module: grant_followup
#: selection:grant.file,significance:0
msgid "Not evaluated"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_note
msgid "Note"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Notes"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Notified :"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_notified_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_notified_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_notified_amount
msgid "Notified amount"
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:185
#, python-format
msgid "Operation not allowed, received amount should be a value between 0 and notified amount"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_partner_ids
msgid "Other partners"
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:156
#, python-format
msgid "Please enter the update reason"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_edit_wizard_reason
msgid "Reason"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Received :"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_received_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_received_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_received_amount
msgid "Received amount"
msgstr ""
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Refused"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_remaining_amount
msgid "Remaining amount"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_reply_deadline
msgid "Reply deadline"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Reply deadline (month)"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Reply deadline (week)"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_kanban
msgid "Requested :"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_file_requested_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_amount_line_requested_amount
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_requested_amount
msgid "Requested amount"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_responsible_id
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Responsible"
msgstr ""
#. module: grant_followup
#: selection:grant.file,state:0
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Sent"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_significance
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "Significance"
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_state
#: model:ir.ui.view,arch_db:grant_followup.grant_file_search
msgid "State"
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:195
#, python-format
msgid "Sum of notified amounts on amount details is not the same as global notified amount. Please check your fills."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:200
#, python-format
msgid "Sum of received amounts on amount details is not the same as global received amount. Please check your fills."
msgstr ""
#. module: grant_followup
#: model:ir.model.fields,field_description:grant_followup.field_grant_file_title
msgid "Title"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total notified"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total received"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total remaining"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "Total requested"
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_edit_wizard_form
msgid "Update reason"
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:219
#, python-format
msgid "You are only allowed to update to draft from sent or refused states."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:226
#, python-format
msgid "You are only allowed to update to edit from sent or edit states."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:231
#, python-format
msgid "You are only allowed to update to notidied from sent or edit states."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:215
#, python-format
msgid "You are only allowed to update to refused from sent or edited states."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:223
#, python-format
msgid "You are only allowed to update to sent state from draft."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:235
#, python-format
msgid "You can not change manually to paid or finished state : fill received amount to achieve this."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:141
#, python-format
msgid "You can only mark assessment as sent when grant had been notified."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:171
#, python-format
msgid "You must enter a signed notified amount."
msgstr ""
#. module: grant_followup
#: code:addons/grant_followup/models/grant_file.py:168
#, python-format
msgid "You must enter a signed requested amount."
msgstr ""
#. module: grant_followup
#: model:ir.ui.view,arch_db:grant_followup.grant_file_form
msgid "You must save your grant file before being able to enter amount lines."
msgstr ""
#. module: grant_followup
#: model:ir.model,name:grant_followup.model_grant_file
msgid "grant.file"
msgstr ""
#. module: grant_followup
#: model:ir.model,name:grant_followup.model_grant_file_amount_line
msgid "grant.file.amount.line"
msgstr ""
#. module: grant_followup
#: model:ir.model,name:grant_followup.model_grant_file_edit_wizard
msgid "grant.file.edit.wizard"
msgstr ""

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import grant_file, grant_file_amount

View File

@ -1,238 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Grant File Management"""
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
class GrantFile(models.Model):
""" Grant File Management """
_name = 'grant.file'
_inherit = 'mail.thread'
_order = 'significance desc, reply_deadline asc, state asc'
_rec_name = 'title'
title = fields.Char(required=True, index=True, readonly=True,
states={'1_draft': [('readonly', False)],
'3_edited': [('readonly', False)]})
description = fields.Text()
note = fields.Text()
partner_id = fields.Many2one('res.partner', index=True, readonly=True,
auto_join=True, string='Main partner',
states={'1_draft': [('readonly', False)],
'3_edited': [('readonly', False)]})
partner_ids = fields.Many2many(
'res.partner', index=True, auto_join=True,
readonly=True, string='Other partners',
states={'1_draft': [('readonly', False)],
'3_edited': [('readonly', False)],
'4_grant_notification': [('readonly', False)]})
display_partner_ids = fields.Char(compute='_compute_display_partner_ids')
responsible_id = fields.Many2one('res.users', string='Responsible',
auto_join=True, index=True,
default=lambda self: self.env.user)
reply_deadline = fields.Date(index=True, readonly=True,
states={'1_draft': [('readonly', False)],
'3_edited': [('readonly', False)]})
assessment_deadline = fields.Date(index=True, readonly=True,
states={'1_draft': [('readonly', False)],
'3_edited': [('readonly', False)],
'4_grant_notification': [('readonly', False)]})
significance = fields.Selection([('0', 'Not evaluated'),
('1', 'Common'),
('2', 'Medium'),
('3', 'High'),
('4', 'Critical')],
default='0', copy=False)
state = fields.Selection([('0_refused', 'Refused'),
('1_draft', 'Draft'),
('2_sent', 'Sent'),
('3_edited', 'Edited'),
('4_grant_notification', 'Grant Notification'),
('6_first_paiement_received', 'First Paiement Received'),
('7_finished', 'Finished')],
default='1_draft', copy=False, track_visibility='onchange')
requested_amount = fields.Monetary(readonly=True, required=True,
states={'1_draft': [('readonly', False)],
'3_edited': [('readonly', False)]})
notified_amount = fields.Monetary(readonly=True, copy=False,
states={'4_grant_notification': [('readonly', False),
('required', True)]})
received_amount = fields.Monetary(readonly=False, copy=False,
track_visibility='onchange',
states={'0_refused': [('readonly', True)],
'1_draft': [('readonly', True)],
'7_finished': [('readonly', True)]})
currency_id = fields.Many2one('res.currency', string='Currency',
required=True, auto_join=True,
default=lambda self: self.env.user.company_id.currency_id)
amount_line_ids = fields.One2many('grant.file.amount.line', 'file_id',
string='Amount lines')
assessment_sent = fields.Boolean('Has assessment been sent ?', readonly=True,
copy=False, track_visibility='onchange')
color = fields.Integer('Color Index')
attachment_ids = fields.One2many(
'ir.attachment', 'res_id', string='Attachments', auto_join=True,
domain=[('res_model', '=', 'grant.file')])
doc_count = fields.Integer(compute='_compute_doc_count')
@api.depends('partner_ids')
def _compute_display_partner_ids(self):
""" Computes display partners """
for gfile in self:
if gfile.partner_ids:
gfile.display_partner_ids = u', '.join(gfile.partner_ids.mapped('name'))
else:
gfile.display_partner_ids = u''
@api.depends('attachment_ids')
def _compute_doc_count(self):
""" Computes doc count """
for gfile in self:
gfile.doc_count = len(gfile.attachment_ids)
@api.multi
def state_refused(self):
""" Updates state to refused """
self.write({'state': '0_refused'})
@api.multi
def state_draft(self):
""" Updates state to draft """
self.write({'state': '1_draft'})
@api.multi
def state_sent(self):
""" Updates state to sent """
self.write({'state': '2_sent'})
@api.multi
def state_grant_notification(self):
""" Updates state to notidication granted """
self.write({'state': '4_grant_notification'})
@api.multi
def sent_assessment(self):
""" Updates state to Assessment sent to True """
for gfile in self:
if gfile.state not in ('4_grant_notification',
'6_first_paiement_received', '7_finished'):
verr = _('You can only mark assessment as sent when grant had '
'been notified.')
raise ValidationError(verr)
self.write({'assessment_sent': True})
@api.multi
def unsent_assessment(self):
""" Updates state to Assessment sent to False """
self.write({'assessment_sent': False})
@api.multi
def state_edit(self):
""" Wizard to enter update reason """
self.ensure_one()
grant_file_id = self[0]
return {'name': _('Please enter the update reason'),
'type': 'ir.actions.act_window',
'res_model': 'grant.file.edit.wizard',
'context': {'default_grant_file_id': grant_file_id.id},
'view_mode': 'form',
'target': 'new'}
@api.constrains('requested_amount', 'notified_amount')
def check_notified_amount(self):
""" Checks notified amount is filled, according to file state """
for gfile in self:
if not gfile.requested_amount or gfile.requested_amount <= 0.0:
verr = _('You must enter a signed requested amount.')
raise ValidationError(verr)
if gfile.state == '4_grant_notification' and gfile.notified_amount <= 0.0:
verr = _('You must enter a signed notified amount.')
raise ValidationError(verr)
@api.constrains('received_amount')
def check_received_amount(self):
""" Check received amount to finish application """
for grant in self:
if grant.received_amount:
if 0 < grant.received_amount < grant.notified_amount:
grant.write({'state': '6_first_paiement_received'}, bypass=True)
elif grant.received_amount and \
(grant.received_amount == grant.notified_amount):
grant.write({'state': '7_finished'}, bypass=True)
else:
verr = _('Operation not allowed, received amount should be a '
'value between 0 and notified amount')
raise ValidationError(verr)
@api.constrains('amount_line_ids')
def check_amount_details(self):
""" Checks coherence between declared amounts and details """
for gfile in self:
if gfile.amount_line_ids:
if gfile.notified_amount != sum(gfile.amount_line_ids.mapped('notified_amount')):
verr = _('Sum of notified amounts on amount details is not '
'the same as global notified amount. Please check '
'your fills.')
raise ValidationError(verr)
if gfile.received_amount != sum(gfile.amount_line_ids.mapped('received_amount')):
verr = _('Sum of received amounts on amount details is not '
'the same as global received amount. Please check '
'your fills.')
raise ValidationError(verr)
@api.multi
def write(self, vals, bypass=False):
""" Check state update coherence """
notified_val = vals.get('notified_amount', 0.0)
if notified_val <= 0.0:
self.check_notified_amount()
if 'state' in vals:
vstate = vals.get('state')
for gfile in self:
if vstate == '0_refused' and gfile.state not in ('2_sent', '3_edited'):
verr = _('You are only allowed to update to refused from '
'sent or edited states.')
raise ValidationError(verr)
elif vstate == '1_draft' and gfile.state not in ('2_sent', '0_refused'):
verr = _('You are only allowed to update to draft from sent '
'or refused states.')
raise ValidationError(verr)
elif vstate == '2_sent' and gfile.state != '1_draft':
verr = _('You are only allowed to update to sent state from draft.')
raise ValidationError(verr)
elif vstate == '3_edited' and gfile.state not in ('2_sent', '3_edited'):
verr = _('You are only allowed to update to edit from sent '
'or edit states.')
raise ValidationError(verr)
elif vstate == '4_grant_notification' and \
gfile.state not in ('2_sent', '3_edited'):
verr = _('You are only allowed to update to notidied from '
'sent or edit states.')
raise ValidationError(verr)
elif vstate in ('6_first_paiement_received', '7_finished') and not bypass:
verr = _('You can not change manually to paid or finished '
'state : fill received amount to achieve this.')
raise ValidationError(verr)
return super(GrantFile, self).write(vals)

View File

@ -1,49 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Grant File Amount Management"""
from odoo import models, fields, api, _
class GrantFileAmountLine(models.Model):
""" Grant File Amount Line Management """
_name = 'grant.file.amount.line'
_sql_constraints = [('grant_file_amount_line_uniq',
'UNIQUE (file_id, name)',
_('An amount line had already been named like that for '
'this grant file'))]
file_id = fields.Many2one('grant.file', required=True, index=True,
auto_join=True, string='Grant file',
ondelete='cascade')
currency_id = fields.Many2one(related='file_id.currency_id')
file_requested_amount = fields.Monetary(related='file_id.requested_amount')
file_notified_amount = fields.Monetary(related='file_id.notified_amount')
file_received_amount = fields.Monetary(related='file_id.received_amount')
name = fields.Char(required=True)
requested_amount = fields.Monetary()
notified_amount = fields.Monetary()
received_amount = fields.Monetary()
remaining_amount = fields.Monetary(compute='_compute_remaining_amount')
@api.depends('notified_amount', 'received_amount')
def _compute_remaining_amount(self):
""" Computes remaining amount """
for line in self:
line.remaining_amount = line.notified_amount - line.received_amount

View File

@ -1,4 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_grant_file_manager,Access Grant Manager,grant_followup.model_grant_file,grant_followup.group_grant_manager,1,1,1,1
access_grant_file_user,Access Grant User,grant_followup.model_grant_file,grant_followup.group_grant_user,1,1,1,0
access_grant_file_amount_line_base_user,Access Grant File Amount Line Grant User,grant_followup.model_grant_file_amount_line,grant_followup.group_grant_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_grant_file_manager Access Grant Manager grant_followup.model_grant_file grant_followup.group_grant_manager 1 1 1 1
3 access_grant_file_user Access Grant User grant_followup.model_grant_file grant_followup.group_grant_user 1 1 1 0
4 access_grant_file_amount_line_base_user Access Grant File Amount Line Grant User grant_followup.model_grant_file_amount_line grant_followup.group_grant_user 1 1 1 1

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<record id="group_grant_manager" model="res.groups">
<field name="name">Grant Manager</field>
</record>
<record id="group_grant_user" model="res.groups">
<field name="name">Grant User</field>
</record>
</data>
</odoo>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,295 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Trees -->
<record id="grant_file_tree" model="ir.ui.view">
<field name="name">Grant File Tree</field>
<field name="model">grant.file</field>
<field name="arch" type="xml">
<tree colors="grey: state=='1_draft'; black: state in ('2_sent', '3_edited'); blue: state == '4_grant_notification'; red: state=='0_refused'; green: state in ('6_first_paiement_received','7_finished')">
<field name="title"/>
<field name="partner_id"/>
<field name="partner_ids" widget="many2many_tags" />
<field name="reply_deadline"/>
<field name="significance" />
<field name="currency_id" invisible="1" />
<field name="requested_amount"/>
<field name="notified_amount"/>
<field name="received_amount"/>
<field name="responsible_id"/>
<field name="assessment_sent"/>
<field name="doc_count"/>
<field name="state"/>
</tree>
</field>
</record>
<!-- Forms -->
<record id="grant_file_form" model="ir.ui.view">
<field name="name">Grant File Form</field>
<field name="model">grant.file</field>
<field name="arch" type="xml">
<form string="Grant">
<header>
<button name="state_refused" type="object" string="Mark as refused"
confirm="Are you sure you want to mark this file as refused ?"
states="2_sent,3_edited" />
<button name="state_draft" type="object" string="Go back to draft"
states="2_sent,0_refused" />
<button name="state_sent" type="object" string="Mark as sent"
class="oe_highlight" states="1_draft" />
<button name="state_edit" type="object" string="Edit file"
class="oe_highlight" states="2_sent,3_edited" />
<button name="state_grant_notification" type="object"
string="Grant notified" class="oe_highlight" states="2_sent,3_edited" />
<button name="sent_assessment" type="object"
string="Mark Assessment as Sent" class="oe_highlight"
confirm="Are you sure you want to mark assessment as sent ?"
attrs="{'invisible': ['|', ('assessment_sent', '!=', False),
('state', 'not in', ('4_grant_notification', '6_first_paiement_received', '7_finished'))]}" />
<button name="unsent_assessment" type="object"
string="Mark Assessment as Not Sent"
confirm="Are you sure you want to mark assessment as not sent ?"
attrs="{'invisible': ['|', ('assessment_sent', '=', False),
('state', 'not in', ('4_grant_notification', '6_first_paiement_received', '7_finished'))]}" />
<field name="state" widget="statusbar" />
</header>
<sheet>
<group>
<group>
<field name="id" invisible="1" />
<field name="title" />
<field name="partner_id" />
<field name="partner_ids" widget="many2many_tags" />
<field name="reply_deadline" />
<field name="assessment_deadline" />
<field name="significance" widget="priority"/>
</group>
<group>
<field name="currency_id" invisible="1" />
<field name="requested_amount" />
<field name="notified_amount" />
<field name="received_amount" />
<field name="responsible_id" />
<field name="assessment_sent" />
</group>
</group>
<group>
<field name="description" />
</group>
<notebook>
<page name="amount_lines" string="Amount details">
<p style="color: red;" attrs="{'invisible': [('id', '!=', False)]}">
You must save your grant file before being able to enter amount lines.
</p>
<group>
<field name="amount_line_ids" nolabel="1"
context="{'default_file_id': active_id}"
attrs="{'readonly': [('id', '=', False)]}">
<tree editable="bottom"
colors="gray: notified_amount == 0.0; blue: received_amount != 0.0 and received_amount &lt; notified_amount; green: received_amount != 0.0 and received_amount == notified_amount;">
<field name="file_id" invisible="1" />
<field name="file_requested_amount" invisible="1" />
<field name="file_notified_amount" invisible="1" />
<field name="file_received_amount" invisible="1" />
<field name="currency_id" invisible="1" />
<field name="name" />
<field name="requested_amount" sum="Total requested" />
<field name="notified_amount" sum="Total notified" />
<field name="received_amount" sum="Total received" />
<field name="remaining_amount" sum="Total remaining" />
</tree>
</field>
</group>
</page>
<page name="notes" string="Notes">
<group>
<field name="note" nolabel="1" />
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
</record>
<!-- Search -->
<record id="grant_file_search" model="ir.ui.view">
<field name="name">Grant File Search</field>
<field name="model">grant.file</field>
<field name="arch" type="xml">
<search>
<field name="title"/>
<field name="partner_id"/>
<field name="partner_ids" string="All partners"
filter_domain="['|', ('partner_id', 'ilike', self), ('partner_ids', 'ilike', self)]"/>
<field name="responsible_id"/>
<field name="reply_deadline"/>
<field name="assessment_deadline"/>
<filter name="state_draft" string="Draft"
domain="[('state', '=', '1_draft')]" />
<filter name="state_sent" string="Sent"
domain="[('state', '=', '2_sent')]" />
<filter name="state_edited" string="Edited"
domain="[('state', '=', '3_edited')]" />
<filter name="state_grant_notification" string="Grant Notification"
domain="[('state', '=', '4_grant_notification')]"/>
<filter name="state_assessment_sent" string="Assessment Sent"
domain="[('state', '=', '5_assessment_sent')]" />
<filter name="state_first_paiement_received" string="First Paiement Received"
domain="[('state', '=', '6_first_paiement_received')]"/>
<filter name="state_finished" string="Finished"
domain="[('state', '=', '7_finished')]"/>
<filter name="state_refused" string="Refused"
domain="[('state', '=', '0_refused')]"/>
<separator />
<filter name="assessment_sent_1" string="Assessment sent"
domain="[('assessment_sent', '=', True)]"/>
<filter name="assessment_sent_0" string="Assessment not sent"
domain="[('assessment_sent', '=', False)]"/>
<filter name="group_state" string="State"
context="{'group_by': 'state'}"/>
<filter name="group_significance" string="Significance"
context="{'group_by': 'significance'}"/>
<filter name="group_partner" string="Main partner"
context="{'group_by': 'partner_id'}"/>
<filter name="group_responsible" string="Responsible"
context="{'group_by': 'responsible_id'}"/>
<filter name="group_reply_deadline_month" string="Reply deadline (month)"
context="{'group_by': 'reply_deadline'}"/>
<filter name="group_reply_deadline_week" string="Reply deadline (week)"
context="{'group_by': 'reply_deadline:week'}"/>
<filter name="group_assessment_deadline_month"
string="Assessment deadline (month)"
context="{'group_by': 'assessment_deadline'}"/>
<filter name="group_assessment_deadline_week"
string="Assessment deadline (week)"
context="{'group_by': 'assessment_deadline:week'}"/>
</search>
</field>
</record>
<!-- Kanban -->
<record id="grant_file_kanban" model="ir.ui.view">
<field name="name">Grant File Kanban</field>
<field name="model">grant.file</field>
<field name="arch" type="xml">
<kanban default_group_by="state"
class="o_kanban_small_column">
<field name="title"/>
<field name="partner_id"/>
<field name="partner_ids"/>
<field name="display_partner_ids"/>
<field name="responsible_id"/>
<field name="reply_deadline"/>
<field name="significance"/>
<field name="received_amount"/>
<field name="requested_amount"/>
<field name="notified_amount"/>
<field name="currency_id"/>
<field name="color"/>
<field name="doc_count"/>
<templates>
<t t-name="kanban-box">
<!-- Set the Kanban Card color: -->
<div t-attf-class="#{kanban_color(record.color.raw_value)}
oe_kanban_global_click">
<div class="o_dropdown_kanban dropdown">
<!-- Top-right drop down menu here... -->
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
<span class="fa fa-bars fa-lg"/>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<!-- Edit and Delete actions, if available: -->
<t t-if="widget.editable">
<li><a type="edit">Edit</a></li>
</t>
<t t-if="widget.deletable">
<li><a type="delete">Delete</a></li>
</t>
<li>
<ul class="oe_kanban_colorpicker" data-field="color"/>
</li>
</ul>
</div>
<div class="oe_kanban_content">
<div>
<strong>
<a type="open"><field name="title" /></a>
</strong>
</div>
<ul>
<li t-if="record.partner_id.raw_value">
<field name="partner_id" />
<span t-if="record.partner_ids.raw_value.length &gt; 1"
style="text-size: smaller; opacity: 0.7;">
(<t t-esc="record.display_partner_ids.raw_value" />)
</span>
</li>
<li t-if="record.reply_deadline.raw_value">
<span style="color: grey;">Reply deadline :</span>
<field name="reply_deadline" />
</li>
<li>Requested : <field name="requested_amount" /></li>
<li t-if="record.notified_amount.raw_value"
t-attf-style="{{record.notified_amount.raw_value &lt; record.requested_amount.raw_value ? 'color: orange;' : 'color: green;'}}">
Notified : <field name="notified_amount" />
</li>
<li t-if="record.received_amount.raw_value"
t-attf-style="{{record.received_amount.raw_value &lt; record.notified_amount.raw_value ? 'color: blue;' : 'color: green;'}}">
Received : <field name="received_amount" />
</li>
<li t-if="record.doc_count.raw_value">
<field name="doc_count" />
<span style="font-style: italic;">document(s) attached</span>
</li>
</ul>
<div class="oe_kanban_footer">
<div class="oe_kanban_footer_left">
<!-- Left hand footer... -->
<field name="significance" widget="priority" />
</div>
<div>
<!-- Right hand footer... -->
<img t-att-title="record.responsible_id.value"
t-att-src="kanban_image('res.users', 'image_small', record.responsible_id.raw_value)"
width="24" height="24"
class="oe_kanban_avatar pull-right" />
</div>
</div>
</div> <!-- oe_kanban_content -->
<div class="oe_clear"/>
</div> <!-- kanban color -->
</t>
</templates>
</kanban>
</field>
</record>
</data>
</odoo>

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Actions -->
<act_window id="grant_action" name="Grants"
res_model="grant.file" view_mode="kanban,tree,form,search"/>
<!-- Menus -->
<menuitem id="grant_menu" name="Grants"
action="grant_action" sequence="20"
web_icon="grant_followup,static/description/icon.png" />
</data>
</odoo>

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import grant_file_edit

View File

@ -1,37 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Grant File Edit Wizard"""
from odoo import models, fields, api, _
class FileEditWizard(models.TransientModel):
""" Grant File Edit Wizard """
_name = "grant.file.edit.wizard"
grant_file_id = fields.Many2one('grant.file', required=True, ondelete='cascade')
reason = fields.Text(required=True)
@api.multi
def edit(self):
""" Sets grant status to edited """
self.ensure_one()
record = self[0]
record.grant_file_id.state = '3_edited'
record.grant_file_id.message_post(
body=_(u'File update reason : {}').format(record.reason))

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Forms -->
<record model="ir.ui.view" id="grant_file_edit_wizard_form">
<field name="name">Grant File Edit Wizard Form</field>
<field name="model">grant.file.edit.wizard</field>
<field name="arch" type="xml">
<form string="Update reason">
<group>
<field name="grant_file_id" readonly="1" />
<field name="reason" />
</group>
<footer>
<button name="edit" string="Confirm" type="object"
class="oe_highlight" />
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
</data>
</odoo>

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -42,4 +42,5 @@ from top menu and chatter attachment.
"static/src/xml/web_multi_uploader.xml",
],
'auto_install': False,
'installable': False
}

View File

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Author: Fabien Bourgeois. Copyright Yaltik
# Copyright (C)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -18,7 +18,7 @@
{
'name': 'Email widget check syntax',
'summary': 'Extends Web Email widget to ensure valid syntax',
'version': '10.0.1.0.1',
'version': '0.1',
'category': 'Usability',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -1,41 +1,31 @@
/*
* Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
*
* Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* global odoo */
/* global openerp */
odoo.define('web.web_widget_email_check', function(require) {
openerp.web_widget_email_check = function (instance) {
'use strict';
var core = require('web.core');
var widget = require('web.form_widgets');
var reEmail = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
widget.FieldEmail.include({
instance.web.form.FieldEmail.include({
is_syntax_valid: function () {
if (this.$input) {
var val = this.$input.val() || '';
return ((val.length === 0) || reEmail.test(val));
} else {
return true;
}
var val = this.$('input').val() || '';
return ((val.length === 0) || reEmail.test(val));
}
});
return { FieldEmail: widget.FieldEmail };
});
};

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -16,14 +16,12 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<template id="assets_backend" name="web_widget_email_check_assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript"
src="/web_widget_email_check/static/src/js/web_widget_email_check.js"></script>
</xpath>
</template>
</data>
</odoo>
<openerp>
<data>
<template id="assets_backend" name="web_widget_email_check_assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_widget_email_check/static/src/js/web_widget_email_check.js"></script>
</xpath>
</template>
</data>
</openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -18,12 +18,11 @@
{
'name': 'French format phone widget check',
'summary': 'Extends Web Char widget to handle french format phone',
'version': '10.0.1.0.2',
'version': '0.1',
'category': 'Usability',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'installable': True,
'depends': [ 'web' ],
'data': [ 'view.xml' ],
'qweb': ['static/src/xml/qweb.xml']
'data': [ 'view.xml' ]
}

View File

@ -1,42 +1,43 @@
/*
* Copyright 2016-2018 Fabien Bourgeois <fabien@yaltik.com>
*
* Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* global odoo */
/* global openerp */
odoo.define('web.web_widget_phone_check', function(require) {
openerp.web_widget_phone_check_fr = function (instance) {
'use strict';
var core = require('web.core');
var widget = require('web.form_widgets');
var rePhone = /^\d{10}$/;
var FieldPhoneFr = widget.FieldChar.extend({
template: 'FieldPhoneFr',
openerp.web.form.FieldPhoneFr =
instance.web.form.FieldChar.extend({
template: 'FieldEmail',
is_syntax_valid: function () {
var val = this.$('input').val() || '';
return ((val.length === 0) || rePhone.test(val));
},
render_value: function() {
this._super();
if (this.get('effective_readonly')) {
if (!this.get('effective_readonly')) {
this._super();
} else {
var val = this.get('value') || '';
this.$el.find('a').attr('href', 'tel:' + val).text(val);
}
}
});
core.form_widget_registry.add('phonefr', FieldPhoneFr);
return {
FieldPhoneFr: FieldPhoneFr
};
});
instance.web.form.widgets.add('phonefr', 'instance.web.form.FieldPhoneFr');
};

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -18,15 +18,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<templates>
<t t-name="FieldPhoneFr">
<t t-if="widget.get('effective_readonly')">
<a t-if="widget.clickable" class="o_form_uri o_text_overflow" href="#" target="_blank"/>
<span t-if="!widget.clickable" class="o_text_overflow"/>
</t>
<input t-if="!widget.get('effective_readonly')" class="o_form_input" type="text"
t-att-id="widget.id_for_label"
t-att-tabindex="widget.node.attrs.tabindex"
t-att-autofocus="widget.node.attrs.autofocus"
t-att-placeholder="widget.node.attrs.placeholder"
t-att-maxlength="widget.field.size" />
<span class="oe_form_field oe_form_field_email" t-att-style="widget.node.attrs.style">
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri" target="_blank"/>
<t t-if="!widget.get('effective_readonly')">
<div>
<input type="text"
t-att-id="widget.id_for_label"
t-att-tabindex="widget.node.attrs.tabindex"
t-att-autofocus="widget.node.attrs.autofocus"
t-att-placeholder="widget.node.attrs.placeholder"
t-att-maxlength="widget.field.size"
/>
</div>
</t>
</span>
</t>
</templates>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -16,14 +16,12 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<template id="assets_backend" name="web_widget_phone_check_fr_assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript"
src="/web_widget_phone_check_fr/static/src/js/web_widget_phone_check_fr.js"></script>
</xpath>
</template>
</data>
</odoo>
<openerp>
<data>
<template id="assets_backend" name="web_widget_phone_check_fr_assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_widget_phone_check_fr/static/src/js/web_widget_phone_check_fr.js"></script>
</xpath>
</template>
</data>
</openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -18,7 +18,7 @@
{
'name': 'URL widget check syntax',
'summary': 'Extends Web URL widget to ensure valid syntax',
'version': '10.0.1.0.1',
'version': '0.1',
'category': 'Usability',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -1,41 +1,31 @@
/*
* Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
*
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* global odoo */
/* global openerp */
odoo.define('web.web_widget_url_check', function(require) {
openerp.web_widget_url_check = function (instance) {
'use strict';
var core = require('web.core');
var FieldUrl = core.form_widget_registry.get('url');
var reUrl = /(?:https?:\/\/)?(?:[\w]+\.)([a-zA-Z\.]{2,6})([\/\w\.-]*)*\/?/;
FieldUrl.include({
instance.web.form.FieldUrl.include({
is_syntax_valid: function () {
if (this.$input) {
var val = this.$input.val() || '';
return ((val.length === 0) || reUrl.test(val));
} else {
return true;
}
var val = this.$('input').val() || '';
return ((val.length === 0) || reUrl.test(val));
}
});
return { FieldUrl: FieldUrl };
});
};

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -16,14 +16,12 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<template id="assets_backend" name="web_widget_url_check_assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript"
src="/web_widget_url_check/static/src/js/web_widget_url_check.js"></script>
</xpath>
</template>
</data>
</odoo>
<openerp>
<data>
<template id="assets_backend" name="web_widget_url_check_assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_widget_url_check/static/src/js/web_widget_url_check.js"></script>
</xpath>
</template>
</data>
</openerp>

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import odoo

View File

@ -1,29 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{
'name': 'Odoo XML DSL base module and fns',
'summary': 'Odoo XML Domain Specific Language base module and functions',
'description': """ Odoo XML Domain Specific Language base module and functions """,
'version': '10.0.0.1.0',
'category': 'Yaltik',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['base']
}

View File

@ -1,46 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" XML helpers and macros """
from xml.etree import ElementTree as ET
def xmlroot(tree):
""" Special process for root XML Node """
rootel = ET.Element(tree['tag'], tree['attrs'])
children = tree['children']
if children:
xmlchild(rootel, children)
return rootel
def xmlchild(parent, children):
""" Handling of children (ie non root) XML Nodes with/o text and
subchildren (recursive) """
for child in children:
if isinstance(child, str):
parent.text = child
else:
attrs = {unicode(k): unicode(v) for k, v in child['attrs'].items()}
new_parent = ET.SubElement(parent, child['tag'], attrs)
subchildren = child['children']
if subchildren:
xmlchild(new_parent, subchildren)
def xmln(tag='', attrs=None, children=None, text=False):
""" XMLNode with default children, not attributes """
children = ([text] if text else children) or []
return {'tag': tag, 'attrs': attrs or {}, 'children': children}

View File

@ -1,81 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Odoo XML DSL """
from . import base as x
def odoo(*args):
""" odoo tag shortcut """
return x.xmlroot(x.xmln('odoo', {}, *args))
def data(*args):
""" data tag shortcut """
return x.xmln('data', {}, *args)
def record(*args):
""" record tag shortcut """
return x.xmln('record', *args)
def view(xmlid, children):
""" view tag shortcut """
return record({'id': xmlid, 'model': 'ir.ui.view'}, children)
def view_def(xmlid, name, model, arch):
""" View and first fields simplification with record xmlid, name, targeted model """
return view(xmlid, [field_name(name), field_model(model), field_arch(arch)])
def view_inherit(name, model, inherit, arch):
""" Inherited View simplification with name of the record, xmlid for model
and inherited view """
module = __name__.split('.')[2]
inherited = inherit.split('.')[1]
xmlid = '%s_inherit_%s' % (inherited, module)
return view(xmlid, [field_name(name), field_model(model),
field_inherit(inherit), field_arch(arch)])
def actions_server_code(xmlid, name, modelref, code):
""" Server actions of type code """
return record({'id': xmlid, 'model': 'ir.actions.server'},
[field_name(name),
field({'name': 'model_id', 'ref': modelref}),
field({'name': 'state'}, ['code']),
field({'name': 'code'}, [code])])
def field(*args):
""" field tag shortcut """
return x.xmln('field', *args)
def field_name(name):
""" field name tag shortcut """
return field({'name': 'name'}, [name])
def field_model(model):
""" field model tag shortcut """
return field({'name': 'model'}, [model])
def field_inherit(xmlid):
""" field inherit tag shortcut """
return field({'name': 'inherit_id', 'ref': xmlid})
def field_arch(*args):
""" field arch tag shortcut """
return field({'name': 'arch', 'type': 'xml'}, *args)
def xml_write(mpath, filename, tree):
""" Write XML file according to filename and given tree """
import os.path
from xml.etree import ElementTree as ET
output_xml = ET.tostring(tree)
output_path = os.path.dirname(os.path.abspath(mpath))
fpath = u'%s/%s' % (output_path, filename)
with open(fpath, 'w') as xml_file:
xml_file.write(output_xml)

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import models

View File

@ -1,36 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{
'name': 'CRM Actions',
'summary': 'Action management, instead of new activity, in CRM',
'version': '10.0.1.3.5',
'category': 'Sales',
'author': 'Fabien BOURGEOIS - Yaltik',
'license': 'AGPL-3',
'installable': True,
'application': True,
'depends': ['crm', 'calendar'],
'data': ['views/crm_action_views.xml',
'views/crm_lead_views.xml',
'views/res_partner_views.xml',
'views/calendar_views.xml',
'security/ir.model.access.csv',
'security/ir_rule_data.xml',
'security/res_groups_data.xml',
'security/ir.model.access.csv'],
}

View File

@ -1,495 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * yaltik_crm_action
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-26 07:15+0000\n"
"PO-Revision-Date: 2017-11-26 07:15+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"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Action Type"
msgstr "Type d'action"
#. module: yaltik_crm_action
#: model:ir.actions.act_window,name:yaltik_crm_action.crm_action_type_action
#: model:ir.ui.menu,name:yaltik_crm_action.crm_action_type_menu
msgid "Action Types"
msgstr "Types d'action"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_action_count
#: model:ir.model.fields,field_description:yaltik_crm_action.field_res_partner_action_count
#: model:ir.model.fields,field_description:yaltik_crm_action.field_res_users_action_count
msgid "Action count"
msgstr "Nombre d'actions"
#. module: yaltik_crm_action
#: code:addons/yaltik_crm_action/models/res_partner.py:62
#: model:ir.actions.act_window,name:yaltik_crm_action.crm_action_action
#: model:ir.actions.act_window,name:yaltik_crm_action.crm_action_simple_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_action_ids
#: model:ir.ui.menu,name:yaltik_crm_action.crm_action_menu
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_calendar
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_leads_inherit_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_oppor_inherit_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_view_partners_form_inherit_yaltik_crm_action
#, python-format
msgid "Actions"
msgstr "Actions"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Actions done by me"
msgstr "Actions faites par moi"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_active
msgid "Active"
msgstr "Actif"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_tree
msgid "Back to Todo"
msgstr "Retour vers \"à faire\""
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_crm_action
msgid "CRM Action"
msgstr "CRM Action"
#. module: yaltik_crm_action
#: model:res.groups,name:yaltik_crm_action.group_crm_action_manager
msgid "CRM Action Manager"
msgstr "CRM Action Manager"
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_crm_action_type
msgid "CRM Action Type"
msgstr "CRM Action Type"
#. module: yaltik_crm_action
#: model:res.groups,name:yaltik_crm_action.group_crm_action_user
msgid "CRM Action User"
msgstr "CRM Action User"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_event_id
msgid "Calendar event"
msgstr "Calendar event"
#. module: yaltik_crm_action
#: selection:crm.action,state:0
msgid "Canceled"
msgstr "Annulée"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
msgid "Create linked event"
msgstr "Sauve et inclure l'action au calendrier"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_create_uid
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_create_date
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_create_date
msgid "Created on"
msgstr "Créé le"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_calendar_event_crm_action_ids
msgid "Crm action ids"
msgstr "Actions"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_partner_id
msgid "Customer"
msgstr "Client"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_date
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_next_action_date
msgid "Date"
msgstr "Date"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_details
msgid "Details"
msgstr "Détails"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_display_name
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_display_name
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_next_action_title
msgid "Display Name"
msgstr "Nom affiché"
#. module: yaltik_crm_action
#: selection:crm.action,state:0
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Done"
msgstr "Terminée"
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_calendar_event
msgid "Event"
msgstr "Évènement"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Group By"
msgstr "Grouper par"
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "High"
msgstr "Haute"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_id
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_id
msgid "ID"
msgstr "ID"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action___last_update
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type___last_update
msgid "Last Modified on"
msgstr "Dernière Modification le"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_write_uid
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_write_date
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_lead_id
msgid "Lead"
msgstr "Piste/Opportunité"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
msgid "Lead for this action, depends on partner"
msgstr "Piste/Opporutnité pour cette action, dépend du client sélectionné"
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_crm_lead
msgid "Lead/Opportunity"
msgstr "Piste/opportunité"
#. module: yaltik_crm_action
#: code:addons/yaltik_crm_action/models/crm_action.py:100
#, python-format
msgid "Linked event"
msgstr "Événement lié"
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "Low"
msgstr "Faible"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_tree
msgid "Mark as Done"
msgstr "Marquer comme terminé"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_leads_inherit_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_oppor_inherit_crm_action
msgid "Mark next action as done"
msgstr "Marquer la prochaine action comme terminée"
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "Medium"
msgstr "Moyen"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "My Actions"
msgstr "Mes Actions"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_action_type_name
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_name
msgid "Name"
msgstr "Nom"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_next_action_id
msgid "Next Action"
msgstr "Action suivante"
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "Not evaluated"
msgstr "Non évalué"
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_res_partner
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Partner"
msgstr "Partenaire"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_calendar_event_partner_location_id
msgid "Partner location"
msgstr "Adresse du partenaire"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_priority
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_priority
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Priority"
msgstr "Priorité"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_parent_id
msgid "Related Company"
msgstr "Société liée"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
msgid "Remove linked event"
msgstr "Retirer l'événement du calendrier"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_type_search
msgid "Search Action Types"
msgstr "Chercher des types d'action"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Search Actions"
msgstr "Cherher dans les actions"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "State"
msgstr "État"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_state
msgid "Status"
msgstr "État"
#. module: yaltik_crm_action
#: selection:crm.action,state:0
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo"
msgstr "À faire"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo Today"
msgstr "À faire aujourd'hui"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo within 30 days"
msgstr "À faire dans les 30 jours"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo within 7 days"
msgstr "À faire dans les 7 jours"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_action_type_id
msgid "Type"
msgstr "Type"
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Urgent"
msgstr "Urgent"
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_user_id
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "User"
msgstr "Utilisateur"
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Week"
msgstr "Semaine"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_lead_action_activities
#: model:ir.ui.menu,name:crm.crm_lead_menu_activities
msgid "Next Activities"
msgstr "Actions"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_lead_next_activity_id
#: model:ir.ui.view,arch_db:crm.crm_lead_view_tree_activity
msgid "Next Activity"
msgstr "Action suivante"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_activity_log_date_action
#: model:ir.model.fields,field_description:crm.field_crm_lead_date_action
msgid "Next Activity Date"
msgstr "Date de la prochaine action"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_lead_title_action
msgid "Next Activity Summary"
msgstr "Résumé d'action suivant"
#. module: crm
#: code:addons/crm/wizard/crm_activity_log.py:61
#, python-format
msgid "Next activity"
msgstr "Action suivante"
#. module: crm
#: selection:crm.lead,kanban_state:0
msgid "Next activity is planned"
msgstr "Action suivante planifiée"
#. module: crm
#: selection:crm.lead,kanban_state:0
msgid "Next activity late"
msgstr "Action suivante en retard"
#. module: crm
#: model:ir.ui.view,arch_db:crm.view_crm_case_opportunities_filter
msgid "Overdue Activities"
msgstr "Actions en retard"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_activity_preceding_activity_ids
msgid "Preceding Activities"
msgstr "Actions précédentes"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_activity_log_last_activity_id
msgid "Previous Activity"
msgstr "Action précédente"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_activity_log_recommended_activity_id
msgid "Recommended Activities"
msgstr "Actions recommandées"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_activity_recommended_activity_ids
msgid "Recommended Next Activities"
msgstr "Actions suivantes recommandées"
#. module: crm
#: model:ir.ui.view,arch_db:crm.crm_activity_log_view_form_schedule
msgid "Schedule Activity"
msgstr "Planifier une action"
#. module: crm
#: model:ir.ui.view,arch_db:crm.crm_activity_log_view_form_schedule
msgid "Schedule Next Activity"
msgstr "Planifier l'action suivante"
#. module: crm
#: model:ir.ui.view,arch_db:crm.view_crm_case_opportunities_filter
msgid "This Week Activities"
msgstr "Actions de cette Semaine"
#. module: crm
#: model:ir.ui.view,arch_db:crm.view_crm_case_opportunities_filter
msgid "Today Activities"
msgstr "Actions du Jour"
#. module: crm
#: model:ir.ui.view,arch_db:crm.crm_activity_log_view_form_schedule
msgid "<strong>Recommended activities:</strong>"
msgstr "<strong>Actions recommandées :</strong>"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_activity_schedule_action
msgid "Schedule an Activity"
msgstr "Planifier une action"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_opportunity_report_nbr_activities
msgid "# of Activities"
msgstr "Nb. d'actions"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_activity_action
#: model:ir.model.fields,field_description:crm.field_res_partner_activities_count
#: model:ir.model.fields,field_description:crm.field_res_users_activities_count
#: model:ir.ui.menu,name:crm.crm_activity_menu
#: model:ir.ui.menu,name:crm.crm_activity_report_menu
#: model:ir.ui.view,arch_db:crm.crm_activity_view_form
#: model:ir.ui.view,arch_db:crm.crm_activity_view_tree
#: model:ir.ui.view,arch_db:crm.view_partners_form_crm1
msgid "Activities"
msgstr "Actions"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_activity_report_action
#: model:ir.actions.act_window,name:crm.crm_activity_report_action_team
#: model:ir.ui.view,arch_db:crm.crm_activity_report_view_graph
#: model:ir.ui.view,arch_db:crm.crm_activity_report_view_pivot
#: model:ir.ui.view,arch_db:crm.crm_activity_report_view_search
#: model:ir.ui.view,arch_db:crm.crm_team_salesteams_view_kanban
msgid "Activities Analysis"
msgstr "Analyse des actions"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_res_users_target_sales_done
msgid "Activities Done Target"
msgstr "Objectif des actions terminées"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_activity_log_next_activity_id
#: model:ir.model.fields,field_description:crm.field_crm_activity_report_subtype_id
msgid "Activity"
msgstr "Action"
#. module: crm
#: code:addons/crm/wizard/crm_activity_log.py:80
#, python-format
msgid "Activity Done"
msgstr "Action Terminée"
#. module: crm
#: model:ir.model.fields,field_description:crm.field_crm_lead_kanban_state
msgid "Activity State"
msgstr "Status de l'Action"
#. module: crm
#: model:ir.ui.view,arch_db:crm.crm_case_form_view_oppor
msgid "Log Activity"
msgstr "Enregistrer une Action"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_activity_log_action
#: model:ir.model,name:crm.model_crm_activity_log
#: model:ir.ui.view,arch_db:crm.crm_activity_log_view_form
msgid "Log an Activity"
msgstr "Enregistrer une Action"

View File

@ -1,339 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * yaltik_crm_action
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-26 07:15+0000\n"
"PO-Revision-Date: 2017-11-26 07:15+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: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Action Type"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.actions.act_window,name:yaltik_crm_action.crm_action_type_action
#: model:ir.ui.menu,name:yaltik_crm_action.crm_action_type_menu
msgid "Action Types"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_action_count
#: model:ir.model.fields,field_description:yaltik_crm_action.field_res_partner_action_count
#: model:ir.model.fields,field_description:yaltik_crm_action.field_res_users_action_count
msgid "Action count"
msgstr ""
#. module: yaltik_crm_action
#: code:addons/yaltik_crm_action/models/res_partner.py:62
#: model:ir.actions.act_window,name:yaltik_crm_action.crm_action_action
#: model:ir.actions.act_window,name:yaltik_crm_action.crm_action_simple_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_action_ids
#: model:ir.ui.menu,name:yaltik_crm_action.crm_action_menu
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_calendar
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_leads_inherit_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_oppor_inherit_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_view_partners_form_inherit_yaltik_crm_action
#, python-format
msgid "Actions"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Actions done by me"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_active
msgid "Active"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_tree
msgid "Back to Todo"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_crm_action
msgid "CRM Action"
msgstr ""
#. module: yaltik_crm_action
#: model:res.groups,name:yaltik_crm_action.group_crm_action_manager
msgid "CRM Action Manager"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_crm_action_type
msgid "CRM Action Type"
msgstr ""
#. module: yaltik_crm_action
#: model:res.groups,name:yaltik_crm_action.group_crm_action_user
msgid "CRM Action User"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_event_id
msgid "Calendar event"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,state:0
msgid "Canceled"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
msgid "Create linked event"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_create_uid
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_create_uid
msgid "Created by"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_create_date
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_create_date
msgid "Created on"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_calendar_event_crm_action_ids
msgid "Crm action ids"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_partner_id
msgid "Customer"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_date
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_next_action_date
msgid "Date"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_details
msgid "Details"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_display_name
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_display_name
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_next_action_title
msgid "Display Name"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,state:0
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Done"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_calendar_event
msgid "Event"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Group By"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "High"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_id
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_id
msgid "ID"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action___last_update
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type___last_update
msgid "Last Modified on"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_write_uid
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_write_uid
msgid "Last Updated by"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_write_date
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_write_date
msgid "Last Updated on"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_lead_id
msgid "Lead"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
msgid "Lead for this action, depends on partner"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_crm_lead
msgid "Lead/Opportunity"
msgstr ""
#. module: yaltik_crm_action
#: code:addons/yaltik_crm_action/models/crm_action.py:100
#, python-format
msgid "Linked event"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "Low"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_tree
msgid "Mark as Done"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_leads_inherit_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_case_form_view_oppor_inherit_crm_action
msgid "Mark next action as done"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "Medium"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "My Actions"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_action_type_name
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_name
msgid "Name"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_lead_next_action_id
msgid "Next Action"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
msgid "Not evaluated"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model,name:yaltik_crm_action.model_res_partner
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Partner"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_calendar_event_partner_location_id
msgid "Partner location"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_priority
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_type_priority
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Priority"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_parent_id
msgid "Related Company"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_form
msgid "Remove linked event"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_type_search
msgid "Search Action Types"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Search Actions"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "State"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_state
msgid "Status"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,state:0
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo Today"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo within 30 days"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Todo within 7 days"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_action_type_id
msgid "Type"
msgstr ""
#. module: yaltik_crm_action
#: selection:crm.action,priority:0
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Urgent"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.model.fields,field_description:yaltik_crm_action.field_crm_action_user_id
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "User"
msgstr ""
#. module: yaltik_crm_action
#: model:ir.ui.view,arch_db:yaltik_crm_action.crm_action_search
msgid "Week"
msgstr ""

View File

@ -1,27 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Migration script """
from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
""" Migration function : migrate Date date to datetime """
openupgrade.date_to_datetime_tz(env.cr, 'crm_action', 'user_id',
'date_bak', 'date')
openupgrade.drop_columns(env.cr, [('crm_action', 'date_bak')])

View File

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Migration script """
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
""" Migration function : copy old Date date to legacy column """
openupgrade.copy_columns(env.cr, {'crm_action': [('date', 'date_bak', None)]})

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import crm_action, crm_lead, res_partner, calendar_event

View File

@ -1,39 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Calendar Event adaptations """
from odoo import models, fields, api
class CalendarEvent(models.Model):
""" Calendar Event adaptations """
_inherit = 'calendar.event'
partner_location_id = fields.Many2one('res.partner', 'Partner location')
crm_action_ids = fields.One2many('crm.action', 'event_id')
@api.multi
def write(self, vals):
""" Ensures date action coherence """
super(CalendarEvent, self).write(vals)
if 'start' in vals:
for event in self:
if event.crm_action_ids:
event.crm_action_ids.write({'date': event.start})
return True

View File

@ -1,142 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" CRM Action """
from datetime import timedelta
from odoo import models, fields, api, _
class CrmAction(models.Model):
""" CRM Action """
_name = 'crm.action'
_description = 'CRM Action'
_rec_name = 'display_name'
display_name = fields.Char(compute='_compute_display_name', store=True)
state = fields.Selection([('draft', 'Todo'), ('done', 'Done'),
('cancel', 'Canceled')], string='Status',
required=True, default='draft')
priority = fields.Selection([('0', 'Not evaluated'), ('1', 'Low'),
('2', 'Medium'), ('3', 'High'),
('4', 'Urgent')],
default='0', index=True)
details = fields.Text()
partner_id = fields.Many2one('res.partner', string='Customer', index=True)
parent_id = fields.Many2one(related='partner_id.parent_id')
date = fields.Datetime(required=True, default=fields.Date.context_today)
user_id = fields.Many2one('res.users', string='User', required=True,
default=lambda self: self.env.user)
lead_id = fields.Many2one('crm.lead', string='Lead', ondelete='cascade')
event_id = fields.Many2one('calendar.event', 'Calendar event', ondelete='cascade',
copy=False)
action_type_id = fields.Many2one(
'crm.action.type', string='Type', required=True,
default=lambda self: self.env['crm.action.type'].search([], limit=1))
action_type_name = fields.Char(related='action_type_id.name')
@api.onchange('partner_id')
def onchange_partner(self):
""" If partner changes, adapts lead to False """
for action in self:
if action.partner_id and action.lead_id:
if action.lead_id.partner_id != action.partner_id:
action.lead_id = False
@api.depends('action_type_id.name', 'details')
def _compute_display_name(self):
for action in self:
details = u'...'
if action.details:
details = u' '.join(action.details.split()[:5]) + details
action.display_name = u'[{}]{}'.format(action.action_type_name,
details)
@api.multi
def set_to_draft(self):
""" Set actions to draft """
self.write({'state': 'draft'})
@api.multi
def set_to_done(self):
""" Set actions to done """
self.write({'state': 'done'})
@api.multi
def create_linked_event(self):
""" Creates a linked event """
for action in self:
if not action.event_id:
attendees = [action.user_id.partner_id.id]
if action.partner_id:
attendees.append(action.partner_id.id)
data = {'start': action.date,
'stop': action.date,
'duration': 1.0,
'allday': False,
'name': action.display_name,
'description': action.details,
'privacy': 'confidential',
'partner_ids': [(6, False, attendees)],
'partner_location_id': action.partner_id.id or False}
action.event_id = self.env['calendar.event'].create(data)
return {'type': 'ir.actions.act_window',
'name': _('Linked event'),
'res_model': 'calendar.event',
'res_id': action.event_id.id,
'view_mode': 'form',
'view_type': 'form',
'flags': {'initial_mode': 'edit'}}
@api.multi
def remove_linked_event(self):
""" Removes linked event and deletes it """
for action in self:
if action.event_id:
event = action.event_id
action.event_id = False
event.unlink()
@api.multi
def write(self, vals):
""" Ensures date event and basic partner_id coherence """
super(CrmAction, self).write(vals)
for action in self:
if action.event_id:
if action.event_id.start != action.date:
stop = fields.Datetime.from_string(action.date) + \
timedelta(hours=action.event_id.duration)
action.event_id.write({'start': action.date,
'stop': fields.Datetime.to_string(stop)})
if action.partner_id and \
action.partner_id not in action.event_id.partner_ids:
action.event_id.partner_ids |= action.partner_id
return True
class CrmActionType(models.Model):
""" CRM Action Type """
_name = 'crm.action.type'
_description = 'CRM Action Type'
_order = 'priority'
name = fields.Char(required=True)
priority = fields.Integer(required=True, default=0)
active = fields.Boolean(default=True)

View File

@ -1,58 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" CRM Lead adaptations """
from odoo import models, fields, api
class CrmLead(models.Model):
""" CRM Lead adaptations """
_inherit = 'crm.lead'
action_count = fields.Char(compute='_compute_action_count')
action_ids = fields.One2many('crm.action', 'lead_id', string='Actions')
next_action_id = fields.Many2one('crm.action', string='Next Action',
compute='_compute_next_action', store=True)
next_action_date = fields.Datetime(related='next_action_id.date', store=True)
next_action_title = fields.Char(related='next_action_id.display_name', store=True)
@api.multi
def _compute_action_count(self):
""" Count actions """
for lead in self:
action_count = len(lead.action_ids)
draft_count = len(lead.action_ids.filtered(
lambda self: self.state == 'draft'))
lead.action_count = u'{} / {}'.format(draft_count, action_count)
@api.depends('action_ids.date', 'action_ids.display_name', 'action_ids.state')
def _compute_next_action(self):
""" Computes next action """
for lead in self:
domain = ['&', ('lead_id', '=', lead.id), ('state', '=', 'draft')]
action = self.env['crm.action'].search(domain, order='date', limit=1)
lead.next_action_id = action or False
@api.multi
def next_action_done(self):
""" Mark next action as done """
self.ensure_one()
lead = self[0]
if lead.next_action_id:
lead.next_action_id.set_to_done()

View File

@ -1,62 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""" Partner adaptations """
from odoo import models, fields, api, _
class ResPartner(models.Model):
""" Partner adaptations """
_inherit = 'res.partner'
action_count = fields.Char(compute='_compute_action_count')
@api.multi
def _compute_action_count(self):
for partner in self:
domain = [('partner_id', '=', partner.id)]
if partner.parent_id or partner.child_ids:
domain.insert(0, '|')
if partner.parent_id:
domain.append(('partner_id', '=', partner.parent_id.id))
elif partner.child_ids:
domain.append(('partner_id', 'in', partner.child_ids.ids))
action_count = self.env['crm.action'].search_count(domain)
if action_count:
domain.append(('state', '=', 'draft'))
draft_count = self.env['crm.action'].search_count(domain)
else:
draft_count = 0
partner.action_count = u'{} / {}'.format(draft_count, action_count)
@api.multi
def partner_actions(self):
""" Return action for active partner and its parent and childs """
self.ensure_one()
partner = self[0]
parent_id = partner.parent_id.id if partner.parent_id else partner.id
domain = [('partner_id', 'child_of', parent_id)]
return {'type': 'ir.actions.act_window',
'name': _('Actions'),
'view_mode': 'tree,form,calendar',
'res_model': 'crm.action',
'context': {'default_partner_id': partner.id,
'search_default_draft_only': 1},
'domain': domain}

View File

@ -1,5 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_crm_action_user,CRM Action User,model_crm_action,sales_team.group_sale_salesman,1,1,1,0
access_crm_action_manager,CRM Action Manager,model_crm_action,sales_team.group_sale_manager,1,1,1,1
access_crm_action_type_user,CRM Action Type User,model_crm_action_type,base.group_user,1,0,0,0
access_crm_action_type_manager,CRM Action Type Manager,model_crm_action_type,sales_team.group_sale_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_crm_action_user CRM Action User model_crm_action sales_team.group_sale_salesman 1 1 1 0
3 access_crm_action_manager CRM Action Manager model_crm_action sales_team.group_sale_manager 1 1 1 1
4 access_crm_action_type_user CRM Action Type User model_crm_action_type base.group_user 1 0 0 0
5 access_crm_action_type_manager CRM Action Type Manager model_crm_action_type sales_team.group_sale_manager 1 1 1 1

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data noupdate="1">
<record id="crm_rule_personal_action" model="ir.rule">
<field name="name">Personal CRM Actions</field>
<field ref="model_crm_action" name="model_id" />
<field name="domain_force">['|', ('lead_id.user_id', '=', user.id), ('user_id', '=', user.id)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>
<record id="crm_rule_all_action" model="ir.rule">
<field name="name">All CRM Actions</field>
<field ref="model_crm_action" name="model_id" />
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman_all_leads'))]"/>
</record>
</data>
</odoo>

View File

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data noupdate="1">
<record id="group_crm_action_user" model="res.groups">
<field name="name">CRM Action User</field>
<field name="category_id"
ref="base.module_category_sales_management" />
</record>
<record id="group_crm_action_manager" model="res.groups">
<field name="name">CRM Action Manager</field>
<field name="category_id"
ref="base.module_category_sales_management" />
<field name="users" eval="[(4, ref('base.user_root'))]"/>
<field name="implied_ids" eval="[(4, ref('group_crm_action_user'))]" />
</record>
<record id="sales_team.group_sale_salesman" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_crm_action_user'))]" />
</record>
</data>
</odoo>

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Forms -->
<record id="calendar_form" model="ir.ui.view">
<field name="name">CRM Action calendar adaptations</field>
<field name="model">calendar.event</field>
<field name="inherit_id" ref="calendar.view_calendar_event_form" />
<field name="arch" type="xml">
<field name="location" position="before">
<field name="partner_location_id" options="{'no_create': True}" />
</field>
<field name="location" position="attributes">
<attribute name="attrs">{'readonly': [('partner_location_id', '!=', False)]}</attribute>
</field>
</field>
</record>
</data>
</odoo>

View File

@ -1,201 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Forms -->
<record id="crm_action_form" model="ir.ui.view">
<field name="name">CRM Action Form</field>
<field name="model">crm.action</field>
<field name="arch" type="xml">
<form string="Actions">
<header>
<button name="create_linked_event" string="Create linked event"
type="object" class="oe_highlight"
attrs="{'invisible': ['|', (['event_id', '!=', False]),
('state', '=', 'cancel')]}" />
<button name="remove_linked_event" string="Remove linked event"
type="object" class="oe_highlight"
attrs="{'invisible': [(['event_id', '=', False])]}" />
<field name="state" widget="statusbar" clickable="1" />
</header>
<sheet>
<group>
<field name="action_type_id" />
<field name="date" />
<field name="event_id" readonly="1"
attrs="{'invisible': [('event_id', '=', False)]}" />
<field name="priority" widget="priority" />
<field name="details" width="200" />
<field name="partner_id" />
<field name="parent_id" invisible="1" />
<field name="lead_id"
domain="['|', ('partner_id', '=', partner_id), ('partner_id', '=', parent_id)]"
help="Lead for this action, depends on partner" />
<field name="user_id" />
</group>
</sheet>
</form>
</field>
</record>
<record id="crm_action_type_form" model="ir.ui.view">
<field name="name">CRM Action Type Form</field>
<field name="model">crm.action.type</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<field name="name" />
<field name="priority" />
<field name="active" />
</group>
</sheet>
</form>
</field>
</record>
<!-- Trees -->
<record id="crm_action_tree" model="ir.ui.view">
<field name="name">CRM Action Tree</field>
<field name="model">crm.action</field>
<field name="arch" type="xml">
<tree colors="red:date &lt; current_date and state=='draft';blue:date &gt;= current_date and state=='draft';gray: state == 'cancel'">
<field name="action_type_id" />
<field name="priority" />
<field name="date" />
<field name="lead_id" />
<field name="partner_id" />
<field name="user_id" />
<button icon="fa-check" name="set_to_done" type="object"
string="Mark as Done" states="draft" />
<button icon="fa-undo" name="set_to_draft" type="object"
string="Back to Todo" states="done" />
<field name="state" />
</tree>
</field>
</record>
<record id="crm_action_type_tree" model="ir.ui.view">
<field name="name">CRM Action Type Tree</field>
<field name="model">crm.action.type</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name"/>
<field name="priority"/>
<field name="active"/>
</tree>
</field>
</record>
<!-- Calendars -->
<record id="crm_action_calendar" model="ir.ui.view">
<field name="name">CRM Action Calendar</field>
<field name="model">crm.action</field>
<field name="arch" type="xml">
<calendar string="Actions" color="user_id" date_start="date">
<field name="partner_id" />
<field name="display_name" />
</calendar>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="crm_action_search">
<field name="name">Search adaptations</field>
<field name="model">crm.action</field>
<field name="arch" type="xml">
<search string="Search Actions">
<field name="lead_id" />
<field name="partner_id" />
<field name="date" />
<field name="user_id" />
<separator/>
<filter string="Todo" name="draft_only"
domain="[('state', '=', 'draft')]"/>
<filter string="Done" name="done_only"
domain="[('state', '=', 'done')]"/>
<separator />
<filter name="urgent" string="Urgent"
domain="[('priority', '=', '4')]" />
<separator/>
<filter string="Todo Today" name="todo_today"
domain="[('state', '=', 'draft'), ('date', '&lt;=', context_today().strftime('%Y-%m-%d'))]" />
<filter name="todo_week" string="Todo within 7 days"
domain="[('state', '=', 'draft'), ('date', '&lt;=', (context_today() + datetime.timedelta(days=7)).strftime('%Y-%m-%d'))]" />
<filter name="todo_month" string="Todo within 30 days"
domain="[('state', '=', 'draft'), ('date', '&lt;=', (context_today() + datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]" />
<separator/>
<filter string="My Actions" name="user_me"
domain="[('user_id', '=', uid)]" help="Actions done by me" />
<group string="Group By" name="groupby">
<filter name="state_groupby" string="State"
context="{'group_by': 'state'}" />
<filter name="priority_groupby" string="Priority"
context="{'group_by': 'priority'}" />
<filter name="partner_groupby" string="Partner"
context="{'group_by': 'partner_id'}" />
<filter name="user_groupby" string="User"
context="{'group_by': 'user_id'}" />
<filter name="action_type_id_groupby" string="Action Type"
context="{'group_by': 'action_type_id'}" />
<filter name="date_groupby" string="Week"
context="{'group_by': 'date:week'}"/>
</group>
</search>
</field>
</record>
<record id="crm_action_type_search" model="ir.ui.view">
<field name="name">CRM Action Type Search</field>
<field name="model">crm.action.type</field>
<field name="arch" type="xml">
<search string="Search Action Types">
<field name="name" />
</search>
</field>
</record>
<!-- Actions -->
<record model="ir.actions.act_window" id="crm_action_action">
<field name="name">Actions</field>
<field name="res_model">crm.action</field>
<field name="view_mode">tree,form,calendar</field>
<field name="context">{'search_default_draft_only': 1, 'search_default_user_me': 1}</field>
</record>
<record id="crm_action_type_action" model="ir.actions.act_window">
<field name="name">Action Types</field>
<field name="res_model">crm.action.type</field>
<field name="view_mode">tree</field>
</record>
<!-- Menus -->
<record id="crm.crm_activity_menu" model="ir.ui.menu">
<field name="active">0</field>
</record>
<record id="crm.crm_lead_menu_activities" model="ir.ui.menu">
<field name="active">0</field>
</record>
<menuitem id="crm_action_menu" name="Actions"
parent="sales_team.menu_sales" sequence="5" action="crm_action_action" />
<menuitem id="crm_action_type_menu" name="Action Types"
action="crm_action_type_action" sequence="0"
parent="crm.menu_crm_config_lead" />
</data>
</odoo>

View File

@ -1,139 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Actions -->
<act_window id="crm_action_simple_action" name="Actions"
res_model="crm.action" view_mode="tree,form,calendar" />
<!-- Form -->
<!-- Lead and opp only : next action creation... -->
<record model="ir.ui.view" id="crm_case_form_view_leads_inherit_crm_action">
<field name="name">CRM Lead Form adaptations</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_leads" />
<field name="arch" type="xml">
<!-- Actions in button box -->
<div class="oe_button_box" position="inside">
<button class="oe_inline oe_stat_button" type="action" icon="fa-list"
name="%(crm_action_simple_action)d"
context="{'search_default_lead_id': active_id, 'search_default_user_me': 0}">
<field string="Actions" name="action_count" widget="statinfo" />
</button>
</div>
<!-- Next action -->
<label for="contact_name" position="before">
<label for="next_action_id" />
<div class="oe_row">
<field name="next_action_date"
attrs="{'invisible': [('next_action_id', '=', False)]}" /><br />
<field name="next_action_id"
attrs="{'invisible': [('next_action_id', '=', False)]}" />
<button name="next_action_done" type="object"
icon="fa-check" class="oe_inline" help="Mark next action as done"
attrs="{'invisible': [('next_action_id', '=', False)]}"/>
</div>
</label>
</field>
</record>
<record model="ir.ui.view" id="crm_case_form_view_oppor_inherit_crm_action">
<field name="name">Opportunity form adaptations</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor" />
<field name="arch" type="xml">
<!-- Actions in button box -->
<div class="oe_button_box" position="inside">
<button class="oe_inline oe_stat_button" icon="fa-list" type="action"
name="%(crm_action_simple_action)d"
context="{'search_default_lead_id': active_id, 'search_default_user_me': 0}">
<field string="Actions" name="action_count" widget="statinfo" />
</button>
</div>
<!-- Replace group of native activities -->
<xpath expr="//sheet/group[1]/group[2]" position="replace">
<group>
<label for="next_action_id" />
<div class="oe_row">
<field name="next_action_id"
attrs="{'invisible': [('next_action_id', '=', False)]}" />
<button name="next_action_done" type="object" class="oe_inline"
help="Mark next action as done" icon="fa-check"
attrs="{'invisible': [('next_action_id', '=', False)]}" />
</div>
</group>
</xpath>
<!-- Hide activity logging -->
<button name="%(crm.crm_activity_log_action)d" position="attributes">
<attribute name="invisible">True</attribute>
</button>
</field>
</record>
<!-- Kanbans -->
<record id="crm_case_kanban_view_leads_inherit_crm_action" model="ir.ui.view">
<field name="name">CRM Lead Kanban adaptations</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_kanban_view_leads" />
<field name="arch" type="xml">
<xpath expr="//a[@name='%(crm.crm_activity_log_action)d']"
position="attributes">
<attribute name="name">%(crm_action_simple_action)d</attribute>
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//a[@name='%(crm.crm_activity_schedule_action)d']"
position="attributes">
<attribute name="name">%(crm_action_simple_action)d</attribute>
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
<!-- Trees -->
<record id="crm_case_form_view_lead_inherit_crm_action" model="ir.ui.view" >
<field name="name">CRM Lead Tree Activity adaptations</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_lead_view_tree_activity" />
<field name="arch" type="xml">
<field name="next_activity_id" position="replace">
<field name="next_action_id" />
</field>
</field>
</record>
<!-- Searches -->
<record id="crm_case_opp_search_inherit_cmr_action" model="ir.ui.view" >
<field name="name">CRM Opportunity Search adaptations</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.view_crm_case_opportunities_filter" />
<field name="arch" type="xml">
<field name="next_activity_id" position="replace">
<field name="next_action_id" />
</field>
<filter name="today" position="replace"></filter>
<filter name="this_week" position="replace"></filter>
<filter name="overdue" position="replace"></filter>
</field>
</record>
</data>
</odoo>

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Form -->
<record id="crm_view_partners_form_inherit_yaltik_crm_action"
model="ir.ui.view">
<field name="name">CRM Partner form adaptations</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="crm.view_partners_form_crm1" />
<field name="arch" type="xml">
<button icon="fa-clock-o" position="replace">
<button class="oe_stat_button" type="object"
name="partner_actions" icon="fa-clock-o">
<field string="Actions" name="action_count" widget="statinfo" />
</button>
</button>
</field>
</record>
<!-- Overwrite actity opening -->
<delete id="crm.crm_activity_report_action_tree" model="ir.actions.act_window" />
<record model="ir.actions.server" id="crm.crm_activity_report_action_tree">
<field name="name">Actions</field>
<field name="model_id" ref="model_crm_action" />
<field name="state">code</field>
<field name="code">action = self.partner_actions()</field>
</record>
</data>
</odoo>

View File

@ -24,8 +24,8 @@ build:
.PHONY: prod
prod:
coconut --notco -t 2.7 -j sys -f .
coconut --notco -t 2.7 -j sys .
.PHONY: watch
watch:
coconut --strict -t 2.7 -j sys -w .
coconut -t 2.7 -j sys -w .

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2019-2024 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2019-2023 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -19,7 +19,7 @@
'name': 'Yaltik Odoo DSL base module and fns',
'summary': 'Yaltik Odoo Domain Specific Language base module and functions',
'description': """ Yaltik Odoo Domain Specific Language base module and functions """,
'version': '10.0.0.5.13',
'version': '8.0.0.5.5',
'category': 'Yaltik',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019-2024 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2019-2023 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -23,6 +23,7 @@ from .xml_base import xmlroot, xmln
# Odoo root XML Node
odoo = lambda children: xmlroot({'tag': 'odoo', 'attrs': {}, 'children': children})
openerp = lambda children: xmlroot({'tag': 'openerp', 'attrs': {}, 'children': children})
# Special data Node
def data(*args):
@ -39,7 +40,6 @@ delete = lambda *args: xmln('delete', *args)
form = lambda *args: xmln('form', *args)
tree = lambda *args: xmln('tree', *args)
search = lambda *args: xmln('search', *args)
template = lambda *args: xmln('template', *args)
# Actions
act_window = lambda *args: xmln('act_window', *args)
@ -90,21 +90,6 @@ p = lambda *args: xmln('p', *args)
i = lambda *args: xmln('i', *args)
t = lambda *args: xmln('t', *args)
div = lambda *args: xmln('div', *args)
span = lambda *args: xmln('span', *args)
br = lambda *args: xmln('br', *args)
h1 = lambda *args: xmln('h1', *args)
h2 = lambda *args: xmln('h1', *args)
h3 = lambda *args: xmln('h1', *args)
h4 = lambda *args: xmln('h1', *args)
h5 = lambda *args: xmln('h1', *args)
ul = lambda *args: xmln('ul', *args)
li = lambda *args: xmln('li', *args)
label = lambda *args: xmln('label', *args)
strong = lambda *args: xmln('strong', *args)
small = lambda *args: xmln('small', *args)
table = lambda *args: xmln('table', *args)
tr = lambda *args: xmln('tr', *args)
td = lambda *args: xmln('td', *args)
notebook = lambda *args: xmln('notebook', *args)
page = lambda *args: xmln('page', *args)
xpath = lambda *args: xmln('xpath', *args)