diff --git a/sale_calc_discount_b2c/models/sale.py b/sale_calc_discount_b2c/models/sale.py index b98c2ee..6de5048 100644 --- a/sale_calc_discount_b2c/models/sale.py +++ b/sale_calc_discount_b2c/models/sale.py @@ -22,7 +22,7 @@ class SaleOrderOrderLine(models.Model): if line.discount: price_disc = taxes['total_excluded'] * (1 - (line.discount or 0.0) / 100.0) 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({ 'price_tax': sum(t.get('amount', 0.0) for t in taxes.get('taxes', [])), diff --git a/stock_picking_deposito/README.rst b/stock_picking_deposito/README.rst new file mode 100644 index 0000000..9699469 --- /dev/null +++ b/stock_picking_deposito/README.rst @@ -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 `_ + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Akim Juillerat + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_picking_deposito/__init__.py b/stock_picking_deposito/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/stock_picking_deposito/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_picking_deposito/__manifest__.py b/stock_picking_deposito/__manifest__.py new file mode 100644 index 0000000..e78ac10 --- /dev/null +++ b/stock_picking_deposito/__manifest__.py @@ -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", + ], +} diff --git a/stock_picking_deposito/models/__init__.py b/stock_picking_deposito/models/__init__.py new file mode 100644 index 0000000..ae4c272 --- /dev/null +++ b/stock_picking_deposito/models/__init__.py @@ -0,0 +1 @@ +from . import stock_picking diff --git a/stock_picking_deposito/models/stock_picking.py b/stock_picking_deposito/models/stock_picking.py new file mode 100644 index 0000000..d346dc9 --- /dev/null +++ b/stock_picking_deposito/models/stock_picking.py @@ -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', + ) + diff --git a/stock_picking_deposito/views/stock_picking.xml b/stock_picking_deposito/views/stock_picking.xml new file mode 100644 index 0000000..2863c97 --- /dev/null +++ b/stock_picking_deposito/views/stock_picking.xml @@ -0,0 +1,25 @@ + + + + + + stock.picking.form.deposito.inherit + + stock.picking + + + + + + + +