Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
567 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
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import sale | ||
from . import account_invoice |
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,33 @@ | ||
# Copyright 2017 Tecnativa - Vicent Cubells | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_inherit = 'account.invoice' | ||
|
||
customer_signature = fields.Binary( | ||
string='Customer acceptance', | ||
attachment=True) | ||
|
||
@api.model | ||
def create(self, values): | ||
invoice = super(AccountInvoice, self).create(values) | ||
if invoice.customer_signature: | ||
values = {'customer_signature': invoice.customer_signature} | ||
invoice._track_signature(values, 'customer_signature') | ||
# Get SO signature | ||
if invoice.origin: | ||
so_id = self.env['sale.order'].search([('name', | ||
'=', | ||
invoice.origin)], | ||
limit=1) | ||
if so_id.customer_signature: | ||
invoice.customer_signature = so_id.customer_signature | ||
return invoice | ||
|
||
@api.multi | ||
def write(self, values): | ||
self._track_signature(values, 'customer_signature') | ||
return super(AccountInvoice, self).write(values) |
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"?> | ||
<odoo> | ||
|
||
<template id="report_invoice_document" | ||
inherit_id="account.report_invoice_document"> | ||
<xpath expr="//p[@name='note']" position="after"> | ||
<p> | ||
<strong>Customer acceptance:</strong> | ||
<span t-if="o.customer_signature"> | ||
<img class="image" | ||
t-att-src="'data:image/png;base64,%s' % to_text(o.customer_signature)" | ||
style="border:auto;"/> | ||
</span> | ||
</p> | ||
</xpath> | ||
</template> | ||
|
||
</odoo> |
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,34 @@ | ||
<?xml version="1.0" ?> | ||
<odoo> | ||
|
||
<!-- Customer Invoice Form View --> | ||
<record id="view_invoice_form_signature" model="ir.ui.view"> | ||
<field name="name">view_invoice_form_signature</field> | ||
<field name="model">account.invoice</field> | ||
<field name="inherit_id" ref="account.invoice_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='comment']" position="after"> | ||
<div class="oe_clear"/> | ||
<label for="customer_signature" string='Customer Signature' | ||
class="oe_edit_only"/> | ||
<field name="customer_signature" widget="signature"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<!-- Vendor Bill Form View --> | ||
<record id="view_invoice_supplier_form_signature" model="ir.ui.view"> | ||
<field name="name">view_invoice_supplier_form_signature</field> | ||
<field name="model">account.invoice</field> | ||
<field name="inherit_id" ref="account.invoice_supplier_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='comment']" position="after"> | ||
<div class="oe_clear"/> | ||
<label for="customer_signature" string='Customer Signature' | ||
class="oe_edit_only"/> | ||
<field name="customer_signature" widget="signature"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
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,84 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
==================== | ||
Sale Tier Validation | ||
==================== | ||
|
||
This module extends the functionality of Sale Orders to support a tier | ||
validation process. | ||
|
||
Installation | ||
============ | ||
|
||
This module depends on ``base_tier_validation``. You can find it at | ||
`OCA/server-ux <https://github.com/OCA/server-ux>`_ | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
#. Go to *Settings > Technical > Tier Validations > Tier Definition*. | ||
#. Create as many tiers as you want for Sale Order model. | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Create a Sale Order triggering at least one "Tier Definition". | ||
#. Click on *Request Validation* button. | ||
#. Under the tab *Reviews* have a look to pending reviews and their statuses. | ||
#. Once all reviews are validated click on *Confirm Order*. | ||
|
||
Additional features: | ||
|
||
* You can filter the SOs requesting your review through the filter *Needs my | ||
Review*. | ||
* User with rights to confirm the SO (validate all tiers that would | ||
be generated) can directly do the operation, this is, there is no need for | ||
her/him to request a validation. | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/142/11.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 smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Mayank Gosai <mgosai@opensourceintegrators.com> | ||
|
||
Do not contact contributors directly about support or help with 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,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
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 @@ | ||
# Copyright 2019 Open Source Integrators | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Sale Tier Validation", | ||
"summary": "Extends the functionality of Sale Orders to " | ||
"support a tier validation process.", | ||
"version": "12.0.1.0.0", | ||
"category": "Sale", | ||
"website": "https://github.com/OCA/sale-workflow", | ||
"author": "Open Source Integrators, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"depends": [ | ||
"sale", | ||
"base_tier_validation", | ||
], | ||
"data": [ | ||
"views/sale_order_view.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,91 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_tier_validation | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"SO-Revision-Date: 2019-05-08 12:03+0000\n" | ||
"Last-Translator: Enric Tobella <etobella@creublanca.es>\n" | ||
"Language-Team: none\n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
"X-Generator: Weblate 3.5.1\n" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "" | ||
"<i class=\"fa fa-info-circle\"/>This SO needs to be\n" | ||
" validated." | ||
msgstr "" | ||
"<i class=\"fa fa-info-circle\"/>Esta SO debe ser\n" | ||
" validada." | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "<i class=\"fa fa-thumbs-down\"/> Operation has been <b>rejected</b>." | ||
msgstr "<i class=\"fa fa-thumbs-down\"/>La operación ha sido <b>rechazada</b>." | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "<i class=\"fa fa-thumbs-up\"/> Operation has been <b>validated</b>!" | ||
msgstr "<i class=\"fa fa-thumbs-up\"/>La operación ha sido <b>validada</b>!" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "My sales to review" | ||
msgstr "Mis Compras a revisar" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "Needs my Review" | ||
msgstr "Necesita mi Revisión" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "SOs validated and ready to be confirmed" | ||
msgstr "SOs validadas y preparadas para ser confirmadas" | ||
|
||
#. module: sale_tier_validation | ||
#: model:ir.model,name:sale_tier_validation.model_sale_order | ||
msgid "sale Order" | ||
msgstr "Orden de Compra" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Reject" | ||
msgstr "Rechazar" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Request Validation" | ||
msgstr "Solicitar Validación" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Restart Validation" | ||
msgstr "Reiniciar Validación" | ||
|
||
#. module: sale_tier_validation | ||
#: model:ir.model,name:sale_tier_validation.model_tier_definition | ||
#, fuzzy | ||
#| msgid "tier.definition" | ||
msgid "Tier Definition" | ||
msgstr "tier.definition" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Validate" | ||
msgstr "Validar" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "Validated" | ||
msgstr "Validada" | ||
|
||
#~ msgid "Reviews" | ||
#~ msgstr "Revisiones" |
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,81 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_tier_validation | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \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_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "<i class=\"fa fa-info-circle\"/>This SO needs to be\n" | ||
" validated." | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "<i class=\"fa fa-thumbs-down\"/> Operation has been <b>rejected</b>." | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "<i class=\"fa fa-thumbs-up\"/> Operation has been <b>validated</b>!" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "My Purchases to review" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "Needs my Review" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "SOs validated and ready to be confirmed" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model:ir.model,name:sale_tier_validation.model_sale_order | ||
msgid "Sale Order" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Reject" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Request Validation" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Restart Validation" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model:ir.model,name:sale_tier_validation.model_tier_definition | ||
msgid "Tier Definition" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.sale_order_form | ||
msgid "Validate" | ||
msgstr "" | ||
|
||
#. module: sale_tier_validation | ||
#: model_terms:ir.ui.view,arch_db:sale_tier_validation.view_sale_order_filter | ||
msgid "Validated" | ||
msgstr "" | ||
|
Oops, something went wrong.