Merge lp:~vauxoo/addons-vauxoo/7.0-stock_purchase_expiry-dev-1907-kty into lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa

Proposed by Katherine Zaoral (Vauxoo)
Status: Merged
Merged at revision: 1083
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-stock_purchase_expiry-dev-1907-kty
Merge into: lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa
Diff against target: 1171 lines (+1060/-0)
12 files modified
stock_purchase_expiry/__init__.py (+27/-0)
stock_purchase_expiry/__openerp__.py (+56/-0)
stock_purchase_expiry/doc/index.html (+445/-0)
stock_purchase_expiry/doc/index.rst (+129/-0)
stock_purchase_expiry/model/__init__.py (+27/-0)
stock_purchase_expiry/model/purchase.py (+49/-0)
stock_purchase_expiry/model/stock.py (+151/-0)
stock_purchase_expiry/view/purchase_order_view.xml (+31/-0)
stock_purchase_expiry/view/stock_picking_view.xml (+34/-0)
stock_purchase_expiry/wizard/__init__.py (+26/-0)
stock_purchase_expiry/wizard/stock.py (+67/-0)
stock_purchase_expiry/wizard/stock_invoice_onshipping_view.xml (+18/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-stock_purchase_expiry-dev-1907-kty
Reviewer Review Type Date Requested Status
Katherine Zaoral (Vauxoo) Approve
hbto [Vauxoo] http://www.vauxoo.com Pending
Review via email: mp+228319@code.launchpad.net

Description of the change

[MERGE] new module stock_purchase_expiry

To post a comment you must log in.
Revision history for this message
Katherine Zaoral (Vauxoo) (kathy-zaoral) wrote :

waiting for runbot

1097. By Katherine Zaoral (Vauxoo)

[MERGE] addons-vauxoo-cicsa revno 1082 to meet some missing dependecies in the
runbot test.

Revision history for this message
Katherine Zaoral (Vauxoo) (kathy-zaoral) wrote :

hbto please check this functioanlity to merge. the runbot is green. You can check the functionality using the rst file inside the module folder named doc.

review: Approve
1098. By Katherine Zaoral (Vauxoo)

[ADD] add a html file that holds the rst data for the user to see the
documentation file easly.

1099. By Katherine Zaoral (Vauxoo)

[ADD] change the rst help file name.

1100. By Katherine Zaoral (Vauxoo)

[ADD] add table of content for the stock_purchase_expiry doc index.

1101. By Katherine Zaoral (Vauxoo)

[ADD] update the doc index html file.

1102. By Katherine Zaoral (Vauxoo)

[IMP] change functionality. the copy method of the stock.picking model will
eraise the expiration contracd date field.

1103. By Katherine Zaoral (Vauxoo)

[ADD] I change a functionality so I update the documentation with the correct
feautre description an new screenshots. (update the rst and the html file in
once commit).

1104. By Katherine Zaoral (Vauxoo)

[FIX] stock picking recieve button now wroks property. The bug was that when
the expired contract date was empty it was throwing the error of canot receive
elements because the expired date is alredy pass. Now it works propertly.

1105. By Katherine Zaoral (Vauxoo)

[ADD] add a new functionality restriction over the stock picking onshipment
wizard. Not only check if there into the stock picking selected ones that have
an expire contract date, also check that no one of the selected stock picking
have a done state. If it has it, then will not create the invoice.

1106. By Katherine Zaoral (Vauxoo)

[FIX] remove raise osv exception used to debug the process.

1107. By Katherine Zaoral (Vauxoo)

[ADD] add new point talking about the feature how the expire contract date of
purchase order is inherit to the generated stock picking when the purchase
order is confirmed.

1108. By Katherine Zaoral (Vauxoo)

[ADD] update documentation with the new changes of the error message show for
the stock picking document when trying to use the create invoice wizard.

1109. By Katherine Zaoral (Vauxoo)

[ADD] show new feature in the documentation.

Revision history for this message
Katherine Zaoral (Vauxoo) (kathy-zaoral) wrote :

@hbto I made the changes of the functionality that we discuss.
Also update the documentation to reflect them.
In the process I find a bug and fixed.

NOTE: an html file was also added to be a preatty version of the rst data.

Please review.

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

LGTM,

Merge It.

Best Regards

2014-07-28 12:07 GMT-04:30 Katherine Zaoral (Vauxoo) <
<email address hidden>>:

> @hbto I made the changes of the functionality that we discuss.
> Also update the documentation to reflect them.
> In the process I find a bug and fixed.
>
> NOTE: an html file was also added to be a preatty version of the rst data.
>
> Please review.
> --
>
> https://code.launchpad.net/~vauxoo/addons-vauxoo/7.0-stock_purchase_expiry-dev-1907-kty/+merge/228319
> You are requested to review the proposed merge of
> lp:~vauxoo/addons-vauxoo/7.0-stock_purchase_expiry-dev-1907-kty into
> lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa.
>

Revision history for this message
Katherine Zaoral (Vauxoo) (kathy-zaoral) wrote :

well. i run the runbot another time with the new changes and it works propertly.
I will proceed with the merge.
regards

Revision history for this message
Katherine Zaoral (Vauxoo) (kathy-zaoral) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'stock_purchase_expiry'
2=== added file 'stock_purchase_expiry/__init__.py'
3--- stock_purchase_expiry/__init__.py 1970-01-01 00:00:00 +0000
4+++ stock_purchase_expiry/__init__.py 2014-07-28 16:33:18 +0000
5@@ -0,0 +1,27 @@
6+#!/usr/bin/python
7+# -*- encoding: utf-8 -*-
8+###############################################################################
9+# Module Writen to OpenERP, Open Source Management Solution
10+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
11+# All Rights Reserved
12+############# Credits #########################################################
13+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
14+# Planified by: Humberto Arocha <hbto@vauxoo.com>
15+# Audited by: Humberto Arocha <hbto@vauxoo.com>
16+###############################################################################
17+# This program is free software: you can redistribute it and/or modify
18+# it under the terms of the GNU Affero General Public License as published
19+# by the Free Software Foundation, either version 3 of the License, or
20+# (at your option) any later version.
21+#
22+# This program is distributed in the hope that it will be useful,
23+# but WITHOUT ANY WARRANTY; without even the implied warranty of
24+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+# GNU Affero General Public License for more details.
26+#
27+# You should have received a copy of the GNU Affero General Public License
28+# along with this program. If not, see <http://www.gnu.org/licenses/>.
29+###############################################################################
30+
31+import model
32+import wizard
33
34=== added file 'stock_purchase_expiry/__openerp__.py'
35--- stock_purchase_expiry/__openerp__.py 1970-01-01 00:00:00 +0000
36+++ stock_purchase_expiry/__openerp__.py 2014-07-28 16:33:18 +0000
37@@ -0,0 +1,56 @@
38+#!/usr/bin/python
39+# -*- encoding: utf-8 -*-
40+###############################################################################
41+# Module Writen to OpenERP, Open Source Management Solution
42+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
43+# All Rights Reserved
44+############# Credits #########################################################
45+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
46+# Planified by: Humberto Arocha <hbto@vauxoo.com>
47+# Audited by: Humberto Arocha <hbto@vauxoo.com>
48+###############################################################################
49+# This program is free software: you can redistribute it and/or modify
50+# it under the terms of the GNU Affero General Public License as published
51+# by the Free Software Foundation, either version 3 of the License, or
52+# (at your option) any later version.
53+#
54+# This program is distributed in the hope that it will be useful,
55+# but WITHOUT ANY WARRANTY; without even the implied warranty of
56+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57+# GNU Affero General Public License for more details.
58+#
59+# You should have received a copy of the GNU Affero General Public License
60+# along with this program. If not, see <http://www.gnu.org/licenses/>.
61+###############################################################################
62+
63+{
64+ 'name': 'Stock Purchase Expiry',
65+ 'version': '1.0',
66+ 'author': 'Vauxoo',
67+ 'website': 'http://www.vauxoo.com/',
68+ 'category': '',
69+ 'description': '''
70+Stock Purchase Expiry
71+=====================
72+
73+Add a contract expiry date to the purchase order that will control the payment
74+and invoice loads of a supplier.
75+
76+''',
77+ 'depends': [
78+ 'purchase',
79+ 'stock',
80+ ],
81+ 'data': [
82+ 'view/purchase_order_view.xml',
83+ 'view/stock_picking_view.xml',
84+ 'wizard/stock_invoice_onshipping_view.xml',
85+ ],
86+ 'demo': [],
87+ 'test': [],
88+ 'qweb': [],
89+ 'js': [],
90+ 'css': [],
91+ 'active': False,
92+ 'installable': True,
93+}
94
95=== added directory 'stock_purchase_expiry/data'
96=== added directory 'stock_purchase_expiry/demo'
97=== added directory 'stock_purchase_expiry/doc'
98=== added directory 'stock_purchase_expiry/doc/images'
99=== added file 'stock_purchase_expiry/doc/images/figure-1-1.png'
100Binary files stock_purchase_expiry/doc/images/figure-1-1.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-1-1.png 2014-07-28 16:33:18 +0000 differ
101=== added file 'stock_purchase_expiry/doc/images/figure-1-2.png'
102Binary files stock_purchase_expiry/doc/images/figure-1-2.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-1-2.png 2014-07-28 16:33:18 +0000 differ
103=== added file 'stock_purchase_expiry/doc/images/figure-1-3.png'
104Binary files stock_purchase_expiry/doc/images/figure-1-3.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-1-3.png 2014-07-28 16:33:18 +0000 differ
105=== added file 'stock_purchase_expiry/doc/images/figure-1.png'
106Binary files stock_purchase_expiry/doc/images/figure-1.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-1.png 2014-07-28 16:33:18 +0000 differ
107=== added file 'stock_purchase_expiry/doc/images/figure-10.png'
108Binary files stock_purchase_expiry/doc/images/figure-10.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-10.png 2014-07-28 16:33:18 +0000 differ
109=== added file 'stock_purchase_expiry/doc/images/figure-2.png'
110Binary files stock_purchase_expiry/doc/images/figure-2.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-2.png 2014-07-28 16:33:18 +0000 differ
111=== added file 'stock_purchase_expiry/doc/images/figure-2b.png'
112Binary files stock_purchase_expiry/doc/images/figure-2b.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-2b.png 2014-07-28 16:33:18 +0000 differ
113=== added file 'stock_purchase_expiry/doc/images/figure-3.png'
114Binary files stock_purchase_expiry/doc/images/figure-3.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-3.png 2014-07-28 16:33:18 +0000 differ
115=== added file 'stock_purchase_expiry/doc/images/figure-4.png'
116Binary files stock_purchase_expiry/doc/images/figure-4.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-4.png 2014-07-28 16:33:18 +0000 differ
117=== added file 'stock_purchase_expiry/doc/images/figure-5.png'
118Binary files stock_purchase_expiry/doc/images/figure-5.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-5.png 2014-07-28 16:33:18 +0000 differ
119=== added file 'stock_purchase_expiry/doc/images/figure-6.png'
120Binary files stock_purchase_expiry/doc/images/figure-6.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-6.png 2014-07-28 16:33:18 +0000 differ
121=== added file 'stock_purchase_expiry/doc/images/figure-7.png'
122Binary files stock_purchase_expiry/doc/images/figure-7.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-7.png 2014-07-28 16:33:18 +0000 differ
123=== added file 'stock_purchase_expiry/doc/images/figure-8.png'
124Binary files stock_purchase_expiry/doc/images/figure-8.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-8.png 2014-07-28 16:33:18 +0000 differ
125=== added file 'stock_purchase_expiry/doc/images/figure-9.png'
126Binary files stock_purchase_expiry/doc/images/figure-9.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/doc/images/figure-9.png 2014-07-28 16:33:18 +0000 differ
127=== added file 'stock_purchase_expiry/doc/index.html'
128--- stock_purchase_expiry/doc/index.html 1970-01-01 00:00:00 +0000
129+++ stock_purchase_expiry/doc/index.html 2014-07-28 16:33:18 +0000
130@@ -0,0 +1,445 @@
131+<?xml version="1.0" encoding="utf-8" ?>
132+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
133+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
134+<head>
135+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
136+<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" />
137+<title>MODULE HELP</title>
138+<style type="text/css">
139+
140+/*
141+:Author: David Goodger (goodger@python.org)
142+:Id: $Id: html4css1.css 7056 2011-06-17 10:50:48Z milde $
143+:Copyright: This stylesheet has been placed in the public domain.
144+
145+Default cascading style sheet for the HTML output of Docutils.
146+
147+See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
148+customize this style sheet.
149+*/
150+
151+/* used to remove borders from tables and images */
152+.borderless, table.borderless td, table.borderless th {
153+ border: 0 }
154+
155+table.borderless td, table.borderless th {
156+ /* Override padding for "table.docutils td" with "! important".
157+ The right padding separates the table cells. */
158+ padding: 0 0.5em 0 0 ! important }
159+
160+.first {
161+ /* Override more specific margin styles with "! important". */
162+ margin-top: 0 ! important }
163+
164+.last, .with-subtitle {
165+ margin-bottom: 0 ! important }
166+
167+.hidden {
168+ display: none }
169+
170+a.toc-backref {
171+ text-decoration: none ;
172+ color: black }
173+
174+blockquote.epigraph {
175+ margin: 2em 5em ; }
176+
177+dl.docutils dd {
178+ margin-bottom: 0.5em }
179+
180+object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
181+ overflow: hidden;
182+}
183+
184+/* Uncomment (and remove this text!) to get bold-faced definition list terms
185+dl.docutils dt {
186+ font-weight: bold }
187+*/
188+
189+div.abstract {
190+ margin: 2em 5em }
191+
192+div.abstract p.topic-title {
193+ font-weight: bold ;
194+ text-align: center }
195+
196+div.admonition, div.attention, div.caution, div.danger, div.error,
197+div.hint, div.important, div.note, div.tip, div.warning {
198+ margin: 2em ;
199+ border: medium outset ;
200+ padding: 1em }
201+
202+div.admonition p.admonition-title, div.hint p.admonition-title,
203+div.important p.admonition-title, div.note p.admonition-title,
204+div.tip p.admonition-title {
205+ font-weight: bold ;
206+ font-family: sans-serif }
207+
208+div.attention p.admonition-title, div.caution p.admonition-title,
209+div.danger p.admonition-title, div.error p.admonition-title,
210+div.warning p.admonition-title {
211+ color: red ;
212+ font-weight: bold ;
213+ font-family: sans-serif }
214+
215+/* Uncomment (and remove this text!) to get reduced vertical space in
216+ compound paragraphs.
217+div.compound .compound-first, div.compound .compound-middle {
218+ margin-bottom: 0.5em }
219+
220+div.compound .compound-last, div.compound .compound-middle {
221+ margin-top: 0.5em }
222+*/
223+
224+div.dedication {
225+ margin: 2em 5em ;
226+ text-align: center ;
227+ font-style: italic }
228+
229+div.dedication p.topic-title {
230+ font-weight: bold ;
231+ font-style: normal }
232+
233+div.figure {
234+ margin-left: 2em ;
235+ margin-right: 2em }
236+
237+div.footer, div.header {
238+ clear: both;
239+ font-size: smaller }
240+
241+div.line-block {
242+ display: block ;
243+ margin-top: 1em ;
244+ margin-bottom: 1em }
245+
246+div.line-block div.line-block {
247+ margin-top: 0 ;
248+ margin-bottom: 0 ;
249+ margin-left: 1.5em }
250+
251+div.sidebar {
252+ margin: 0 0 0.5em 1em ;
253+ border: medium outset ;
254+ padding: 1em ;
255+ background-color: #ffffee ;
256+ width: 40% ;
257+ float: right ;
258+ clear: right }
259+
260+div.sidebar p.rubric {
261+ font-family: sans-serif ;
262+ font-size: medium }
263+
264+div.system-messages {
265+ margin: 5em }
266+
267+div.system-messages h1 {
268+ color: red }
269+
270+div.system-message {
271+ border: medium outset ;
272+ padding: 1em }
273+
274+div.system-message p.system-message-title {
275+ color: red ;
276+ font-weight: bold }
277+
278+div.topic {
279+ margin: 2em }
280+
281+h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
282+h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
283+ margin-top: 0.4em }
284+
285+h1.title {
286+ text-align: center }
287+
288+h2.subtitle {
289+ text-align: center }
290+
291+hr.docutils {
292+ width: 75% }
293+
294+img.align-left, .figure.align-left, object.align-left {
295+ clear: left ;
296+ float: left ;
297+ margin-right: 1em }
298+
299+img.align-right, .figure.align-right, object.align-right {
300+ clear: right ;
301+ float: right ;
302+ margin-left: 1em }
303+
304+img.align-center, .figure.align-center, object.align-center {
305+ display: block;
306+ margin-left: auto;
307+ margin-right: auto;
308+}
309+
310+.align-left {
311+ text-align: left }
312+
313+.align-center {
314+ clear: both ;
315+ text-align: center }
316+
317+.align-right {
318+ text-align: right }
319+
320+/* reset inner alignment in figures */
321+div.align-right {
322+ text-align: inherit }
323+
324+/* div.align-center * { */
325+/* text-align: left } */
326+
327+ol.simple, ul.simple {
328+ margin-bottom: 1em }
329+
330+ol.arabic {
331+ list-style: decimal }
332+
333+ol.loweralpha {
334+ list-style: lower-alpha }
335+
336+ol.upperalpha {
337+ list-style: upper-alpha }
338+
339+ol.lowerroman {
340+ list-style: lower-roman }
341+
342+ol.upperroman {
343+ list-style: upper-roman }
344+
345+p.attribution {
346+ text-align: right ;
347+ margin-left: 50% }
348+
349+p.caption {
350+ font-style: italic }
351+
352+p.credits {
353+ font-style: italic ;
354+ font-size: smaller }
355+
356+p.label {
357+ white-space: nowrap }
358+
359+p.rubric {
360+ font-weight: bold ;
361+ font-size: larger ;
362+ color: maroon ;
363+ text-align: center }
364+
365+p.sidebar-title {
366+ font-family: sans-serif ;
367+ font-weight: bold ;
368+ font-size: larger }
369+
370+p.sidebar-subtitle {
371+ font-family: sans-serif ;
372+ font-weight: bold }
373+
374+p.topic-title {
375+ font-weight: bold }
376+
377+pre.address {
378+ margin-bottom: 0 ;
379+ margin-top: 0 ;
380+ font: inherit }
381+
382+pre.literal-block, pre.doctest-block, pre.math {
383+ margin-left: 2em ;
384+ margin-right: 2em }
385+
386+span.classifier {
387+ font-family: sans-serif ;
388+ font-style: oblique }
389+
390+span.classifier-delimiter {
391+ font-family: sans-serif ;
392+ font-weight: bold }
393+
394+span.interpreted {
395+ font-family: sans-serif }
396+
397+span.option {
398+ white-space: nowrap }
399+
400+span.pre {
401+ white-space: pre }
402+
403+span.problematic {
404+ color: red }
405+
406+span.section-subtitle {
407+ /* font-size relative to parent (h1..h6 element) */
408+ font-size: 80% }
409+
410+table.citation {
411+ border-left: solid 1px gray;
412+ margin-left: 1px }
413+
414+table.docinfo {
415+ margin: 2em 4em }
416+
417+table.docutils {
418+ margin-top: 0.5em ;
419+ margin-bottom: 0.5em }
420+
421+table.footnote {
422+ border-left: solid 1px black;
423+ margin-left: 1px }
424+
425+table.docutils td, table.docutils th,
426+table.docinfo td, table.docinfo th {
427+ padding-left: 0.5em ;
428+ padding-right: 0.5em ;
429+ vertical-align: top }
430+
431+table.docutils th.field-name, table.docinfo th.docinfo-name {
432+ font-weight: bold ;
433+ text-align: left ;
434+ white-space: nowrap ;
435+ padding-left: 0 }
436+
437+h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
438+h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
439+ font-size: 100% }
440+
441+ul.auto-toc {
442+ list-style-type: none }
443+
444+</style>
445+</head>
446+<body>
447+<div class="document" id="module-help">
448+<h1 class="title">MODULE HELP</h1>
449+
450+<div class="contents topic" id="table-of-content">
451+<p class="topic-title first">Table of Content</p>
452+<ul class="simple">
453+<li><a class="reference internal" href="#new-features" id="id1">New features</a></li>
454+</ul>
455+</div>
456+<div class="section" id="new-features">
457+<h1><a class="toc-backref" href="#id1">New features</a></h1>
458+<ol class="arabic">
459+<li><p class="first">I add the contract expiration date field in the puchase order model and
460+show it in the purchase order form.</p>
461+<blockquote>
462+<div class="figure align-center">
463+<img alt="images/figure-1.png" src="images/figure-1.png" style="width: 675.5px; height: 310.0px;" />
464+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-YTlNT1NqM0ZPQnc/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-YTlNT1NqM0ZPQnc/edit?usp=drivesdk</a></p>
465+</div>
466+</blockquote>
467+</li>
468+<li><p class="first">When a purchase order is confirm will create stock pikings, This pickings
469+will have a expired contract date too, the date pull from the purchase
470+order data.</p>
471+<blockquote>
472+<div class="figure align-center">
473+<img alt="images/figure-1-1.png" src="images/figure-1-1.png" style="width: 675.5px; height: 310.0px;" />
474+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-VFgxV0ZzTHhmYTA/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-VFgxV0ZzTHhmYTA/edit?usp=drivesdk</a></p>
475+</div>
476+<div class="figure align-center">
477+<img alt="images/figure-1-2.png" src="images/figure-1-2.png" style="width: 675.5px; height: 310.0px;" />
478+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-T2Fnamx0OUNYMkk/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-T2Fnamx0OUNYMkk/edit?usp=drivesdk</a></p>
479+</div>
480+<div class="figure align-center">
481+<img alt="images/figure-1-3.png" src="images/figure-1-3.png" style="width: 675.5px; height: 310.0px;" />
482+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UTNNZGVBajVQamc/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UTNNZGVBajVQamc/edit?usp=drivesdk</a></p>
483+</div>
484+</blockquote>
485+</li>
486+<li><p class="first">When a stock picking is duplicated will clear the expiration contract date.</p>
487+<blockquote>
488+<div class="figure align-center">
489+<img alt="images/figure-2.png" src="images/figure-2.png" style="width: 675.5px; height: 310.0px;" />
490+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UGNQNDBkV2hKUUE/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UGNQNDBkV2hKUUE/edit?usp=drivesdk</a></p>
491+</div>
492+<div class="figure align-center">
493+<img alt="images/figure-2b.png" src="images/figure-2b.png" style="width: 675.5px; height: 310.0px;" />
494+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-NW9PVGxaZ2NSUTg/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-NW9PVGxaZ2NSUTg/edit?usp=drivesdk</a></p>
495+</div>
496+</blockquote>
497+</li>
498+<li><p class="first">I create a purchase order and I assing a past contract expire date. Then I
499+confirm the purchase order.</p>
500+<blockquote>
501+<div class="figure align-center">
502+<img alt="images/figure-3.png" src="images/figure-3.png" style="width: 675.5px; height: 310.0px;" />
503+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UTlqYktiNHBiSWc/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UTlqYktiNHBiSWc/edit?usp=drivesdk</a></p>
504+</div>
505+<!-- TODO: this image need to change. -->
506+</blockquote>
507+</li>
508+<li><p class="first">I go inside the picking generated by a contract expire date purchase order
509+confirmation and I click in the Receive button. This error message is pop up
510+saying Cannot receive a picking with a expired contract date of pickings in
511+done state.</p>
512+<blockquote>
513+<div class="figure align-center">
514+<img alt="images/figure-4.png" src="images/figure-4.png" style="width: 675.5px; height: 310.0px;" />
515+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-R1NYV29MdEUtd2c/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-R1NYV29MdEUtd2c/edit?usp=drivesdk</a></p>
516+</div>
517+</blockquote>
518+</li>
519+<li><p class="first">I use the Force Receive button to sucessfully recieve the picking Force
520+Recevie button will open the receive wizard normally.</p>
521+<blockquote>
522+<div class="figure align-center">
523+<img alt="images/figure-5.png" src="images/figure-5.png" style="width: 675.5px; height: 310.0px;" />
524+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-TUNPZk1VNDJHTnc/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-TUNPZk1VNDJHTnc/edit?usp=drivesdk</a></p>
525+</div>
526+</blockquote>
527+</li>
528+<li><p class="first">I use the Create Draft Invoice wizard from the stock picking in tree
529+view. I select a picking whose purchase order is contract expired date.</p>
530+<blockquote>
531+<div class="figure align-center">
532+<img alt="images/figure-6.png" src="images/figure-6.png" style="width: 675.5px; height: 310.0px;" />
533+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-R2p2di1IdWNaVXc/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-R2p2di1IdWNaVXc/edit?usp=drivesdk</a></p>
534+</div>
535+</blockquote>
536+</li>
537+<li><p class="first">I try to create an invoce from a stock picking in with contract expired
538+date. And this is the result, a error message raise indicating that the
539+action can be done.</p>
540+<blockquote>
541+<div class="figure align-center">
542+<img alt="images/figure-7.png" src="images/figure-7.png" style="width: 675.5px; height: 310.0px;" />
543+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0b1uuua6brx8-nnc2zmresevttda/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0b1uuua6brx8-nnc2zmresevttda/edit?usp=drivesdk</a></p>
544+</div>
545+</blockquote>
546+</li>
547+<li><p class="first">I add the Force Create button in the create draft invoices wizard. When a
548+stock picking have contract expired date then with this button will proceed
549+no matter what and will create the invoice even if the stock picking have a
550+expired contract date.</p>
551+<blockquote>
552+<div class="figure align-center">
553+<img alt="images/figure-8.png" src="images/figure-8.png" style="width: 675.5px; height: 310.0px;" />
554+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-S3gwOW93ajNkY2c/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-S3gwOW93ajNkY2c/edit?usp=drivesdk</a></p>
555+</div>
556+</blockquote>
557+</li>
558+<li><p class="first">After a picking is received a button 'Create Invoice/Refund' is shown to
559+create the invoice of the current picking</p>
560+<blockquote>
561+<div class="figure align-center">
562+<img alt="images/figure-9.png" src="images/figure-9.png" style="width: 675.5px; height: 310.0px;" />
563+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-YVAyWnBoN0NxUkE/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-YVAyWnBoN0NxUkE/edit?usp=drivesdk</a></p>
564+</div>
565+<div class="figure align-center">
566+<img alt="images/figure-10.png" src="images/figure-10.png" style="width: 675.5px; height: 310.0px;" />
567+<p class="caption"><a class="reference external" href="https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-N3VSQ2VTX3VubzQ/edit?usp=drivesdk">https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-N3VSQ2VTX3VubzQ/edit?usp=drivesdk</a></p>
568+</div>
569+</blockquote>
570+</li>
571+</ol>
572+</div>
573+</div>
574+</body>
575+</html>
576
577=== added file 'stock_purchase_expiry/doc/index.rst'
578--- stock_purchase_expiry/doc/index.rst 1970-01-01 00:00:00 +0000
579+++ stock_purchase_expiry/doc/index.rst 2014-07-28 16:33:18 +0000
580@@ -0,0 +1,129 @@
581+===========
582+MODULE HELP
583+===========
584+
585+.. contents:: Table of Content
586+
587+New features
588+------------
589+
590+#. I add the contract expiration date field in the puchase order model and
591+ show it in the purchase order form.
592+
593+ .. figure:: images/figure-1.png
594+ :scale: 50 %
595+ :align: center
596+
597+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-YTlNT1NqM0ZPQnc/edit?usp=drivesdk
598+
599+#. When a purchase order is confirm will create stock pikings, This pickings
600+ will have a expired contract date too, the date pull from the purchase
601+ order data.
602+
603+ .. figure:: images/figure-1-1.png
604+ :scale: 50 %
605+ :align: center
606+
607+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-VFgxV0ZzTHhmYTA/edit?usp=drivesdk
608+
609+ .. figure:: images/figure-1-2.png
610+ :scale: 50 %
611+ :align: center
612+
613+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-T2Fnamx0OUNYMkk/edit?usp=drivesdk
614+
615+ .. figure:: images/figure-1-3.png
616+ :scale: 50 %
617+ :align: center
618+
619+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UTNNZGVBajVQamc/edit?usp=drivesdk
620+
621+#. When a stock picking is duplicated will clear the expiration contract date.
622+
623+ .. figure:: images/figure-2.png
624+ :scale: 50 %
625+ :align: center
626+
627+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UGNQNDBkV2hKUUE/edit?usp=drivesdk
628+
629+ .. figure:: images/figure-2b.png
630+ :scale: 50 %
631+ :align: center
632+
633+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-NW9PVGxaZ2NSUTg/edit?usp=drivesdk
634+
635+#. I create a purchase order and I assing a past contract expire date. Then I
636+ confirm the purchase order.
637+
638+ .. figure:: images/figure-3.png
639+ :scale: 50 %
640+ :align: center
641+
642+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-UTlqYktiNHBiSWc/edit?usp=drivesdk
643+
644+ .. TODO: this image need to change.
645+
646+#. I go inside the picking generated by a contract expire date purchase order
647+ confirmation and I click in the Receive button. This error message is pop up
648+ saying Cannot receive a picking with a expired contract date of pickings in
649+ done state.
650+
651+ .. figure:: images/figure-4.png
652+ :scale: 50 %
653+ :align: center
654+
655+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-R1NYV29MdEUtd2c/edit?usp=drivesdk
656+
657+#. I use the Force Receive button to sucessfully recieve the picking Force
658+ Recevie button will open the receive wizard normally.
659+
660+ .. figure:: images/figure-5.png
661+ :scale: 50 %
662+ :align: center
663+
664+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-TUNPZk1VNDJHTnc/edit?usp=drivesdk
665+
666+#. I use the Create Draft Invoice wizard from the stock picking in tree
667+ view. I select a picking whose purchase order is contract expired date.
668+
669+ .. figure:: images/figure-6.png
670+ :scale: 50 %
671+ :align: center
672+
673+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-R2p2di1IdWNaVXc/edit?usp=drivesdk
674+
675+#. I try to create an invoce from a stock picking in with contract expired
676+ date. And this is the result, a error message raise indicating that the
677+ action can be done.
678+
679+ .. figure:: images/figure-7.png
680+ :scale: 50 %
681+ :align: center
682+
683+ https://docs.google.com/a/vauxoo.com/file/d/0b1uuua6brx8-nnc2zmresevttda/edit?usp=drivesdk
684+
685+#. I add the Force Create button in the create draft invoices wizard. When a
686+ stock picking have contract expired date then with this button will proceed
687+ no matter what and will create the invoice even if the stock picking have a
688+ expired contract date.
689+
690+ .. figure:: images/figure-8.png
691+ :scale: 50 %
692+ :align: center
693+
694+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-S3gwOW93ajNkY2c/edit?usp=drivesdk
695+
696+#. After a picking is received a button 'Create Invoice/Refund' is shown to
697+ create the invoice of the current picking
698+
699+ .. figure:: images/figure-9.png
700+ :scale: 50 %
701+ :align: center
702+
703+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-YVAyWnBoN0NxUkE/edit?usp=drivesdk
704+
705+ .. figure:: images/figure-10.png
706+ :scale: 50 %
707+ :align: center
708+
709+ https://docs.google.com/a/vauxoo.com/file/d/0B1UUUA6bRx8-N3VSQ2VTX3VubzQ/edit?usp=drivesdk
710
711=== added directory 'stock_purchase_expiry/i18n'
712=== added directory 'stock_purchase_expiry/model'
713=== added file 'stock_purchase_expiry/model/__init__.py'
714--- stock_purchase_expiry/model/__init__.py 1970-01-01 00:00:00 +0000
715+++ stock_purchase_expiry/model/__init__.py 2014-07-28 16:33:18 +0000
716@@ -0,0 +1,27 @@
717+#!/usr/bin/python
718+# -*- encoding: utf-8 -*-
719+###############################################################################
720+# Module Writen to OpenERP, Open Source Management Solution
721+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
722+# All Rights Reserved
723+############# Credits #########################################################
724+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
725+# Planified by: Humberto Arocha <hbto@vauxoo.com>
726+# Audited by: Humberto Arocha <hbto@vauxoo.com>
727+###############################################################################
728+# This program is free software: you can redistribute it and/or modify
729+# it under the terms of the GNU Affero General Public License as published
730+# by the Free Software Foundation, either version 3 of the License, or
731+# (at your option) any later version.
732+#
733+# This program is distributed in the hope that it will be useful,
734+# but WITHOUT ANY WARRANTY; without even the implied warranty of
735+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
736+# GNU Affero General Public License for more details.
737+#
738+# You should have received a copy of the GNU Affero General Public License
739+# along with this program. If not, see <http://www.gnu.org/licenses/>.
740+###############################################################################
741+
742+import purchase
743+import stock
744
745=== added file 'stock_purchase_expiry/model/purchase.py'
746--- stock_purchase_expiry/model/purchase.py 1970-01-01 00:00:00 +0000
747+++ stock_purchase_expiry/model/purchase.py 2014-07-28 16:33:18 +0000
748@@ -0,0 +1,49 @@
749+#!/usr/bin/python
750+# -*- encoding: utf-8 -*-
751+###############################################################################
752+# Module Writen to OpenERP, Open Source Management Solution
753+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
754+# All Rights Reserved
755+############# Credits #########################################################
756+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
757+# Planified by: Humberto Arocha <hbto@vauxoo.com>
758+# Audited by: Humberto Arocha <hbto@vauxoo.com>
759+###############################################################################
760+# This program is free software: you can redistribute it and/or modify
761+# it under the terms of the GNU Affero General Public License as published
762+# by the Free Software Foundation, either version 3 of the License, or
763+# (at your option) any later version.
764+#
765+# This program is distributed in the hope that it will be useful,
766+# but WITHOUT ANY WARRANTY; without even the implied warranty of
767+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
768+# GNU Affero General Public License for more details.
769+#
770+# You should have received a copy of the GNU Affero General Public License
771+# along with this program. If not, see <http://www.gnu.org/licenses/>.
772+###############################################################################
773+
774+from openerp.osv import fields, osv, orm
775+from openerp.tools.translate import _
776+from openerp import tools
777+
778+
779+class purchase_order(osv.Model):
780+ _inherit = 'purchase.order'
781+ _columns = {
782+ 'date_contract_expiry': fields.date(
783+ 'Expiration of Contract Date',
784+ help='Expiration of Contract Date'),
785+ }
786+
787+ def _prepare_order_picking(self, cur, uid, order, context=None):
788+ """
789+ Overwirthe the method that create the values for the picking creation
790+ and add the purchase order date_contract_expiry field to the stock
791+ picking element.
792+ """
793+ context = context or {}
794+ res = super(purchase_order, self)._prepare_order_picking(
795+ cur, uid, order, context=context)
796+ res['date_contract_expiry'] = order.date_contract_expiry
797+ return res
798
799=== added file 'stock_purchase_expiry/model/stock.py'
800--- stock_purchase_expiry/model/stock.py 1970-01-01 00:00:00 +0000
801+++ stock_purchase_expiry/model/stock.py 2014-07-28 16:33:18 +0000
802@@ -0,0 +1,151 @@
803+#!/usr/bin/python
804+# -*- encoding: utf-8 -*-
805+###############################################################################
806+# Module Writen to OpenERP, Open Source Management Solution
807+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
808+# All Rights Reserved
809+############# Credits #########################################################
810+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
811+# Planified by: Humberto Arocha <hbto@vauxoo.com>
812+# Audited by: Humberto Arocha <hbto@vauxoo.com>
813+###############################################################################
814+# This program is free software: you can redistribute it and/or modify
815+# it under the terms of the GNU Affero General Public License as published
816+# by the Free Software Foundation, either version 3 of the License, or
817+# (at your option) any later version.
818+#
819+# This program is distributed in the hope that it will be useful,
820+# but WITHOUT ANY WARRANTY; without even the implied warranty of
821+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
822+# GNU Affero General Public License for more details.
823+#
824+# You should have received a copy of the GNU Affero General Public License
825+# along with this program. If not, see <http://www.gnu.org/licenses/>.
826+###############################################################################
827+
828+from openerp.osv import fields, osv, orm
829+from openerp.tools.translate import _
830+from openerp import tools
831+import time
832+
833+
834+class stock_picking(osv.Model):
835+ _inherit = 'stock.picking'
836+ _columns = {
837+ 'date_contract_expiry': fields.date(
838+ 'Expiration of Contract Date',
839+ help='Expiration of Contract Date'),
840+ }
841+
842+ def action_process(self, cur, uid, ids, context=None):
843+ """
844+ overwrite the method to add a verification of the contract Expiration
845+ date before process the stock picking.
846+ """
847+ context = context or {}
848+ ids = isinstance(ids, (int, long)) and [ids] or ids
849+ cr_date = time.strftime('%Y-%m-%d')
850+ sp_brw = self.browse(cur, uid, ids[0], context=context)
851+ if ((not sp_brw.date_contract_expiry) or
852+ (sp_brw.date_contract_expiry and cr_date <= sp_brw.date_contract_expiry) or
853+ context.get('force_expiry_pickings', False)):
854+ res = super(stock_picking, self).action_process(
855+ cur, uid, [sp_brw.id], context=context)
856+ else:
857+ raise osv.except_osv(_('Invalid Procedure'),
858+ _('The Contract Expiration Date already pass. You cannot'
859+ ' process the stock picking.'))
860+ return res
861+
862+ def copy(self, cur, uid, id, default=None, context=None):
863+ """
864+ Ovwerwrite the copy method to also copy the date_contract_expiry value.
865+ """
866+ default = default or {}
867+ context = context or {}
868+ picking_brw = self.browse(cur, uid, id, context=context)
869+ default['date_contract_expiry'] = False
870+ res = super(stock_picking, self).copy(
871+ cur, uid, id, default=default, context=context)
872+ return res
873+
874+class stock_picking_in(osv.Model):
875+ _inherit = 'stock.picking.in'
876+ _columns = {
877+ 'date_contract_expiry': fields.date(
878+ 'Expiration of Contract Date',
879+ help='Expiration of Contract Date'),
880+ }
881+
882+ def action_process(self, cur, uid, ids, context=None):
883+ """
884+ overwrite the method to add a verification of the contract Expiration
885+ date before process the stock picking in.
886+ """
887+ context = context or {}
888+ ids = isinstance(ids, (int, long)) and [ids] or ids
889+ cr_date = time.strftime('%Y-%m-%d')
890+ sp_brw = self.browse(cur, uid, ids[0], context=context)
891+ if ((not sp_brw.date_contract_expiry) or
892+ (sp_brw.date_contract_expiry and cr_date <= sp_brw.date_contract_expiry) or
893+ context.get('force_expiry_pickings', False)):
894+ res = super(stock_picking_in, self).action_process(
895+ cur, uid, [sp_brw.id], context=context)
896+ else:
897+ raise osv.except_osv(_('Invalid Procedure'),
898+ _('The Contract Expiration Date already pass. You cannot'
899+ ' process the stock picking in.'))
900+ return res
901+
902+ def copy(self, cur, uid, id, default=None, context=None):
903+ """
904+ Ovwerwrite the copy method to also copy the date_contract_expiry value.
905+ """
906+ default = default or {}
907+ context = context or {}
908+ picking_brw = self.browse(cur, uid, id, context=context)
909+ default['date_contract_expiry'] = False
910+ res = super(stock_picking_in, self).copy(
911+ cur, uid, id, default=default, context=context)
912+ return res
913+
914+class stock_picking_out(osv.Model):
915+ _inherit = 'stock.picking.out'
916+ _columns = {
917+ 'date_contract_expiry': fields.date(
918+ 'Expiration of Contract Date',
919+ help='Expiration of Contract Date'),
920+ }
921+
922+ def action_process(self, cur, uid, ids, context=None):
923+ """
924+ overwrite the method to add a verification of the contract Expiration
925+ date before process the stock picking out.
926+ """
927+ context = context or {}
928+ ids = isinstance(ids, (int, long)) and [ids] or ids
929+ cr_date = time.strftime('%Y-%m-%d')
930+ sp_brw = self.browse(cur, uid, ids[0], context=context)
931+ if ((not sp_brw.date_contract_expiry) or
932+ (sp_brw.date_contract_expiry and cr_date <= sp_brw.date_contract_expiry) or
933+ context.get('force_expiry_pickings', False)):
934+ res = super(stock_picking_out, self).action_process(
935+ cur, uid, [sp_brw.id], context=context)
936+ else:
937+ raise osv.except_osv(_('Invalid Procedure'),
938+ _('The Contract Expiration Date already pass. You cannot'
939+ ' process the stock picking out.'))
940+ return res
941+
942+ def copy(self, cur, uid, id, default=None, context=None):
943+ """
944+ Ovwerwrite the copy method to also copy the date_contract_expiry value.
945+ """
946+ default = default or {}
947+ context = context or {}
948+ picking_brw = self.browse(cur, uid, id, context=context)
949+ default['date_contract_expiry'] = False
950+ res = super(stock_picking_out, self).copy(
951+ cur, uid, id, default=default, context=context)
952+ return res
953+
954
955=== added directory 'stock_purchase_expiry/report'
956=== added directory 'stock_purchase_expiry/security'
957=== added directory 'stock_purchase_expiry/static'
958=== added directory 'stock_purchase_expiry/static/description'
959=== added file 'stock_purchase_expiry/static/description/index.html'
960=== added directory 'stock_purchase_expiry/static/src'
961=== added directory 'stock_purchase_expiry/static/src/css'
962=== added directory 'stock_purchase_expiry/static/src/img'
963=== added file 'stock_purchase_expiry/static/src/img/icon.png'
964Binary files stock_purchase_expiry/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and stock_purchase_expiry/static/src/img/icon.png 2014-07-28 16:33:18 +0000 differ
965=== added directory 'stock_purchase_expiry/static/src/js'
966=== added directory 'stock_purchase_expiry/static/src/xml'
967=== added directory 'stock_purchase_expiry/test'
968=== added directory 'stock_purchase_expiry/view'
969=== added file 'stock_purchase_expiry/view/purchase_order_view.xml'
970--- stock_purchase_expiry/view/purchase_order_view.xml 1970-01-01 00:00:00 +0000
971+++ stock_purchase_expiry/view/purchase_order_view.xml 2014-07-28 16:33:18 +0000
972@@ -0,0 +1,31 @@
973+<?xml version="1.0"?>
974+<openerp>
975+ <data>
976+
977+ <record model="ir.ui.view" id="purchase_order_stock_purchase_expiry_form">
978+ <field name="name">purchase.order.stock.purchase.expiry.form</field>
979+ <field name="model">purchase.order</field>
980+ <field name="inherit_id" ref="purchase.purchase_order_form"/>
981+ <field name="arch" type="xml">
982+ <xpath expr="//field[@name='date_order']" position="after">
983+ <field name="date_contract_expiry"/>
984+ </xpath>
985+ </field>
986+ </record>
987+
988+ <record model="ir.ui.view" id="purchase_order_stock_purchase_expiry_search">
989+ <field name="name">purchase.order.stock.purchase.expiry.search</field>
990+ <field name="model">purchase.order</field>
991+ <field name="inherit_id" ref="purchase.view_purchase_order_filter"/>
992+ <field name="arch" type="xml">
993+ <xpath expr="//field[@name='create_uid']" position="after">
994+ <field name="date_contract_expiry"/>
995+ </xpath>
996+ <xpath expr="//group" position="inside">
997+ <filter string="Contract Expiry Date" icon="terp-go-month" context="{'group_by':'date_contract_expiry'}"/>
998+ </xpath>
999+ </field>
1000+ </record>
1001+
1002+ </data>
1003+</openerp>
1004
1005=== added file 'stock_purchase_expiry/view/stock_picking_view.xml'
1006--- stock_purchase_expiry/view/stock_picking_view.xml 1970-01-01 00:00:00 +0000
1007+++ stock_purchase_expiry/view/stock_picking_view.xml 2014-07-28 16:33:18 +0000
1008@@ -0,0 +1,34 @@
1009+<?xml version='1.0' encoding='UTF-8'?>
1010+<openerp>
1011+ <data>
1012+
1013+ <record model="ir.ui.view" id="stock_picking_in_spe_form">
1014+ <field name="name">stock.picking.in.spe.form</field>
1015+ <field name="model">stock.picking.in</field>
1016+ <field name="inherit_id" ref="stock.view_picking_in_form"/>
1017+ <field name="arch" type="xml">
1018+ <xpath expr="//button[@string='Receive']" position="after" >
1019+ <button name="action_process" states="assigned" string="Force Receive" type="object" attrs="{'invisible': [('state','not in',['assigned'])]}" context="{'force_expiry_pickings': True}"/>
1020+ </xpath>
1021+ <xpath expr="//field[@name='min_date']" position="after" >
1022+ <field name="date_contract_expiry"/>
1023+ </xpath>
1024+ </field>
1025+ </record>
1026+
1027+ <record model="ir.ui.view" id="stock_picking_out_spe_form">
1028+ <field name="name">stock.picking.out.spe.form</field>
1029+ <field name="model">stock.picking.out</field>
1030+ <field name="inherit_id" ref="stock.view_picking_out_form"/>
1031+ <field name="arch" type="xml">
1032+ <xpath expr="//button[@string='Deliver']" position="after" >
1033+ <button name="action_process" states="assigned" string="Force Deliver" type="object" context="{'force_expiry_pickings': True}"/>
1034+ </xpath>
1035+ <xpath expr="//field[@name='date']" position="after" >
1036+ <field name="date_contract_expiry"/>
1037+ </xpath>
1038+ </field>
1039+ </record>
1040+
1041+ </data>
1042+</openerp>
1043
1044=== added directory 'stock_purchase_expiry/wizard'
1045=== added file 'stock_purchase_expiry/wizard/__init__.py'
1046--- stock_purchase_expiry/wizard/__init__.py 1970-01-01 00:00:00 +0000
1047+++ stock_purchase_expiry/wizard/__init__.py 2014-07-28 16:33:18 +0000
1048@@ -0,0 +1,26 @@
1049+#!/usr/bin/python
1050+# -*- encoding: utf-8 -*-
1051+###############################################################################
1052+# Module Writen to OpenERP, Open Source Management Solution
1053+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
1054+# All Rights Reserved
1055+############# Credits #########################################################
1056+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
1057+# Planified by: Humberto Arocha <hbto@vauxoo.com>
1058+# Audited by: Humberto Arocha <hbto@vauxoo.com>
1059+###############################################################################
1060+# This program is free software: you can redistribute it and/or modify
1061+# it under the terms of the GNU Affero General Public License as published
1062+# by the Free Software Foundation, either version 3 of the License, or
1063+# (at your option) any later version.
1064+#
1065+# This program is distributed in the hope that it will be useful,
1066+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1067+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1068+# GNU Affero General Public License for more details.
1069+#
1070+# You should have received a copy of the GNU Affero General Public License
1071+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1072+###############################################################################
1073+
1074+import stock
1075
1076=== added file 'stock_purchase_expiry/wizard/stock.py'
1077--- stock_purchase_expiry/wizard/stock.py 1970-01-01 00:00:00 +0000
1078+++ stock_purchase_expiry/wizard/stock.py 2014-07-28 16:33:18 +0000
1079@@ -0,0 +1,67 @@
1080+#!/usr/bin/python
1081+# -*- encoding: utf-8 -*-
1082+###############################################################################
1083+# Module Writen to OpenERP, Open Source Management Solution
1084+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
1085+# All Rights Reserved
1086+############# Credits #########################################################
1087+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
1088+# Planified by: Humberto Arocha <hbto@vauxoo.com>
1089+# Audited by: Humberto Arocha <hbto@vauxoo.com>
1090+###############################################################################
1091+# This program is free software: you can redistribute it and/or modify
1092+# it under the terms of the GNU Affero General Public License as published
1093+# by the Free Software Foundation, either version 3 of the License, or
1094+# (at your option) any later version.
1095+#
1096+# This program is distributed in the hope that it will be useful,
1097+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1098+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1099+# GNU Affero General Public License for more details.
1100+#
1101+# You should have received a copy of the GNU Affero General Public License
1102+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1103+###############################################################################
1104+
1105+from openerp.osv import osv, fields
1106+from openerp.tools.translate import _
1107+import decimal_precision as dp
1108+import time
1109+
1110+
1111+class stock_invoice_onshipping(osv.TransientModel):
1112+
1113+ _inherit = 'stock.invoice.onshipping'
1114+
1115+ def open_invoice(self, cur, uid, ids, context=None):
1116+ """
1117+ Overwrite the wizard to first check that the stock picking elements
1118+ have not expired contract date, if one of then is expired then will
1119+ raise an exception. If not one is expire will peform the create invoice
1120+ action propertly.
1121+ """
1122+ context = context or {}
1123+ active_ids = context.get('active_ids', False)
1124+ active_model = context.get('active_model', False)
1125+ res = {}
1126+ cr_date = time.strftime('%Y-%m-%d')
1127+ if not active_ids:
1128+ return res
1129+ expire_dates = [
1130+ bool(picking_brw.date_contract_expiry < cr_date)
1131+ for picking_brw in self.pool.get(active_model).browse(cur, uid,
1132+ active_ids, context=context)
1133+ if picking_brw.date_contract_expiry]
1134+ done_picking = [
1135+ bool(picking_brw.state == 'done')
1136+ for picking_brw in self.pool.get(active_model).browse(cur, uid,
1137+ active_ids, context=context) ]
1138+ if context.get('force_expiry_pickings', False):
1139+ pass
1140+ elif any(expire_dates) or any(done_picking):
1141+ raise osv.except_osv(_('Invalid Procedure'),
1142+ _('This action can only be peform over not expire contract'
1143+ ' date pickings which also are not in done state.'))
1144+ res = super(stock_invoice_onshipping, self).open_invoice(
1145+ cur, uid, ids, context=context)
1146+ return res
1147
1148=== added file 'stock_purchase_expiry/wizard/stock_invoice_onshipping_view.xml'
1149--- stock_purchase_expiry/wizard/stock_invoice_onshipping_view.xml 1970-01-01 00:00:00 +0000
1150+++ stock_purchase_expiry/wizard/stock_invoice_onshipping_view.xml 2014-07-28 16:33:18 +0000
1151@@ -0,0 +1,18 @@
1152+<?xml version="1.0" encoding="utf-8"?>
1153+<openerp>
1154+ <data>
1155+
1156+ <record model="ir.ui.view" id="stock_invoice_onshipping_spe_view">
1157+ <field name="name">stock.invoice.onshipping.spe.form</field>
1158+ <field name="model">stock.invoice.onshipping</field>
1159+ <field name="inherit_id" ref="stock.view_stock_invoice_onshipping"/>
1160+ <field name="arch" type="xml">
1161+ <xpath expr="//button[@string='Cancel']" position="before">
1162+ <button name="open_invoice" string="Force Create" type="object" context="{'force_expiry_pickings': True}"/>
1163+ or
1164+ </xpath>
1165+ </field>
1166+ </record>
1167+
1168+ </data>
1169+</openerp>
1170
1171=== added directory 'stock_purchase_expiry/workflow'

Subscribers

People subscribed via source and target branches

to all changes: