Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions stock_voucher_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.. |company| replace:: ADHOC SA

.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
:alt: ADHOC SA
:target: https://www.adhoc.com.ar

.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png

.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

======================
Stock Voucher Purchase
======================

#. This module adds stock voucher field on purchase order bill view.

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

To install this module, you need to:

#. Only need to install the module

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

To configure this module, you need to:

#. You don't need to configure anything, just install the module.

Usage
=====

To use this module, you need to:

#. Just create a purchase order, confirm, transfer the products and create a voucher.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: http://runbot.adhoc.com.ar/

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

Bugs are tracked on `GitHub Issues
<https://github.com/ingadhoc/stock/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
------

* |company| |icon|

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

Maintainer
----------

|company_logo|

This module is maintained by the |company|.

To contribute to this module, please visit https://www.adhoc.com.ar.
5 changes: 5 additions & 0 deletions stock_voucher_purchase/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import models
37 changes: 37 additions & 0 deletions stock_voucher_purchase/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# 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": "Stock Voucher - Purchase",
"version": "18.0.1.0.0",
"category": "Warehouse Management",
"summary": "Muestra remitos en la vista de conciliación de facturas de compra",
"author": "ADHOC SA",
"website": "www.adhoc.com.ar",
"license": "AGPL-3",
"images": [],
"depends": ["stock_voucher", "purchase_ux"],
"data": [
"views/purchase_bill_line_match_views.xml",
],
"demo": [],
"installable": True,
"auto_install": True,
"application": False,
}
5 changes: 5 additions & 0 deletions stock_voucher_purchase/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import purchase_bill_line_match
24 changes: 24 additions & 0 deletions stock_voucher_purchase/models/purchase_bill_line_match.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import api, fields, models


class PurchaseBillLineMatch(models.Model):
_inherit = "purchase.bill.line.match"

vouchers = fields.Char(
string="Remitos",
compute="_compute_vouchers",
)

@api.depends("pol_id.move_ids.picking_id.voucher_ids")
def _compute_vouchers(self):
for rec in self:
if rec.pol_id:
pickings = rec.pol_id.move_ids.mapped("picking_id")
names = pickings.mapped("voucher_ids.display_name")
rec.vouchers = ", ".join(names) if names else False
else:
rec.vouchers = False
13 changes: 13 additions & 0 deletions stock_voucher_purchase/views/purchase_bill_line_match_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="purchase_bill_line_match_tree" model="ir.ui.view">
<field name="name">purchase.bill.line.match.list.stock_voucher</field>
<field name="model">purchase.bill.line.match</field>
<field name="inherit_id" ref="purchase.purchase_bill_line_match_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='qty_invoiced']" position="after">
<field name="vouchers" string="Remitos" optional="show" readonly="1"/>
</xpath>
</field>
</record>
</odoo>
Loading