Improved security

bzr revid: fp@tinyerp.com-20080908233322-wqoyo7t5bvvxpqwe
This commit is contained in:
Fabien Pinckaers 2008-09-09 01:33:22 +02:00
parent e831cb18db
commit aa2cab5c48
5 changed files with 57 additions and 62 deletions

View File

@ -13,54 +13,54 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook>
<page string="Accounting" position="inside">
<group col="2" colspan="2">
<separator string="Customer Accounting Properties" colspan="2"/>
<field name="property_account_receivable"/>
<field name="property_account_tax"/>
<field name="property_payment_term"/>
</group>
<group col="2" colspan="2">
<separator string="Supplier Accounting Properties" colspan="2"/>
<field name="property_account_payable"/>
<field name="property_account_supplier_tax"/>
</group>
<group col="2" colspan="2">
<separator string="Customer Credit" colspan="2"/>
<field name="credit" select="2"/>
<field name="credit_limit" select="2"/>
</group>
<group col="2" colspan="2">
<separator string="Supplier Debit" colspan="2"/>
<field name="debit" select="2"/>
</group>
<field colspan="4" context="address=address" name="bank_ids" nolabel="1">
<form string="Bank account">
<field name="state" select="2"/>
<newline/>
<field name="acc_number" select="1"/>
<newline/>
<field name="bank"/>
<newline/>
<field name="sequence"/>
<field colspan="4" name="name" select="2"/>
<separator colspan="4" string="Bank account owner"/>
<field colspan="4" name="owner_name"/>
<field colspan="4" name="street"/>
<newline/>
<field name="zip"/>
<field name="city"/>
<newline/>
<field completion="1" name="country_id"/>
<field name="state_id"/>
</form>
<tree string="Bank Details">
<field name="state"/>
<field name="owner_name"/>
<field name="acc_number"/>
</tree>
</field>
</page>
<page string="Accounting" position="inside">
<group col="2" colspan="2">
<separator string="Customer Accounting Properties" colspan="2"/>
<field name="property_account_receivable"/>
<field name="property_account_tax"/>
<field name="property_payment_term"/>
</group>
<group col="2" colspan="2">
<separator string="Supplier Accounting Properties" colspan="2"/>
<field name="property_account_payable"/>
<field name="property_account_supplier_tax"/>
</group>
<group col="2" colspan="2">
<separator string="Customer Credit" colspan="2"/>
<field name="credit" select="2"/>
<field name="credit_limit" select="2"/>
</group>
<group col="2" colspan="2">
<separator string="Supplier Debit" colspan="2"/>
<field name="debit" select="2"/>
</group>
<field colspan="4" context="address=address" name="bank_ids" nolabel="1">
<form string="Bank account">
<field name="state" select="2"/>
<newline/>
<field name="acc_number" select="1"/>
<newline/>
<field name="bank"/>
<newline/>
<field name="sequence"/>
<field colspan="4" name="name" select="2"/>
<separator colspan="4" string="Bank account owner"/>
<field colspan="4" name="owner_name"/>
<field colspan="4" name="street"/>
<newline/>
<field name="zip"/>
<field name="city"/>
<newline/>
<field completion="1" name="country_id"/>
<field name="state_id"/>
</form>
<tree string="Bank Details">
<field name="state"/>
<field name="owner_name"/>
<field name="acc_number"/>
</tree>
</field>
</page>
</notebook>
</field>
</record>

View File

@ -20,8 +20,6 @@ access_account_model_line,account.model.line,model_account_model_line,account.gr
access_account_subscription,account.subscription,model_account_subscription,account.group_account_user,1,1,1,1
access_account_subscription_line,account.subscription.line,model_account_subscription_line,account.group_account_user,1,1,1,1
access_account_config_fiscalyear,account.config.fiscalyear,model_account_config_fiscalyear,account.group_account_manager,1,1,1,1
access_account_config_journal_bank_account,account.config.journal.bank.account,model_account_config_journal_bank_account,account.group_account_manager,1,1,1,1
access_account_config_journal_bank_account_line,account.config.journal.bank.account.line,model_account_config_journal_bank_account_line,account.group_account_manager,1,1,1,1
access_account_tax_template,account.tax.template,model_account_tax_template,account.group_account_manager,1,1,1,1
access_account_account_template,account.account.template,model_account_account_template,account.group_account_manager,1,1,1,1
access_account_tax_code_template,account.tax.code.template,model_account_tax_code_template,account.group_account_manager,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
20 access_account_subscription account.subscription model_account_subscription account.group_account_user 1 1 1 1
21 access_account_subscription_line account.subscription.line model_account_subscription_line account.group_account_user 1 1 1 1
22 access_account_config_fiscalyear account.config.fiscalyear model_account_config_fiscalyear account.group_account_manager 1 1 1 1
access_account_config_journal_bank_account account.config.journal.bank.account model_account_config_journal_bank_account account.group_account_manager 1 1 1 1
access_account_config_journal_bank_account_line account.config.journal.bank.account.line model_account_config_journal_bank_account_line account.group_account_manager 1 1 1 1
23 access_account_tax_template account.tax.template model_account_tax_template account.group_account_manager 1 1 1 1
24 access_account_account_template account.account.template model_account_account_template account.group_account_manager 1 1 1 1
25 access_account_tax_code_template account.tax.code.template model_account_tax_code_template account.group_account_manager 1 1 1 1

View File

@ -7,11 +7,11 @@
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="Sales &amp; Purchases" position="inside">
<group colspan="2" col="2">
<separator string="Purchases" colspan="2"/>
<field name="property_product_pricelist_purchase"/>
</group>
<page string="Sales &amp; Purchases" position="inside">
<group colspan="2" col="2">
<separator string="Purchases" colspan="2"/>
<field name="property_product_pricelist_purchase"/>
</group>
</page>
</field>
</record>

View File

@ -332,7 +332,6 @@ class stock_picking(osv.osv):
'type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True),
'active': fields.boolean('Active'),
'note': fields.text('Notes'),
'back_order_id' : fields.many2one('stock.picking', 'Back Order', readonly=True),
#'location_id': fields.many2one('stock.location', 'Location'),
#'location_dest_id': fields.many2one('stock.location', 'Dest. Location'),
@ -364,10 +363,9 @@ class stock_picking(osv.osv):
'invoice_state': lambda *a: 'none',
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
def copy(self, cr, uid, id, data=None, context={}):
data = data or {}
data['name'] = '/'
return super(stock_picking, self).copy(cr, uid, id, data, context)
#def copy(self, cr, uid, id, data=None, context={}):
# data = data or {}
# return super(stock_picking, self).copy(cr, uid, id, data, context)
def onchange_partner_in(self, cr, uid, context, partner_id=None):
sid = self.pool.get('res.partner.address').browse(cr, uid, partner_id, context).partner_id.property_stock_supplier.id

View File

@ -151,10 +151,8 @@ def _do_split(self, cr, uid, data, context):
if not new_picking:
new_picking = pick_obj.copy(cr, uid, pick.id,
{
'name' : '%s (splitted)' % pick.name,
'move_lines' : [],
'state':'draft',
'back_order_id': pick.id
})
new_obj = move_obj.copy(cr, uid, move.id,
{
@ -194,6 +192,7 @@ def _do_split(self, cr, uid, data, context):
wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_confirm', cr)
# Then we finish the good picking
if new_picking:
pick_obj.write(cr, uid, [pick.id], {'backorder_id': new_picking})
pick_obj.action_move(cr, uid, [new_picking])
wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_done', cr)
wf_service.trg_write(uid, 'stock.picking', pick.id, cr)