Skip to content

Commit

Permalink
Merge pull request #226 from incaser/sale_service_project
Browse files Browse the repository at this point in the history
[ADD][8.0] sale_service_project: New module.
  • Loading branch information
rafaelbn committed Feb 23, 2016
2 parents ed961f4 + a250f02 commit 181d953
Show file tree
Hide file tree
Showing 27 changed files with 1,702 additions and 0 deletions.
1 change: 1 addition & 0 deletions oca_dependencies.txt
Expand Up @@ -2,3 +2,4 @@ stock-logistics-workflow
stock-logistics-transport
account-closing
server-tools
project
86 changes: 86 additions & 0 deletions sale_service_project/README.rst
@@ -0,0 +1,86 @@
.. 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

====================
Sale Service Project
====================

This module helps you to manage task created from sales order, let you choose
if you wants to invoice from sale order or from task, and helps you to control
with sale order must be invoiced or not depending if the task have been done or
not.
This module adds the option to assign materials and/or works to a service
product type which serve as a template transferring this information to the
line order which may be changed.
This module extends the functionality of the *sale_service* module creating a
new project for each order adding materials and works informed on the order
line to the generated task.

Usage
=====

To use this module, you need to:

#. Go to Sales -> Products and create a product with type Service, check also
option 'Create task automatically'.
Now you can add task works and materials for this product.
You can compute the total price based in all materials and task works
assigned. In the wizard you must select the product that has assigned
price's work hour.
#. Go to Sales -> Sales Orders and create new with a service product with works
or/and materials which can be modified in each line.
#. Print Sale Order to view the new detailed report. If you don't want detail,
you can disable *Print materials and works*.
#. Assign a Analytic Account or check *invoice_on_timesheets* in Other
Information tab. (Default value to this field is the same that analytic
account have assigned, but it can be modified. In the new project created,
the invoice_on_timesheets field will have same value that the Sale Order.)
If invoice_on_timesheets field is checked this SO will be invoiced from
tasks or analytic lines.
#. Confirm Sale Order. A new child project will be created and assigned to the
Sale Order.
#. Manage the task/s created and invoice when task is closed.


.. 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

For further information, please visit:

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

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
`here <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_service_project%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======

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

* Rafael Blasco <rafabn@antiun.com>
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* Carlos Dauden <carlos@incaser.es>
* Sergio Teruel <sergio@incaser.es>

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.
8 changes: 8 additions & 0 deletions sale_service_project/__init__.py
@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Sergio Teruel
# © 2015 Antiun Ingeniería S.L. - Carlos Dauden
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
from . import wizard
from . import tests
36 changes: 36 additions & 0 deletions sale_service_project/__openerp__.py
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Sergio Teruel
# © 2015 Antiun Ingeniería S.L. - Carlos Dauden
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
'name': "Sale Service Project",
'category': 'Sales',
'version': '8.0.1.0.0',
'depends': [
'project_task_materials',
'sale_service',
'project_timesheet',
'hr_timesheet_invoice'],
'demo': [
'data/sale_service_project_demo.xml',
],
'data': [
'views/sale_service_view.xml',
'views/sale_service_project_view.xml',
'views/sale_view.xml',
'views/account_invoice_view.xml',
'views/project_view.xml',
'views/report_saleorder.xml',
'views/report_invoice.xml',
'wizard/product_price_service_view.xml',
'security/ir.model.access.csv',
],
'author': 'Antiun Ingeniería S.L., '
'Incaser Informatica S.L., '
'Odoo Community Association (OCA)',
'website': 'http://www.antiun.com',
'license': 'AGPL-3',
'installable': True,
'images': [],
}
85 changes: 85 additions & 0 deletions sale_service_project/data/sale_service_project_demo.xml
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">

<!-- Products -->
<record id="product_product_oil" model="product.product">
<field name="name">Synthetic Oil</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="list_price">10.0</field>
<field name="standard_price">6.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
<field name="default_code">Oil5w40</field>
</record>

<record id="product_product_filter" model="product.product">
<field name="name">Filter Oil</field>
<field name="categ_id" ref="product.product_category_4"/>
<field name="list_price">10.0</field>
<field name="standard_price">6.0</field>
<field name="type">consu</field>
<field name="uom_id" ref="product.product_uom_unit"/>
<field name="uom_po_id" ref="product.product_uom_unit"/>
<field name="default_code">filter01</field>
</record>

<record id="product_template_revision_1" model="product.template">
<field name="list_price">45.0</field>
<field name="standard_price">15.0</field>
<field name="uom_id" ref="product.product_uom_hour"/>
<field name="uom_po_id" ref="product.product_uom_hour"/>
<field name="name">Complete Revision</field>
<field name="categ_id" ref="product.product_category_all"/>
<field name="type">service</field>
<field name="sale_ok" eval="True"/>
<field name="auto_create_task" eval="True"/>
</record>

<record id="product_task_work_oil" model="product.task.work">
<field name="name">Change Oil</field>
<field name="hours">1.0</field>
<field name="product_id" ref="sale_service_project.product_template_revision_1"/>
</record>

<record id="product_task_work_filter" model="product.task.work">
<field name="name">Change Filter</field>
<field name="product_id" ref="sale_service_project.product_template_revision_1"/>
<field name="hours">1.0</field>
</record>

<record id="product_task_materials_oil" model="product.task.materials">
<field name="product_id" ref="sale_service_project.product_template_revision_1"/>
<field name="material_id" ref="sale_service_project.product_product_oil"/>
<field name="quantity">1.0</field>
</record>

<record id="product_task_materials_filter" model="product.task.materials">
<field name="product_id" ref="sale_service_project.product_template_revision_1"/>
<field name="material_id" ref="sale_service_project.product_product_filter"/>
<field name="quantity">1.0</field>
</record>

<record id="project_revisions" model="project.project">
<field name="date_start" eval="time.strftime('%Y-%m-01 10:00:00')"/>
<field name="state">open</field>
<field name="type">contract</field>
<field name="name">Revisions</field>
<field name="color">3</field>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="parent_id" ref="project.all_projects_account"/>
<field name="privacy_visibility">public</field>
<field name="members" eval="[(6, 0, [
ref('base.user_root'),
ref('base.user_demo')])]"/>
<field name="user_id" ref="base.user_demo"/>
<field name="description">Fleet Revisions.</field>
<field name="alias_model">project.task</field>
<field name="invoice_on_timesheets" eval="True"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>
</record>

</data>
</openerp>

0 comments on commit 181d953

Please sign in to comment.