Skip to content

Commit

Permalink
Merge b9df248 into ed961f4
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-teruel committed Feb 12, 2016
2 parents ed961f4 + b9df248 commit 47fa7e5
Show file tree
Hide file tree
Showing 27 changed files with 1,547 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
72 changes: 72 additions & 0 deletions sale_service_project/README.rst
@@ -0,0 +1,72 @@
.. 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 adds the option to assign materials and/or work 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:

1. Create a service product and check 'Create Task Automatically'.
2. Now you can add task works and materials for this product.
3. You can compute the total price based in all materials and task works
assigned.
4. Create sale order and assign an analytic account which will be parent of new
project.
If *invoice_on_timesheets* option is checked on analiytic account this sale
order will be invoiced from analytic lines. Otherwise sale order will be
invoiced normally.
5. When you confirm the sale order odoo will create a project and tasks.

.. 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 -*-
# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel
# (c) 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 -*-
# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel
# (c) 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 47fa7e5

Please sign in to comment.