-
-
Notifications
You must be signed in to change notification settings - Fork 992
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from hbrunn/sale_order_calendar_event
[ADD] sale_order_calendar_event
- Loading branch information
Showing
11 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
============================== | ||
Calendar events in sale orders | ||
============================== | ||
|
||
This module was written to allow users to attach calendar events to sale orders. | ||
Usually, this would be some appointments that play a role for working on the | ||
sale order. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. go to some sale order | ||
#. create an event there | ||
#. it will be linked to this sale order automatically and visible with the sale | ||
order filter in the agenda | ||
#. there's also a menu item `Sale order appointments` in the sale menu to allow | ||
quick access to those appointments | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/167/8.0 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/sale-workflow/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Holger Brunn <hbrunn@therp.nl> | ||
|
||
Do not contact contributors directly about help with questions or problems concerning this addon, but use the `community mailing list <mailto:community@mail.odoo.com>`_ or the `appropriate specialized mailinglist <https://odoo-community.org/groups>`_ for help, and the bug tracker linked in `Bug Tracker`_ above for technical issues. | ||
|
||
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 https://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Therp BV <http://therp.nl> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Therp BV <http://therp.nl> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Calendar events in sale orders", | ||
"version": "8.0.1.0.0", | ||
"author": "Therp BV,Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"category": "Sales Management", | ||
"summary": "Allows you to attach appointments related to sale orders to " | ||
"the order itself", | ||
"depends": [ | ||
'sale', | ||
'calendar', | ||
], | ||
"data": [ | ||
"views/menu.xml", | ||
"views/calendar_event.xml", | ||
'views/sale_order.xml', | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_calendar_event | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 8.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-10-13 14:23+0000\n" | ||
"PO-Revision-Date: 2016-10-13 14: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: sale_order_calendar_event | ||
#: view:sale.order:sale_order_calendar_event.view_order_form | ||
#: field:sale.order,calendar_event_ids:0 | ||
msgid "Appointments" | ||
msgstr "Afspraken" | ||
|
||
#. module: sale_order_calendar_event | ||
#: field:calendar.event,sale_order_id:0 | ||
msgid "Sale order" | ||
msgstr "Verkooporder" | ||
|
||
#. module: sale_order_calendar_event | ||
#: model:ir.actions.act_window,name:sale_order_calendar_event.action_sale_calendar | ||
#: model:ir.ui.menu,name:sale_order_calendar_event.menu_sale_calendar | ||
msgid "Sale order appointments" | ||
msgstr "Verkooporder agenda" | ||
|
||
#. module: sale_order_calendar_event | ||
#: view:calendar.event:sale_order_calendar_event.view_calendar_event_search | ||
msgid "Sale orders" | ||
msgstr "Verkooporders" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Therp BV <http://therp.nl> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from . import sale_order | ||
from . import calendar_event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Therp BV <http://therp.nl> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openerp import fields, models | ||
|
||
|
||
class CalendarEvent(models.Model): | ||
_inherit = 'calendar.event' | ||
|
||
sale_order_id = fields.Many2one('sale.order', string='Sale order') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Therp BV <http://therp.nl> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openerp import fields, models | ||
|
||
|
||
class SaleOrder(models.Model): | ||
_inherit = 'sale.order' | ||
|
||
calendar_event_ids = fields.One2many( | ||
'calendar.event', 'sale_order_id', string='Appointments') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<openerp> | ||
<data> | ||
<record id="view_calendar_event_search" model="ir.ui.view"> | ||
<field name="model">calendar.event</field> | ||
<field name="inherit_id" ref="calendar.view_calendar_event_search" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="." position="inside"> | ||
<field name="sale_order_id" /> | ||
<filter name="sale_orders" string="Sale orders" domain="[('sale_order_id', '!=', False)]" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
<record id="view_calendar_event_calendar" model="ir.ui.view"> | ||
<field name="model">calendar.event</field> | ||
<field name="inherit_id" ref="calendar.view_calendar_event_calendar" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="." position="inside"> | ||
<field name="sale_order_id" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
<record id="view_calendar_event_form" model="ir.ui.view"> | ||
<field name="model">calendar.event</field> | ||
<field name="inherit_id" ref="calendar.view_calendar_event_form" /> | ||
<field name="arch" type="xml"> | ||
<page string="Misc" position="inside"> | ||
<label for="sale_order_id" /> | ||
<field name="sale_order_id" /> | ||
</page> | ||
</field> | ||
</record> | ||
<record id="view_calendar_event_form_popup" model="ir.ui.view"> | ||
<field name="model">calendar.event</field> | ||
<field name="inherit_id" ref="calendar.view_calendar_event_form_popup" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//group" position="inside"> | ||
<group name="sale_order_calendar_event"> | ||
<field name="sale_order_id" /> | ||
</group> | ||
</xpath> | ||
</field> | ||
</record> | ||
</data> | ||
</openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<openerp> | ||
<data> | ||
<act_window | ||
id="action_sale_calendar" | ||
name="Sale order appointments" | ||
res_model="calendar.event" | ||
view_mode="calendar,tree,form,gantt" | ||
domain="[('sale_order_id', '!=', False)]" | ||
/> | ||
<menuitem | ||
id="menu_sale_calendar" | ||
action="action_sale_calendar" | ||
parent="base.menu_sales" | ||
sequence="100" | ||
/> | ||
</data> | ||
</openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<openerp> | ||
<data> | ||
<record id="view_order_form" model="ir.ui.view"> | ||
<field name="model">sale.order</field> | ||
<field name="inherit_id" ref="sale.view_order_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//notebook" position="inside"> | ||
<page name="sale_order_calendar_event" string="Appointments"> | ||
<field name="calendar_event_ids" context="{'default_partner_ids': message_follower_ids, 'default_name': name, 'default_start_datetime': time.strftime('%Y-%m-%d %H:00:00'), 'default_stop_datetime': time.strftime('%Y-%m-%d %H:00:00')}" /> | ||
</page> | ||
</xpath> | ||
</field> | ||
</record> | ||
</data> | ||
</openerp> |