Merge lp:~vauxoo/addons-vauxoo/stock_invoice_state_editable-dev-luis into lp:addons-vauxoo

Proposed by Luis Torres - http://www.vauxoo.com
Status: Merged
Merged at revision: 384
Proposed branch: lp:~vauxoo/addons-vauxoo/stock_invoice_state_editable-dev-luis
Merge into: lp:addons-vauxoo
Diff against target: 178 lines (+152/-0)
5 files modified
stock_invoice_state_editable/__init__.py (+26/-0)
stock_invoice_state_editable/__openerp__.py (+43/-0)
stock_invoice_state_editable/security/stock_security.xml (+8/-0)
stock_invoice_state_editable/stock.py (+37/-0)
stock_invoice_state_editable/stock_view.xml (+38/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/stock_invoice_state_editable-dev-luis
Reviewer Review Type Date Requested Status
Moisés López - http://www.vauxoo.com Pending
Review via email: mp+118176@code.launchpad.net

Description of the change

Se realizo el modulo, para que los usuarios que pertenecen a un grupo puedan modificar el estado de la factura

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'stock_invoice_state_editable'
2=== added file 'stock_invoice_state_editable/__init__.py'
3--- stock_invoice_state_editable/__init__.py 1970-01-01 00:00:00 +0000
4+++ stock_invoice_state_editable/__init__.py 2012-08-03 18:42:24 +0000
5@@ -0,0 +1,26 @@
6+# -*- encoding: utf-8 -*-
7+###########################################################################
8+# Module Writen to OpenERP, Open Source Management Solution
9+#
10+# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/
11+# All Rights Reserved.
12+# info Vauxoo (info@vauxoo.com)
13+############################################################################
14+# Coded by: Luis Torres (luis_t@vauxoo.com)
15+############################################################################
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
19+# published by the Free Software Foundation, either version 3 of the
20+# License, or (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 stock
32
33=== added file 'stock_invoice_state_editable/__openerp__.py'
34--- stock_invoice_state_editable/__openerp__.py 1970-01-01 00:00:00 +0000
35+++ stock_invoice_state_editable/__openerp__.py 2012-08-03 18:42:24 +0000
36@@ -0,0 +1,43 @@
37+# -*- encoding: utf-8 -*-
38+###########################################################################
39+# Module Writen to OpenERP, Open Source Management Solution
40+#
41+# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/
42+# All Rights Reserved.
43+# info Vauxoo (info@vauxoo.com)
44+############################################################################
45+# Coded by: Luis Torres (luis_t@vauxoo.com)
46+############################################################################
47+#
48+# This program is free software: you can redistribute it and/or modify
49+# it under the terms of the GNU Affero General Public License as
50+# published by the Free Software Foundation, either version 3 of the
51+# License, or (at your option) any later version.
52+#
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU Affero General Public License for more details.
57+#
58+# You should have received a copy of the GNU Affero General Public License
59+# along with this program. If not, see <http://www.gnu.org/licenses/>.
60+#
61+##############################################################################
62+{
63+ "name" : "Stock invoice state editable",
64+ "version" : "1.0",
65+ "author" : "Vauxoo",
66+ "category" : "Stock",
67+ "description" : """This module change readonly in field invoice state for a group""",
68+ "website" : "http://www.vauxoo.com/",
69+ "license" : "AGPL-3",
70+ "depends" : ["stock",],
71+ "init_xml" : [],
72+ "demo_xml" : [],
73+ "update_xml" : [
74+ "security/stock_security.xml",
75+ "stock_view.xml",
76+ ],
77+ "installable" : True,
78+ "active" : False,
79+}
80
81=== added directory 'stock_invoice_state_editable/security'
82=== added file 'stock_invoice_state_editable/security/stock_security.xml'
83--- stock_invoice_state_editable/security/stock_security.xml 1970-01-01 00:00:00 +0000
84+++ stock_invoice_state_editable/security/stock_security.xml 2012-08-03 18:42:24 +0000
85@@ -0,0 +1,8 @@
86+<?xml version="1.0" encoding="utf-8"?>
87+<openerp>
88+ <data noupdate="1">
89+ <record id="base.group_state_invoice" model="res.groups">
90+ <field name="name">Stock State Invoice</field>
91+ </record>
92+ </data>
93+</openerp>
94
95=== added file 'stock_invoice_state_editable/stock.py'
96--- stock_invoice_state_editable/stock.py 1970-01-01 00:00:00 +0000
97+++ stock_invoice_state_editable/stock.py 2012-08-03 18:42:24 +0000
98@@ -0,0 +1,37 @@
99+# -*- encoding: utf-8 -*-
100+###########################################################################
101+# Module Writen to OpenERP, Open Source Management Solution
102+#
103+# Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/
104+# All Rights Reserved.
105+# info Vauxoo (info@vauxoo.com)
106+############################################################################
107+# Coded by: Luis Torres (luis_t@vauxoo.com)
108+############################################################################
109+#
110+# This program is free software: you can redistribute it and/or modify
111+# it under the terms of the GNU Affero General Public License as
112+# published by the Free Software Foundation, either version 3 of the
113+# License, or (at your option) any later version.
114+#
115+# This program is distributed in the hope that it will be useful,
116+# but WITHOUT ANY WARRANTY; without even the implied warranty of
117+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
118+# GNU Affero General Public License for more details.
119+#
120+# You should have received a copy of the GNU Affero General Public License
121+# along with this program. If not, see <http://www.gnu.org/licenses/>.
122+#
123+##############################################################################
124+from osv import osv, fields
125+
126+class stock_picking(osv.osv):
127+ _inherit = 'stock.picking'
128+ _columns = {
129+ 'invoice_state': fields.selection([
130+ ("invoiced", "Invoiced"),
131+ ("2binvoiced", "To Be Invoiced"),
132+ ("none", "Not Applicable")], "Invoice Control",
133+ select=True, required=True, readonly=False),#, states={'draft': [('readonly', False)]}),
134+ }
135+stock_picking()
136
137=== added file 'stock_invoice_state_editable/stock_view.xml'
138--- stock_invoice_state_editable/stock_view.xml 1970-01-01 00:00:00 +0000
139+++ stock_invoice_state_editable/stock_view.xml 2012-08-03 18:42:24 +0000
140@@ -0,0 +1,38 @@
141+<?xml version="1.0" encoding="utf-8"?>
142+<openerp>
143+ <data>
144+ <record model="ir.ui.view" id="view_stock_inherit_state_invoice_form">
145+ <field name="name">view.stock.inherit.state.invoice.form</field>
146+ <field name="model">stock.picking</field>
147+ <field name="type">form</field>
148+ <field name="inherit_id" ref="stock.view_picking_form"/>
149+ <field name="arch" type="xml">
150+ <xpath expr="/form/group/group/field[@name='invoice_state']" position="replace">
151+ <field name="invoice_state" groups="base.group_state_invoice"/>
152+ </xpath>
153+ </field>
154+ </record>
155+ <record model="ir.ui.view" id="view_stock_inherit_state_invoice_in_form">
156+ <field name="name">view.stock.inherit.state.invoice.in.form</field>
157+ <field name="model">stock.picking</field>
158+ <field name="type">form</field>
159+ <field name="inherit_id" ref="stock.view_picking_in_form"/>
160+ <field name="arch" type="xml">
161+ <xpath expr="/form/group/group/field[@name='invoice_state']" position="replace">
162+ <field name="invoice_state" groups="base.group_state_invoice"/>
163+ </xpath>
164+ </field>
165+ </record>
166+ <record model="ir.ui.view" id="view_stock_inherit_state_invoice_out_form">
167+ <field name="name">view.stock.inherit.state.invoice.out.form</field>
168+ <field name="model">stock.picking</field>
169+ <field name="type">form</field>
170+ <field name="inherit_id" ref="stock.view_picking_out_form"/>
171+ <field name="arch" type="xml">
172+ <xpath expr="/form/group/group/field[@name='invoice_state']" position="replace">
173+ <field name="invoice_state" groups="base.group_state_invoice"/>
174+ </xpath>
175+ </field>
176+ </record>
177+ </data>
178+</openerp>