Skip to content

Commit

Permalink
[MIG]sale_manual_delivery to v12
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronHForgeFlow committed Nov 8, 2019
1 parent 0b40582 commit 651413a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 24 deletions.
18 changes: 9 additions & 9 deletions sale_manual_delivery/README.rst
Expand Up @@ -13,20 +13,20 @@ Sale Manual Delivery
.. |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%2Fserver--auth-lightgray.png?logo=github
:target: https://github.com/OCA/server-auth/tree/11.0/sale_manual_delivery
:alt: OCA/server-auth
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/12.0/sale_manual_delivery
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-auth-11-0/server-auth-11-0-sale_manual_delivery
:target: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_manual_delivery
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/251/11.0
:target: https://runbot.odoo-community.org/runbot/167/12.0
:alt: Try me on Runbot

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

The goal of this module is to allow the manual creation of delivery slips. If activated,
a sale order won't direcly impact directly the stock. It will not make a reservation on the stock.
a sale order won't directly impact directly the stock. It will not make a reservation on the stock.
It allows the delivery and the impact on stock to be done manually when needed.
The goal is to be used on long term projects where not all the material is shipped at once.
As you make many shipments, every time you make a new delivery, you can choose an new carrier as well
Expand All @@ -47,10 +47,10 @@ Known issues / Roadmap
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_.
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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20sale_manual_delivery%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_manual_delivery%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.

Expand Down Expand Up @@ -81,6 +81,6 @@ 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/server-auth <https://github.com/OCA/server-auth/tree/11.0/sale_manual_delivery>`_ project on GitHub.
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/12.0/sale_manual_delivery>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 2 additions & 2 deletions sale_manual_delivery/__manifest__.py
Expand Up @@ -5,12 +5,12 @@
"category": "Sale",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
"version": "11.0.2.0.0",
"version": "12.0.2.0.0",
"website": "https://github.com/sale-workflow",
"summary": "Create manually your deliveries",
"depends": [
"delivery",
"sale",
"sale_stock",
"sales_team",
],
"data": [
Expand Down
4 changes: 2 additions & 2 deletions sale_manual_delivery/models/sale_order_line.py
Expand Up @@ -22,13 +22,13 @@ class SaleOrderLine(models.Model):
string='There is Pending qty to add to a delivery')

@api.multi
def _action_launch_procurement_rule(self):
def _action_launch_stock_rule(self):
for line in self:
if line.order_id.manual_delivery \
and line.product_id.type != "service":
return False
else:
return super()._action_launch_procurement_rule()
return super()._action_launch_stock_rule()

@api.depends('move_ids', 'move_ids.state', 'move_ids.location_id',
'move_ids.location_dest_id')
Expand Down
12 changes: 6 additions & 6 deletions sale_manual_delivery/static/description/index.html
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Sale Manual Delivery</title>
<style type="text/css">

Expand Down Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Sale Manual Delivery</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/server-auth/tree/11.0/sale_manual_delivery"><img alt="OCA/server-auth" src="https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-auth-11-0/server-auth-11-0-sale_manual_delivery"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/251/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/12.0/sale_manual_delivery"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_manual_delivery"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/167/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>The goal of this module is to allow the manual creation of delivery slips. If activated,
a sale order won’t direcly impact directly the stock. It will not make a reservation on the stock.
a sale order won’t directly impact directly the stock. It will not make a reservation on the stock.
It allows the delivery and the impact on stock to be done manually when needed.
The goal is to be used on long term projects where not all the material is shipped at once.
As you make many shipments, every time you make a new delivery, you can choose an new carrier as well
Expand Down Expand Up @@ -397,10 +397,10 @@ <h1><a class="toc-backref" href="#id1">Known issues / Roadmap</a></h1>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-auth/issues">GitHub Issues</a>.
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/server-auth/issues/new?body=module:%20sale_manual_delivery%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_manual_delivery%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -425,7 +425,7 @@ <h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-auth/tree/11.0/sale_manual_delivery">OCA/server-auth</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/12.0/sale_manual_delivery">OCA/sale-workflow</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions sale_manual_delivery/tests/test_manual_delivery.py
Expand Up @@ -2,7 +2,6 @@
from odoo.addons.sale.tests.test_sale_common import TestSale
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT as DF


class TestSaleStock(TestSale):
Expand Down Expand Up @@ -496,7 +495,7 @@ def test_03_sale_multi_delivery(self):
)
first_picking = self.so.picking_ids
self.assertEqual(
datetime.strptime(first_picking.scheduled_date, DF).replace(
first_picking.scheduled_date.replace(
hour=0, minute=0, second=0, microsecond=0
),
date_now,
Expand Down Expand Up @@ -531,7 +530,7 @@ def test_03_sale_multi_delivery(self):
)
second_picking = self.so.picking_ids - first_picking
self.assertEqual(
datetime.strptime(second_picking.scheduled_date, DF).replace(
second_picking.scheduled_date.replace(
hour=0, minute=0, second=0, microsecond=0
),
date_next_week,
Expand Down
4 changes: 2 additions & 2 deletions sale_manual_delivery/wizard/manual_proc.py
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import models, fields, api
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT, float_compare
from odoo.tools import float_compare
from odoo.exceptions import UserError
from odoo.tools.translate import _

Expand Down Expand Up @@ -105,7 +105,7 @@ def record_picking(self):
if not order_proc_group_to_use:
order_proc_group_to_use = order.procurement_group_id.\
copy({
'date_planned': date_planned,
'date_planned': date_planned,
})
proc_group_dict[order.id] = order_proc_group_to_use

Expand Down

0 comments on commit 651413a

Please sign in to comment.