[12.0][MIG] stock_cycle_count: Migration to 12.0

This commit is contained in:
Bhavesh Odedra
2019-06-24 18:16:27 +05:30
committed by Mateu Griful
parent e8e20dc443
commit dcf10522b3
13 changed files with 83 additions and 82 deletions

View File

@@ -14,13 +14,13 @@ Stock Cycle Count
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github .. |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/11.0/stock_cycle_count :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_cycle_count
:alt: OCA/stock-logistics-warehouse :alt: OCA/stock-logistics-warehouse
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_cycle_count :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_cycle_count
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/153/11.0 :target: https://runbot.odoo-community.org/runbot/153/12.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@@ -104,6 +104,12 @@ Known issues / Roadmap
Changelog Changelog
========= =========
12.0.1.0.0 (2019-06-24)
~~~~~~~~~~~~~~~~~~~~~~~
* [MIG] Migrated to v12.
11.0.1.0.0 (2018-09-19) 11.0.1.0.0 (2018-09-19)
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
@@ -115,7 +121,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_. 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. 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 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_cycle_count%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_cycle_count%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. Do not contact contributors directly about support or help with technical issues.
@@ -132,6 +138,7 @@ Contributors
* Lois Rilo <lois.rilo@eficent.com> * Lois Rilo <lois.rilo@eficent.com>
* Jordi Ballester Alomar <jordi.ballester@eficent.com> * Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
Maintainers Maintainers
~~~~~~~~~~~ ~~~~~~~~~~~
@@ -154,6 +161,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-lreficent| |maintainer-lreficent|
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/11.0/stock_cycle_count>`_ project on GitHub. This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_cycle_count>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -5,7 +5,7 @@
"name": "Stock Cycle Count", "name": "Stock Cycle Count",
"summary": "Adds the capability to schedule cycle counts in a " "summary": "Adds the capability to schedule cycle counts in a "
"warehouse through different rules defined by the user.", "warehouse through different rules defined by the user.",
"version": "11.0.1.0.1", "version": "12.0.1.0.1",
"development_status": "Mature", "development_status": "Mature",
"maintainers": ["lreficent"], "maintainers": ["lreficent"],
"author": "Eficent, " "author": "Eficent, "

View File

@@ -4,7 +4,6 @@
from odoo import api, fields, models, _ from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError from odoo.exceptions import UserError, ValidationError
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from datetime import timedelta, datetime from datetime import timedelta, datetime
@@ -142,7 +141,7 @@ class StockCycleCountRule(models.Model):
@api.model @api.model
def _propose_cycle_count(self, date, location): def _propose_cycle_count(self, date, location):
cycle_count = { cycle_count = {
'date': date.strftime(DEFAULT_SERVER_DATETIME_FORMAT), 'date': fields.Datetime.from_string(date),
'location': location, 'location': location,
'rule_type': self 'rule_type': self
} }
@@ -160,10 +159,8 @@ class StockCycleCountRule(models.Model):
try: try:
period = self.periodic_count_period / \ period = self.periodic_count_period / \
self.periodic_qty_per_period self.periodic_qty_per_period
next_date = datetime.strptime( next_date = fields.Datetime.from_string(
latest_inventory_date, latest_inventory_date) + timedelta(days=period)
DEFAULT_SERVER_DATETIME_FORMAT) + timedelta(
days=period)
if next_date < datetime.today(): if next_date < datetime.today():
next_date = datetime.today() next_date = datetime.today()
except Exception as e: except Exception as e:

View File

@@ -40,8 +40,8 @@ class StockInventory(models.Model):
return True return True
@api.multi @api.multi
def action_done(self): def action_validate(self):
res = super(StockInventory, self).action_done() res = super(StockInventory, self).action_validate()
self._update_cycle_state() self._update_cycle_state()
return res return res

View File

@@ -3,7 +3,6 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models from odoo import api, fields, models
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from datetime import datetime, timedelta from datetime import datetime, timedelta
import logging import logging
@@ -40,8 +39,7 @@ class StockWarehouse(models.Model):
@api.model @api.model
def _get_cycle_count_locations_search_domain( def _get_cycle_count_locations_search_domain(
self, parent): self, parent):
domain = [('parent_left', '>=', parent.parent_left), domain = [('parent_path', '=like', parent.parent_path + '%'),
('parent_right', '<=', parent.parent_right),
('cycle_count_disabled', '=', False)] ('cycle_count_disabled', '=', False)]
return domain return domain
@@ -104,19 +102,22 @@ class StockWarehouse(models.Model):
if existing_cycle_counts: if existing_cycle_counts:
existing_earliest_date = sorted( existing_earliest_date = sorted(
existing_cycle_counts.mapped('date_deadline'))[0] existing_cycle_counts.mapped('date_deadline'))[0]
if (cycle_count_proposed['date'] < existing_earliest_date = fields.Date.from_string(
existing_earliest_date)
cycle_count_proposed_date = fields.Date.from_string(
cycle_count_proposed['date'])
if (cycle_count_proposed_date <
existing_earliest_date): existing_earliest_date):
cc_to_update = existing_cycle_counts.search([ cc_to_update = existing_cycle_counts.search([
('date_deadline', '=', existing_earliest_date) ('date_deadline', '=', existing_earliest_date)
]) ])
cc_to_update.write({ cc_to_update.write({
'date_deadline': cycle_count_proposed['date'], 'date_deadline': cycle_count_proposed_date,
'cycle_count_rule_id': cycle_count_proposed[ 'cycle_count_rule_id': cycle_count_proposed[
'rule_type'].id, 'rule_type'].id,
}) })
delta = datetime.strptime( delta = (fields.Datetime.from_string(
cycle_count_proposed['date'], cycle_count_proposed['date']) - datetime.today())
DEFAULT_SERVER_DATETIME_FORMAT) - datetime.today()
if not existing_cycle_counts and \ if not existing_cycle_counts and \
delta.days < rec.cycle_count_planning_horizon: delta.days < rec.cycle_count_planning_horizon:
cc_vals = self._prepare_cycle_count( cc_vals = self._prepare_cycle_count(

View File

@@ -1,2 +1,3 @@
* Lois Rilo <lois.rilo@eficent.com> * Lois Rilo <lois.rilo@eficent.com>
* Jordi Ballester Alomar <jordi.ballester@eficent.com> * Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>

View File

@@ -1,3 +1,9 @@
12.0.1.0.0 (2019-06-24)
~~~~~~~~~~~~~~~~~~~~~~~
* [MIG] Migrated to v12.
11.0.1.0.0 (2018-09-19) 11.0.1.0.0 (2018-09-19)
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -7,6 +7,7 @@ from odoo import api, models
class LocationAccuracyReport(models.AbstractModel): class LocationAccuracyReport(models.AbstractModel):
_name = "report.stock_location_accuracy" _name = "report.stock_location_accuracy"
_description = "Location Accuracy Report"
@api.model @api.model
def _get_inventory_domain(self, loc_id, exclude_sublocation=True): def _get_inventory_domain(self, loc_id, exclude_sublocation=True):

View File

@@ -5,8 +5,8 @@
<odoo> <odoo>
<template id="report_cyclecount"> <template id="report_cyclecount">
<t t-call="report.html_container"> <t t-call="web.html_container">
<t t-call="report.internal_layout"> <t t-call="web.internal_layout">
<div class="page"> <div class="page">
<table class="table table-condensed"> <table class="table table-condensed">

View File

@@ -6,9 +6,9 @@
<!-- Templates --> <!-- Templates -->
<template id="stock_location_accuracy"> <template id="stock_location_accuracy">
<t t-call="report.html_container"> <t t-call="web.html_container">
<t t-foreach="docs" t-as="doc"> <t t-foreach="docs" t-as="doc">
<t t-call="report.external_layout"> <t t-call="web.external_layout">
<div class="page"> <div class="page">
<div class="oe_structure"/> <div class="oe_structure"/>
<h3> <h3>

View File

@@ -3,13 +3,13 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <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.12: http://docutils.sourceforge.net/" />
<title>Stock Cycle Count</title> <title>Stock Cycle Count</title>
<style type="text/css"> <style type="text/css">
/* /*
:Author: David Goodger (goodger@python.org) :Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $ :Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
:Copyright: This stylesheet has been placed in the public domain. :Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils. Default cascading style sheet for the HTML output of Docutils.
@@ -37,14 +37,6 @@ table.borderless td, table.borderless th {
.hidden { .hidden {
display: none } display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref { a.toc-backref {
text-decoration: none ; text-decoration: none ;
color: black } color: black }
@@ -169,12 +161,12 @@ h2.subtitle {
hr.docutils { hr.docutils {
width: 75% } width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left { img.align-left, .figure.align-left, object.align-left {
clear: left ; clear: left ;
float: left ; float: left ;
margin-right: 1em } margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right { img.align-right, .figure.align-right, object.align-right {
clear: right ; clear: right ;
float: right ; float: right ;
margin-left: 1em } margin-left: 1em }
@@ -185,11 +177,6 @@ img.align-center, .figure.align-center, object.align-center {
margin-right: auto; margin-right: auto;
} }
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left { .align-left {
text-align: left } text-align: left }
@@ -207,15 +194,6 @@ div.align-right {
/* div.align-center * { */ /* div.align-center * { */
/* text-align: left } */ /* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple { ol.simple, ul.simple {
margin-bottom: 1em } margin-bottom: 1em }
@@ -367,7 +345,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/stock-logistics-warehouse/tree/11.0/stock_cycle_count"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_cycle_count"><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/153/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="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.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/stock-logistics-warehouse/tree/12.0/stock_cycle_count"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_cycle_count"><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/153/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module provides the capability to execute a cycle count strategy in a <p>This module provides the capability to execute a cycle count strategy in a
warehouse through different rules defined by the user. Cycle count is an warehouse through different rules defined by the user. Cycle count is an
alternative to full wall-to-wall physical inventories in which little alternative to full wall-to-wall physical inventories in which little
@@ -387,35 +365,36 @@ production in the warehouse.</li>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
<ul class="simple"> <ul class="simple">
<li><a class="reference internal" href="#installation" id="id2">Installation</a><ul> <li><a class="reference internal" href="#installation" id="id3">Installation</a><ul>
<li><a class="reference internal" href="#recommendations" id="id3">Recommendations</a></li> <li><a class="reference internal" href="#recommendations" id="id4">Recommendations</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#configuration" id="id4">Configuration</a></li> <li><a class="reference internal" href="#configuration" id="id5">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id5">Usage</a></li> <li><a class="reference internal" href="#usage" id="id6">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id6">Known issues / Roadmap</a></li> <li><a class="reference internal" href="#known-issues-roadmap" id="id7">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#changelog" id="id7">Changelog</a><ul> <li><a class="reference internal" href="#changelog" id="id8">Changelog</a><ul>
<li><a class="reference internal" href="#id1" id="id8">11.0.1.0.0 (2018-09-19)</a></li> <li><a class="reference internal" href="#id1" id="id9">12.0.1.0.0 (2019-06-24)</a></li>
<li><a class="reference internal" href="#id2" id="id10">11.0.1.0.0 (2018-09-19)</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#bug-tracker" id="id9">Bug Tracker</a></li> <li><a class="reference internal" href="#bug-tracker" id="id11">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id10">Credits</a><ul> <li><a class="reference internal" href="#credits" id="id12">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id11">Authors</a></li> <li><a class="reference internal" href="#authors" id="id13">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id12">Contributors</a></li> <li><a class="reference internal" href="#contributors" id="id14">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id13">Maintainers</a></li> <li><a class="reference internal" href="#maintainers" id="id15">Maintainers</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<div class="section" id="installation"> <div class="section" id="installation">
<h1><a class="toc-backref" href="#id2">Installation</a></h1> <h1><a class="toc-backref" href="#id3">Installation</a></h1>
<p>To install this module, you need to:</p> <p>To install this module, you need to:</p>
<ul class="simple"> <ul class="simple">
<li>Download this module to your addons path.</li> <li>Download this module to your addons path.</li>
<li>Install the module in your database.</li> <li>Install the module in your database.</li>
</ul> </ul>
<div class="section" id="recommendations"> <div class="section" id="recommendations">
<h2><a class="toc-backref" href="#id3">Recommendations</a></h2> <h2><a class="toc-backref" href="#id4">Recommendations</a></h2>
<p>It is highly recommended to use this module in conjunction with:</p> <p>It is highly recommended to use this module in conjunction with:</p>
<ul class="simple"> <ul class="simple">
<li><tt class="docutils literal">stock_inventory_verification_request</tt>: Adds the capability to request Slot <li><tt class="docutils literal">stock_inventory_verification_request</tt>: Adds the capability to request Slot
@@ -425,7 +404,7 @@ Verifications.</li>
</div> </div>
</div> </div>
<div class="section" id="configuration"> <div class="section" id="configuration">
<h1><a class="toc-backref" href="#id4">Configuration</a></h1> <h1><a class="toc-backref" href="#id5">Configuration</a></h1>
<p>You can configure the rules to compute the cycle count, acting as follow:</p> <p>You can configure the rules to compute the cycle count, acting as follow:</p>
<ol class="arabic simple"> <ol class="arabic simple">
<li>Go to <em>Inventory &gt; Configuration &gt; Cycle Count Rules</em>.</li> <li>Go to <em>Inventory &gt; Configuration &gt; Cycle Count Rules</em>.</li>
@@ -437,7 +416,7 @@ set a <em>Cycle Count Planning Horizon</em> for each warehouse.</li>
</ol> </ol>
</div> </div>
<div class="section" id="usage"> <div class="section" id="usage">
<h1><a class="toc-backref" href="#id5">Usage</a></h1> <h1><a class="toc-backref" href="#id6">Usage</a></h1>
<p>Once you have some rules configured for your warehouses, you can proceed as <p>Once you have some rules configured for your warehouses, you can proceed as
is described below.</p> is described below.</p>
<ol class="arabic simple"> <ol class="arabic simple">
@@ -454,7 +433,7 @@ Inventory Adjustment.</li>
</ol> </ol>
</div> </div>
<div class="section" id="known-issues-roadmap"> <div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id6">Known issues / Roadmap</a></h1> <h1><a class="toc-backref" href="#id7">Known issues / Roadmap</a></h1>
<ul class="simple"> <ul class="simple">
<li>Assess the possibility to refactor <cite>action_compute_cycle_count_rules</cite> method <li>Assess the possibility to refactor <cite>action_compute_cycle_count_rules</cite> method
converting some of the searches to actual fields. E.g. converting some of the searches to actual fields. E.g.
@@ -462,39 +441,46 @@ converting some of the searches to actual fields. E.g.
</ul> </ul>
</div> </div>
<div class="section" id="changelog"> <div class="section" id="changelog">
<h1><a class="toc-backref" href="#id7">Changelog</a></h1> <h1><a class="toc-backref" href="#id8">Changelog</a></h1>
<div class="section" id="id1"> <div class="section" id="id1">
<h2><a class="toc-backref" href="#id8">11.0.1.0.0 (2018-09-19)</a></h2> <h2><a class="toc-backref" href="#id9">12.0.1.0.0 (2019-06-24)</a></h2>
<ul class="simple">
<li>[MIG] Migrated to v12.</li>
</ul>
</div>
<div class="section" id="id2">
<h2><a class="toc-backref" href="#id10">11.0.1.0.0 (2018-09-19)</a></h2>
<ul class="simple"> <ul class="simple">
<li>[MIG] Migrated to v11. Start of history.</li> <li>[MIG] Migrated to v11. Start of history.</li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id9">Bug Tracker</a></h1> <h1><a class="toc-backref" href="#id11">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_cycle_count%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/stock-logistics-warehouse/issues/new?body=module:%20stock_cycle_count%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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
<h1><a class="toc-backref" href="#id10">Credits</a></h1> <h1><a class="toc-backref" href="#id12">Credits</a></h1>
<div class="section" id="authors"> <div class="section" id="authors">
<h2><a class="toc-backref" href="#id11">Authors</a></h2> <h2><a class="toc-backref" href="#id13">Authors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Eficent</li> <li>Eficent</li>
</ul> </ul>
</div> </div>
<div class="section" id="contributors"> <div class="section" id="contributors">
<h2><a class="toc-backref" href="#id12">Contributors</a></h2> <h2><a class="toc-backref" href="#id14">Contributors</a></h2>
<ul class="simple"> <ul class="simple">
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;eficent.com">lois.rilo&#64;eficent.com</a>&gt;</li> <li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;eficent.com">lois.rilo&#64;eficent.com</a>&gt;</li>
<li>Jordi Ballester Alomar &lt;<a class="reference external" href="mailto:jordi.ballester&#64;eficent.com">jordi.ballester&#64;eficent.com</a>&gt;</li> <li>Jordi Ballester Alomar &lt;<a class="reference external" href="mailto:jordi.ballester&#64;eficent.com">jordi.ballester&#64;eficent.com</a>&gt;</li>
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id13">Maintainers</a></h2> <h2><a class="toc-backref" href="#id15">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p> <p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
@@ -502,7 +488,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p> <p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/lreficent"><img alt="lreficent" src="https://github.com/lreficent.png?size=40px" /></a></p> <p><a class="reference external" href="https://github.com/lreficent"><img alt="lreficent" src="https://github.com/lreficent.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/11.0/stock_cycle_count">OCA/stock-logistics-warehouse</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_cycle_count">OCA/stock-logistics-warehouse</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> <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>
</div> </div>

View File

@@ -166,7 +166,6 @@ class TestStockCycleCount(common.TransactionCase):
'product_id': self.product1.id, 'product_id': self.product1.id,
'location_id': self.count_loc.id, 'location_id': self.count_loc.id,
'quantity': 1.0, 'quantity': 1.0,
'cost': 15.0
}) })
move1 = self.stock_move_model.create({ move1 = self.stock_move_model.create({
'name': 'Pre-existing move', 'name': 'Pre-existing move',
@@ -219,7 +218,7 @@ class TestStockCycleCount(common.TransactionCase):
('cycle_count_id', '=', self.cycle_count_1.id)]) ('cycle_count_id', '=', self.cycle_count_1.id)])
self.assertTrue(inventory, 'Inventory not created.') self.assertTrue(inventory, 'Inventory not created.')
inventory.action_start() inventory.action_start()
inventory.action_done() inventory.action_validate()
self.assertEqual(self.cycle_count_1.state, 'done', self.assertEqual(self.cycle_count_1.state, 'done',
'Cycle count not set as done.') 'Cycle count not set as done.')
self.cycle_count_1.do_cancel() self.cycle_count_1.do_cancel()

View File

@@ -50,7 +50,7 @@
</button> </button>
</div> </div>
<div class="oe_title"> <div class="oe_title">
<label string="Cycle Count"/> <label string="Cycle Count" for="name"/>
<h1> <h1>
<field name="name"/> <field name="name"/>
</h1> </h1>
@@ -104,12 +104,15 @@
<field name="responsible_id" /> <field name="responsible_id" />
<group expand="0" string="Group By..."> <group expand="0" string="Group By...">
<filter string="Location" <filter string="Location"
name="location"
domain="[]" domain="[]"
context="{'group_by':'location_id'}"/> context="{'group_by':'location_id'}"/>
<filter string="State" <filter string="State"
name="state"
domain="[]" domain="[]"
context="{'group_by':'state'}"/> context="{'group_by':'state'}"/>
<filter string="Assigned to" <filter string="Assigned to"
name="responsible"
domain="[]" domain="[]"
context="{'group_by':'responsible_id'}"/> context="{'group_by':'responsible_id'}"/>
</group> </group>