[wip] stock_picking_deposit para gestión de albaranes en depósito.
De momento sólo tiene un campo nuevo para marcar que ese albarán es un depósito.
This commit is contained in:
parent
9d4020cbb9
commit
16a72610f2
7 changed files with 155 additions and 1 deletions
|
@ -22,7 +22,7 @@ class SaleOrderOrderLine(models.Model):
|
||||||
if line.discount:
|
if line.discount:
|
||||||
price_disc = taxes['total_excluded'] * (1 - (line.discount or 0.0) / 100.0)
|
price_disc = taxes['total_excluded'] * (1 - (line.discount or 0.0) / 100.0)
|
||||||
ctx = dict(self.env.context, handle_price_include=False)
|
ctx = dict(self.env.context, handle_price_include=False)
|
||||||
taxes = line.tax_id.with_context(ctx).compute_all(price_disc, line.order_id.currency_id, line.product_uom_qty, product=line.product_id, partner=line.order_id.partner_shipping_id)
|
taxes = line.tax_id.with_context(ctx).compute_all(price_disc, line.order_id.currency_id, 1, product=line.product_id, partner=line.order_id.partner_shipping_id)
|
||||||
|
|
||||||
line.update({
|
line.update({
|
||||||
'price_tax': sum(t.get('amount', 0.0) for t in taxes.get('taxes', [])),
|
'price_tax': sum(t.get('amount', 0.0) for t in taxes.get('taxes', [])),
|
||||||
|
|
86
stock_picking_deposito/README.rst
Normal file
86
stock_picking_deposito/README.rst
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
=============================
|
||||||
|
Stock Picking Completion Info
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
|
!! changes will be overwritten. !!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
|
||||||
|
:target: https://odoo-community.org/page/development-status
|
||||||
|
:alt: Alpha
|
||||||
|
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
|
||||||
|
:target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_picking_completion_info
|
||||||
|
:alt: OCA/stock-logistics-warehouse
|
||||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
|
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_picking_completion_info
|
||||||
|
:alt: Translate me on Weblate
|
||||||
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
|
:target: https://runbot.odoo-community.org/runbot/153/12.0
|
||||||
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
|
This module adds completion information on stock picking.
|
||||||
|
|
||||||
|
If activated on the picking type, completion information is computed according
|
||||||
|
to the next chained pickings related to the stock moves of the actual picking.
|
||||||
|
|
||||||
|
In other words, if all the previous moves linked to the destination pickings
|
||||||
|
moves are done, the completion of the actual picking allows the destination
|
||||||
|
pickings to be processed. In such case, a ribbon will appear on the stock
|
||||||
|
picking form view, to inform the stock operator.
|
||||||
|
|
||||||
|
.. IMPORTANT::
|
||||||
|
This is an alpha version, the data model and design can change at any time without warning.
|
||||||
|
Only for development or testing purpose, do not use in production.
|
||||||
|
`More details on development status <https://odoo-community.org/page/development-status>`_
|
||||||
|
|
||||||
|
**Table of contents**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/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 <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_picking_completion_info%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Authors
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
* Camptocamp
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Akim Juillerat <akim.juillerat@camptocamp.com>
|
||||||
|
|
||||||
|
Maintainers
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_picking_completion_info>`_ project on GitHub.
|
||||||
|
|
||||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
1
stock_picking_deposito/__init__.py
Normal file
1
stock_picking_deposito/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
from . import models
|
20
stock_picking_deposito/__manifest__.py
Normal file
20
stock_picking_deposito/__manifest__.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Copyright 2021 Criptomart
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
||||||
|
{
|
||||||
|
"name": "Stock Picking Depósito",
|
||||||
|
"summary": "",
|
||||||
|
"version": "12.0.1.0.0",
|
||||||
|
"development_status": "Alpha",
|
||||||
|
"category": "Warehouse Management",
|
||||||
|
"website": "https://criptomart.net",
|
||||||
|
"author": "Criptomart",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
"depends": [
|
||||||
|
"stock",
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
"views/stock_picking.xml",
|
||||||
|
],
|
||||||
|
}
|
1
stock_picking_deposito/models/__init__.py
Normal file
1
stock_picking_deposito/models/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
from . import stock_picking
|
21
stock_picking_deposito/models/stock_picking.py
Normal file
21
stock_picking_deposito/models/stock_picking.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Copyright 2021 Criptomart SLL
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
|
from odoo import api, models, fields
|
||||||
|
|
||||||
|
"""
|
||||||
|
class PickingType(models.Model):
|
||||||
|
|
||||||
|
_inherit = 'stock.picking.type'
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
class StockPicking(models.Model):
|
||||||
|
|
||||||
|
_inherit = 'stock.picking'
|
||||||
|
|
||||||
|
is_deposit = fields.Boolean(
|
||||||
|
string='Es un Depósito',
|
||||||
|
help='Éste albarán es un depósito, no una compra final',
|
||||||
|
)
|
||||||
|
|
25
stock_picking_deposito/views/stock_picking.xml
Normal file
25
stock_picking_deposito/views/stock_picking.xml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
<!-- <record id="view_picking_type_form_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">Operation Types inherit</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_picking_type_form" />
|
||||||
|
<field name="model">stock.picking.type</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="show_reserved" position="after">
|
||||||
|
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record> -->
|
||||||
|
|
||||||
|
<record id="view_picking_form_deposito_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.picking.form.deposito.inherit</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||||
|
<field name="model">stock.picking</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="partner_id" position="before">
|
||||||
|
<field name="is_deposit"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
Loading…
Add table
Reference in a new issue