Skip to content

Commit

Permalink
Merge PR #473 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by simahawk
  • Loading branch information
OCA-git-bot committed Apr 6, 2022
2 parents ce53945 + eeb17fb commit a329a0f
Show file tree
Hide file tree
Showing 44 changed files with 2,385 additions and 0 deletions.
116 changes: 116 additions & 0 deletions delivery_auto_refresh/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
=====================
Auto-refresh delivery
=====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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%2Fdelivery--carrier-lightgray.png?logo=github
:target: https://github.com/OCA/delivery-carrier/tree/13.0/delivery_auto_refresh
:alt: OCA/delivery-carrier
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/delivery-carrier-13-0/delivery-carrier-13-0-delivery_auto_refresh
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/99/13.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module automates the delivery price handling for the following cases:

* If you change any line in your draft sales order (SO), when saving, the
delivery price will be adjusted without having to click on "→ Set price".
* If specified in the system parameter, the delivery line can be also
auto-added when creating/saving.
* If you deliver a different quantity than the ordered one, the delivery price
is adjusted on the linked SO when the picking is transferred.

**Table of contents**

.. contents::
:local:

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

* Activate developer mode.
* Go to *Settings > Technical > Parameters > System Parameters*.
* Locate the setting with key "delivery_auto_refresh.auto_add_delivery_line"
or create a new one if not exists.
Put a non Falsy value (1, True...) if you want to add automatically the
delivery line on save.
* Locate the setting with key "delivery_auto_refresh.refresh_after_picking"
or create a new one if not exists.
Put a non Falsy value (1, True...) if you want to refresh delivery price
after transferring.
* Locate the setting with key "delivery_auto_refresh.auto_void_delivery_line"
or create a new one if it doesn't exists.
Put a non Falsy value (1, True...) if you want to void the delivery line
values (price, units ordered, units delivered) in the sale order when the
delivered picking is returned to refund prior to be invoiced.

Known issues / Roadmap
======================

* After confirming the sales order, the price of the delivery line (if exists)
will be only updated after the picking is transferred, but not when you
might modify the order lines.
* There can be some duplicate delivery unset/set for assuring that the refresh
is done on all cases.
* On multiple deliveries, second and successive pickings update the delivery
price, but you can't invoice the new delivery price.
* This is only working from user interface, as there's no way of making
compatible the auto-refresh intercepting create/write methods from sale order
lines.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/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/delivery-carrier/issues/new?body=module:%20delivery_auto_refresh%0Aversion:%2013.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
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* Tecnativa <https://www.tecnativa.com>:
* Pedro M. Baeza
* Vicent Cubells
* Carlos Roca

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/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/13.0/delivery_auto_refresh>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions delivery_auto_refresh/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions delivery_auto_refresh/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Auto-refresh delivery",
"summary": "Auto-refresh delivery price in sales orders",
"version": "14.0.1.0.0",
"category": "Delivery",
"website": "https://github.com/OCA/delivery-carrier",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["delivery"],
"data": ["data/ir_config_parameter.xml", "views/sale_order_views.xml"],
}
21 changes: 21 additions & 0 deletions delivery_auto_refresh/data/ir_config_parameter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="set_default_carrier" model="ir.config_parameter">
<field name="key">delivery_auto_refresh.set_default_carrier</field>
<field name="value">0</field>
</record>
<record id="default" model="ir.config_parameter">
<field name="key">delivery_auto_refresh.auto_add_delivery_line</field>
<field name="value">0</field>
</record>
<record id="default_refresh_after_picking" model="ir.config_parameter">
<field name="key">delivery_auto_refresh.refresh_after_picking</field>
<field name="value">0</field>
</record>
<record id="default_auto_void_delivery_line" model="ir.config_parameter">
<field name="key">delivery_auto_refresh.auto_void_delivery_line</field>
<field name="value">0</field>
</record>
</odoo>
48 changes: 48 additions & 0 deletions delivery_auto_refresh/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_auto_refresh
#
# Translators:
# OCA Transbot <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-13 03:45+0000\n"
"PO-Revision-Date: 2018-03-13 03:45+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\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"

#. module: delivery_auto_refresh
#: model:ir.model.fields,field_description:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Delivery Method"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model.fields,help:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Fill this field if you plan to invoice the shipping based on picking."
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_stock_picking
msgid "Transfer"
msgstr "Transferència"

#, fuzzy
#~ msgid "Sale Order"
#~ msgstr "Comandes de venda"
45 changes: 45 additions & 0 deletions delivery_auto_refresh/i18n/cs_CZ.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_auto_refresh
#
# Translators:
# Lukáš Spurný <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-13 03:45+0000\n"
"PO-Revision-Date: 2018-03-13 03:45+0000\n"
"Last-Translator: Lukáš Spurný <[email protected]>, 2018\n"
"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/"
"teams/23907/cs_CZ/)\n"
"Language: cs_CZ\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"

#. module: delivery_auto_refresh
#: model:ir.model.fields,field_description:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Delivery Method"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model.fields,help:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Fill this field if you plan to invoice the shipping based on picking."
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_stock_picking
msgid "Transfer"
msgstr "Převod"
48 changes: 48 additions & 0 deletions delivery_auto_refresh/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_auto_refresh
#
# Translators:
# OCA Transbot <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-13 03:45+0000\n"
"PO-Revision-Date: 2018-03-13 03:45+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\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"

#. module: delivery_auto_refresh
#: model:ir.model.fields,field_description:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Delivery Method"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model.fields,help:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Fill this field if you plan to invoice the shipping based on picking."
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_stock_picking
msgid "Transfer"
msgstr "Umbuchung"

#, fuzzy
#~ msgid "Sale Order"
#~ msgstr "Verkaufsauftrag"
39 changes: 39 additions & 0 deletions delivery_auto_refresh/i18n/delivery_auto_refresh.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_auto_refresh
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.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: delivery_auto_refresh
#: model:ir.model.fields,field_description:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Delivery Method"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model.fields,help:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Fill this field if you plan to invoice the shipping based on picking."
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_stock_picking
msgid "Transfer"
msgstr ""
49 changes: 49 additions & 0 deletions delivery_auto_refresh/i18n/el_GR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_auto_refresh
#
# Translators:
# OCA Transbot <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-13 03:45+0000\n"
"PO-Revision-Date: 2018-03-13 03:45+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2018\n"
"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/"
"el_GR/)\n"
"Language: el_GR\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"

#. module: delivery_auto_refresh
#: model:ir.model.fields,field_description:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Delivery Method"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model.fields,help:delivery_auto_refresh.field_sale_order__carrier_id
msgid "Fill this field if you plan to invoice the shipping based on picking."
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_sale_order_line
msgid "Sales Order Line"
msgstr ""

#. module: delivery_auto_refresh
#: model:ir.model,name:delivery_auto_refresh.model_stock_picking
msgid "Transfer"
msgstr ""

#, fuzzy
#~ msgid "Sale Order"
#~ msgstr "Εντολή Πώλησης"
Loading

0 comments on commit a329a0f

Please sign in to comment.