Added base partner sequence
bzr revid: pinky-714ce5e136bf1585efbdaf70c5638fe0e773bf72
This commit is contained in:
parent
e15c6eff63
commit
1ff13078bf
|
@ -0,0 +1,29 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
# Fabien Pinckaers <fp@tiny.Be>
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import partner_sequence
|
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# Use the custom module to put your specific code in a separate module.
|
||||
#
|
||||
{
|
||||
"name" : "Add an automatic sequence on partners",
|
||||
"version" : "1.0",
|
||||
"author" : "Tiny",
|
||||
"category" : "Generic Modules/Base",
|
||||
"website": "http://www.tinyerp.com",
|
||||
"depends" : ["base"],
|
||||
"demo_xml" : [],
|
||||
"init_xml" : ['partner_sequence.xml'],
|
||||
"update_xml" : [],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
##############################################################################
|
||||
#
|
||||
# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
|
||||
# Fabien Pinckaers <fp@tiny.Be>
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
# programmers who take the whole responsability of assessing all potential
|
||||
# consequences resulting from its eventual inadequacies and bugs
|
||||
# End users who are looking for a ready-to-use solution with commercial
|
||||
# garantees and support are strongly adviced to contract a Free Software
|
||||
# Service Company
|
||||
#
|
||||
# This program is Free Software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv, fields
|
||||
|
||||
class partner_sequence(osv.osv):
|
||||
_inherit = 'res.partner'
|
||||
def create(self, cr, uid, vals, context={}):
|
||||
vals['ref'] = self.pool.get('ir.sequence').get(cr, uid, 'res.partner')
|
||||
res = super(partner_sequence, self).create(cr, uid, vals, context)
|
||||
return res
|
||||
_columns = {
|
||||
'ref': fields.char('Code', size=64, readonly=True),
|
||||
}
|
||||
partner_sequence()
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0"?>
|
||||
<terp>
|
||||
<data noupdate="1">
|
||||
|
||||
#
|
||||
# Sequences for res.partner
|
||||
#
|
||||
|
||||
<record model="ir.sequence.type" id="seq_type_res_partner">
|
||||
<field name="name">Partner code</field>
|
||||
<field name="code">res.partner</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_res_partner">
|
||||
<field name="name">Partner code</field>
|
||||
<field name="code">res.partner</field>
|
||||
<field name="prefix">P/</field>
|
||||
<field name="padding">5</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</terp>
|
|
@ -207,7 +207,7 @@ class product_pricelist_item(osv.osv):
|
|||
|
||||
_name = "product.pricelist.item"
|
||||
_description = "Pricelist item"
|
||||
_order = "sequence"
|
||||
_order = "sequence, min_quantity desc"
|
||||
_defaults = {
|
||||
'base': lambda *a: -1,
|
||||
'min_quantity': lambda *a: 1,
|
||||
|
@ -222,7 +222,7 @@ class product_pricelist_item(osv.osv):
|
|||
'categ_id': fields.many2one('product.category', 'Product Category'),
|
||||
|
||||
'min_quantity': fields.integer('Min. Quantity', required=True),
|
||||
'sequence': fields.integer('Priority', required=True),
|
||||
'sequence': fields.integer('Sequence', required=True),
|
||||
'base': fields.selection(_price_field_get, 'Based on', required=True, size=-1),
|
||||
#'base': fields.many2one('product.price.type', 'Based on', required=True),
|
||||
'base_pricelist_id': fields.many2one('product.pricelist', 'If Other Pricelist'),
|
||||
|
|
|
@ -82,6 +82,17 @@
|
|||
</record>
|
||||
<menuitem name="Inventory Control/Lot Inventory" id="menu_action_inventory_form" action="action_inventory_form"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_inventory_line_form">
|
||||
<field name="name">stock.inventory.line.form</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">stock.inventory.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="stock_inventory_line_tree"/>
|
||||
</record>
|
||||
<menuitem name="Inventory Control/Lot Inventory Line" id="menu_action_inventory_line_form" action="action_inventory_line_form"/>
|
||||
|
||||
|
||||
=============================
|
||||
Lot
|
||||
=============================
|
||||
|
|
Loading…
Reference in New Issue