Skip to content

Commit

Permalink
Merge 0aa4902 into bd43a41
Browse files Browse the repository at this point in the history
  • Loading branch information
Viggor committed Sep 4, 2015
2 parents bd43a41 + 0aa4902 commit 78e9806
Show file tree
Hide file tree
Showing 42 changed files with 4,269 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ bin/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
Expand All @@ -22,6 +23,12 @@ var/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand All @@ -48,9 +55,14 @@ coverage.xml
# Rope
.ropeproject

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# Backup files
*~
*.swp
# PyBuilder
target/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -658,4 +658,4 @@ specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.
64 changes: 64 additions & 0 deletions sms_send_picking/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

SMS send picking
===========

This module provide a cron and a method to automaticly sending a SMS when a
picking delivery is ready to transfert


Configuration
=============

You can configure the verification time in the scheduled action.

Usage
=====

To use this module, you need to:

* have a gateway correctly configured
* put some picking delivery in ready to transfert state

For further information, please visit:

* https://www.odoo.com/forum/help-1

Known issues / Roadmap
======================

* ...

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/{project_repo}/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/{project_repo}/issues/new?body=module:%20{module_name}%0Aversion:%20{version}%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.


Credits
=======

Contributors
------------

* Valentin Chemiere <valentin.chemiere@akretion.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.

1 change: 1 addition & 0 deletions sms_send_picking/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock
39 changes: 39 additions & 0 deletions sms_send_picking/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Module for Odoo
# Copyright (C) 2015 Akretion (http://www.akretion.com).
# @author Valentin CHEMIERE <valentin.chemiere@akretion.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': 'Sms Send Picking',
'version': '0.0.1',
'author': 'Akretion, Odoo Community Association (OCA)',
'website': 'www.akretion.com',
'license': 'AGPL-3',
'category': 'Phone',
'depends': [
'stock',
'smsclient_core',
],
'data': [
'cron.xml'
],
'installable': True,
'application': False,
}
15 changes: 15 additions & 0 deletions sms_send_picking/cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<record id="ir_cron_send_sms_picking_action" model="ir.cron">
<field name="name">Auto Send SMS Picking Ready</field>
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'stock.picking'" name="model"/>
<field eval="'_send_sms'" name="function"/>
<field eval="'()'" name="args"/>
</record>
</data>
</openerp>
33 changes: 33 additions & 0 deletions sms_send_picking/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sms_send_picking
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-04 13:28+0000\n"
"PO-Revision-Date: 2015-09-04 13:28+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: sms_send_picking
#: model:ir.model,name:sms_send_picking.model_stock_picking
msgid "Picking List"
msgstr "Opération de manutention"

#. module: sms_send_picking
#: field:stock.picking,sms_sent:0
msgid "Sms sent"
msgstr "Sms envoyé"

#. module: sms_send_picking
#: code:addons/sms_send_picking/stock.py:44
#, python-format
msgid "Your picking %s is ready to transfert"
msgstr "Votre commande %s est prète a être retiré"

49 changes: 49 additions & 0 deletions sms_send_picking/stock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
###############################################################################
#
# Module for Odoo
# Copyright (C) 2015 Akretion (http://www.akretion.com).
# @author Valentin CHEMIERE <valentin.chemiere@akretion.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 openerp import api, models, fields
from openerp.tools.translate import _


class StockPicking(models.Model):
_inherit = 'stock.picking'

sms_sent = fields.Boolean(default=False)

@api.model
def _send_sms(self):
sms_sender_obj = self.env['partner.sms.send']
gateways = self.env['sms.smsclient'].search([('default_gateway', '=',
True)], limit=1)
gateway = gateways[0]
pickings = self.env['stock.picking'].search(
[('state', '=', 'assigned'), ('sms_sent', '=', False),
('picking_type_id.code', '=', 'outgoing')])
for pick in pickings:
data = {
'gateway': gateway.id,
'text': _('Your picking %s is ready to transfert') % pick.name,
'mobile_to': pick.partner_id.phone,
}
sms_sender = sms_sender_obj.create(data)
sms_sender.sms_send()
pick.sms_sent = True
72 changes: 72 additions & 0 deletions smsclient_core/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

SMS client core
===========

This module provide base function to send sms. It not works in stand alone, it needs a least one provider module

Installation
============

To install this module, you need to:

* Install a provider module after

Configuration
=============

To configure this module, you need to:

* Configure your provider account

Usage
=====

To use this module, you need to:

* got to partner menu
* select on or multiple partner
* go to more and will found some wizards to send sms

For further information, please visit:

* https://www.odoo.com/forum/help-1

Known issues / Roadmap
======================


Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/{project_repo}/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/{project_repo}/issues/new?body=module:%20{module_name}%0Aversion:%20{version}%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.


Credits
=======

Contributors
------------

* Valentin Chemiere <valentin.chemiere@akretion.com>
* Yvan Party <yvan@julius.fr>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.

26 changes: 26 additions & 0 deletions smsclient_core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2013 Julius Network Solutions SARL <contact@julius.fr>
#
# 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 smsclient
from . import serveraction
from . import wizard
from . import smstemplate

0 comments on commit 78e9806

Please sign in to comment.