[MERGE]: :Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: sbh@tinyerp.com-20100621110648-6tgwdf8cixf53nr9
This commit is contained in:
@@ -247,6 +247,7 @@
|
||||
<field name="count_comments" />
|
||||
<field name="count_votes" />
|
||||
<field name="state"/>
|
||||
<button name="idea_open" string="Open" states="draft" icon="terp-gtk-go-back-rtl"/>
|
||||
<button name="%(idea.action_idea_post_vote)d" icon="gtk-execute" type="action" states="open" string="Submit Vote"/>
|
||||
<button name="idea_close" string="Accept" states="open" icon="gtk-jump-to"/>
|
||||
<button name="idea_cancel" string="Refuse" states="open" icon="gtk-cancel"/>
|
||||
@@ -372,7 +373,7 @@
|
||||
<field name="search_view_id" ref="view_idea_vote_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Votes" parent="menu_ideas" id="menu_idea_vote" action="action_idea_vote"/>
|
||||
<menuitem name="Votes" parent="menu_idea_reporting" id="menu_idea_vote" action="action_idea_vote"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -101,6 +101,7 @@ class idea_post_vote(osv.osv_memory):
|
||||
"""
|
||||
|
||||
vote_ids = context and context.get('active_ids', []) or []
|
||||
vote_id = context['active_ids'][0]
|
||||
vote_pool = self.pool.get('idea.vote')
|
||||
idea_pool = self.pool.get('idea.idea')
|
||||
comment_pool = self.pool.get('idea.comment')
|
||||
|
||||
@@ -53,16 +53,51 @@
|
||||
<field name="state"/>
|
||||
<field name="descript"/>
|
||||
<field name="price" sum="Total price"/>
|
||||
<button colspan="1"
|
||||
name="%(action_lunch_order_confirm)d"
|
||||
string="Confirm Order"
|
||||
type="action" states="draft"
|
||||
icon="terp-gtk-go-back-rtl" />
|
||||
<button colspan="1"
|
||||
name="%(action_lunch_order_cancel)d"
|
||||
string="Cancel Order"
|
||||
type="action" states="confirmed"
|
||||
icon="terp-gtk-stop" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Lunch order Search view -->
|
||||
|
||||
<record id="view_lunch_order_filter" model="ir.ui.view">
|
||||
<field name="name">lunch.order.list.select</field>
|
||||
<field name="model">lunch.order</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Lunch Order">
|
||||
<filter icon="terp-check" string="To Confirm" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=',('confirmed'))]"/>
|
||||
<filter icon="terp-go-today" name="Today" string="Today" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id"/>
|
||||
<field name="date"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Cashbox" icon="terp-dolar" domain="[]" context="{'group_by':'cashmove'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Lunch order Action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_lunch_order_form">
|
||||
<field name="name">Lunch Orders</field>
|
||||
<field name="res_model">lunch.order</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_lunch_order_filter"/>
|
||||
<field name="context">{"search_default_Today":1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Lunch Order" parent="menu_lunch"
|
||||
@@ -133,20 +168,45 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="CashMove" editable="top">
|
||||
<field name="box" select="1"/>
|
||||
<field name="name" select="1" required="1"/>
|
||||
<field name="user_cashmove" select="1"/>
|
||||
<field name="amount" select="1" sum="Total amount"/>
|
||||
<field name="box" select="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="amount" select="1" sum="Total amount"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Cash Move Search View -->
|
||||
|
||||
<record id="view_lunch_cashmove_filter" model="ir.ui.view">
|
||||
<field name="name">lunch.cashmove.list.select</field>
|
||||
<field name="model">lunch.cashmove</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search CashMove">
|
||||
<filter icon="terp-go-today" name="Today" string="Today" domain="[('create_date','<=',time.strftime('%%Y-%%m-%%d 23:59:59'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="user_cashmove"/>
|
||||
<field name="create_date"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_cashmove'}"/>
|
||||
<filter string="Box" icon="terp-accessories-archiver+" domain="[]" context="{'group_by':'box'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Cash Move Action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_lunch_cashmove_form">
|
||||
<field name="name">CashMove</field>
|
||||
<field name="res_model">lunch.cashmove</field>
|
||||
<field name="search_view_id" ref="view_lunch_cashmove_filter"/>
|
||||
<field name="context">{"search_default_Today":1}</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Cash Moves" parent="menu_lunch"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -39,7 +39,7 @@ class res_partner_manufacturer(osv.osv):
|
||||
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),
|
||||
}
|
||||
_defaults = {
|
||||
'authorized': lambda *a: True,
|
||||
'authorized': True,
|
||||
}
|
||||
|
||||
res_partner_manufacturer()
|
||||
|
||||
@@ -639,9 +639,6 @@ class stock_picking(osv.osv):
|
||||
self.write(cr, uid, ids, {'state': 'confirmed'})
|
||||
todo = []
|
||||
for picking in self.browse(cr, uid, ids, context=context):
|
||||
if not picking.move_lines:
|
||||
raise osv.except_osv(_('Error !'),_('You can not confirm Picking without Stock Move .'))
|
||||
|
||||
for r in picking.move_lines:
|
||||
if r.state == 'draft':
|
||||
todo.append(r.id)
|
||||
@@ -691,7 +688,7 @@ class stock_picking(osv.osv):
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for pick in self.browse(cr, uid, ids):
|
||||
if not pick.move_lines:
|
||||
raise osv.except_osv(_('Error !'),_('You can not done Picking without Move .'))
|
||||
raise osv.except_osv(_('Error !'),_('You can not process picking without stock moves'))
|
||||
wf_service.trg_validate(uid, 'stock.picking', pick.id,
|
||||
'button_confirm', cr)
|
||||
#move_ids = [x.id for x in pick.move_lines]
|
||||
@@ -1706,7 +1703,7 @@ class stock_move(osv.osv):
|
||||
tracking_id = tracking_obj.search(cr, uid, ['name','=', tracking])
|
||||
if prodlot_id:
|
||||
update_val['prodlot_id'] = prodlot_id
|
||||
else:
|
||||
else:
|
||||
tracking_id = tracking_obj.create(cr, uid, {'name': tracking}, {'product_id': self.browse(cr, uid, ids)[0].product_id.id})
|
||||
update_val['tracking_id'] = tracking_id
|
||||
else:
|
||||
|
||||
@@ -80,19 +80,19 @@ class product_pulled_flow(osv.osv):
|
||||
required=True,),
|
||||
}
|
||||
_defaults = {
|
||||
'cancel_cascade': lambda *arg: False,
|
||||
'procure_method': lambda *args: 'make_to_stock',
|
||||
'type_proc': lambda *args: 'move',
|
||||
'picking_type':lambda *args:'out',
|
||||
'invoice_state': lambda *args: 'none',
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.move', context=c),
|
||||
'cancel_cascade': False,
|
||||
'procure_method': 'make_to_stock',
|
||||
'type_proc': 'move',
|
||||
'picking_type': 'out',
|
||||
'invoice_state': 'none',
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'product.pulled.flow', context=c),
|
||||
}
|
||||
product_pulled_flow()
|
||||
|
||||
class product_product(osv.osv):
|
||||
_inherit = 'product.product'
|
||||
_columns = {
|
||||
'flow_pull_ids': fields.one2many('product.pulled.flow', 'product_id', 'Pulled Flows'),
|
||||
'flow_pull_ids': fields.one2many('product.pulled.flow', 'product_id', 'Pulled Flows'),
|
||||
'path_ids': fields.one2many('stock.location.path', 'product_id',
|
||||
'Pushed Flow',
|
||||
help="These rules set the right path of the product in the "\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -28,7 +28,7 @@ class product(osv.osv):
|
||||
'auto_pick': fields.boolean('Auto Picking', help="Auto picking for raw materials of production orders.")
|
||||
}
|
||||
_defaults = {
|
||||
'auto_pick': lambda *args: True
|
||||
'auto_pick': True
|
||||
}
|
||||
product()
|
||||
|
||||
|
||||
@@ -152,6 +152,9 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="document_tree"/>
|
||||
</record>
|
||||
<menuitem action="action_document_form" id="menu_action_document_form" parent="subscription.next_id_45"/>
|
||||
<menuitem name="Configuration" parent="base.menu_tools"
|
||||
id="base.menu_lunch_survey_root" sequence="20" />
|
||||
<menuitem id="config_recuuring_event" name="Recurring Events" parent="base.menu_lunch_survey_root" sequence="4"/>
|
||||
<menuitem action="action_document_form" id="menu_action_document_form" parent="config_recuuring_event"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user