Bugfixes and Improvements

bzr revid: fp@tinyerp.com-20080905150438-3g4m0thz2d9636k3
This commit is contained in:
Fabien Pinckaers 2008-09-05 17:04:38 +02:00
parent 6fbedbf2e5
commit 9fb44bfedd
8 changed files with 75 additions and 71 deletions

View File

@ -233,14 +233,8 @@ class account_account(osv.osv):
('payable','Payable'),
('view','View'),
('consolidation','Consolidation'),
('income','Income'),
('expense','Expense'),
('tax','Tax'),
('cash','Cash'),
#('asset','Asset'),
#('equity','Equity'),
('closed','Closed'),
], 'Internal Type', required=True,),
], 'Internal Type', required=True,),
'user_type': fields.many2one('account.account.type', 'Account Type'),
'parent_id': fields.many2one('account.account','Parent', ondelete='cascade'),

View File

@ -682,7 +682,7 @@ class account_move_line(osv.osv):
if ('account_id' in vals):
account = account_obj.browse(cr, uid, vals['account_id'])
if journal.type_control_ids:
type = account.type
type = account.user_type
for t in journal.type_control_ids:
if type==t.code:
ok = True

View File

@ -120,7 +120,7 @@
id="account_analytic_instance_model_open"/>
<menuitem
name="Analytic Distribution's models" parent="account.next_id_32"
name="Analytic Distribution's models" parent="account.account_def_analytic_journal"
id="menu_account_analytic_plan_instance_action"
action="account_analytic_plan_instance_action"/>

View File

@ -390,27 +390,26 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Production orders">
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="date_planned" select="1"/>
<field name="priority"/>
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
<field name="product_qty"/>
<field name="product_uom"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="date_planned" select="1"/>
<field name="priority"/>
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
<field name="product_qty"/>
<field name="product_uom"/>
<label string="" colspan="2"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
</group>
</group>
<notebook colspan="4">
<page string="Consumed Products">
<field name="location_src_id" select="2"/>
<field name="location_dest_id"/>
<field name="bom_id" select="2"/>
<field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
<field name="origin" select="1"/>
<newline/>
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"/>
<group col="9" colspan="4">
<field name="state" select="2"/>
@ -611,51 +610,51 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Procurement">
<notebook>
<page string="Procurement Details">
<group col="2" colspan="2">
<separator colspan="2" string="References"/>
<field name="name" select="1" string="Procurement Reason"/>
<field name="origin" select="2"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Planification"/>
<field name="date_planned" select="1"/>
<field name="procure_method" select="2"/>
<field name="priority"/>
</group>
<notebook>
<page string="Procurement Details">
<group col="2" colspan="2">
<separator colspan="2" string="References"/>
<field name="name" select="1" string="Procurement Reason"/>
<field name="origin" select="2"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Planification"/>
<field name="date_planned" select="1"/>
<field name="procure_method" select="2"/>
<field name="priority"/>
</group>
<separator colspan="4" string="Product &amp; Location"/>
<field name="product_id" select="1"/>
<field name="location_id" select="2"/>
<field name="product_qty"/>
<field name="product_uom"/>
<separator colspan="4" string="Product &amp; Location"/>
<field name="product_id" select="1"/>
<field name="location_id" select="2"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
<field name="product_uos_qty" groups="product.group_uos"/>
<field name="product_uos" groups="product.group_uos"/>
<separator colspan="4" string="Status"/>
<field colspan="4" name="message" readonly="1"/>
<field name="state" readonly="1" select="2"/>
<group col="7" colspan="2">
<button name="button_confirm" states="draft" string="Confirm"/>
<button name="button_restart" states="exception" string="Retry"/>
<button name="button_cancel" states="exception,waiting" string="Cancel"/>
<button name="button_check" states="confirmed" string="Run procurement"/>
<button name="button_cancel" states="draft,running" string="Cancel"/>
</group>
</page>
<page string="Extra Information">
<separator colspan="4" string="Details"/>
<field name="bom_id" select="2"/>
<field name="move_id"/>
<field name="date_close" select="2"/>
<field name="close_move"/>
<field name="purchase_id"/>
<separator colspan="4" string="Properties"/>
<field colspan="4" name="property_ids" nolabel="1"/>
</page>
</notebook>
<separator colspan="4" string="Status"/>
<field colspan="4" name="message" readonly="1"/>
<field name="state" readonly="1" select="2"/>
<group col="7" colspan="2">
<button name="button_confirm" states="draft" string="Confirm"/>
<button name="button_restart" states="exception" string="Retry"/>
<button name="button_cancel" states="exception,waiting" string="Cancel"/>
<button name="button_check" states="confirmed" string="Run procurement"/>
<button name="button_cancel" states="draft,running" string="Cancel"/>
</group>
</page>
<page string="Extra Information">
<separator colspan="4" string="Details"/>
<field name="bom_id" select="2"/>
<field name="move_id"/>
<field name="date_close" select="2"/>
<field name="close_move"/>
<field name="purchase_id"/>
<separator colspan="4" string="Properties"/>
<field colspan="4" name="property_ids" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>

View File

@ -253,7 +253,7 @@ class product_template(osv.osv):
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True),
'list_price': fields.float('Sale Price', digits=(16, int(config['price_accuracy']))),
'standard_price': fields.float('Cost Price', required=True, digits=(16, int(config['price_accuracy']))),
'volume': fields.float('Volume'),
'volume': fields.float('Volume', help="The weight in Kg."),
'weight': fields.float('Gross weight'),
'weight_net': fields.float('Net weight'),
'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True),

View File

@ -31,14 +31,14 @@
<field eval="7" name="priority"/>
<field name="arch" type="xml">
<form string="Product">
<group colspan="3" col="4">
<group colspan="2" col="4">
<separator string="Product Description" colspan="4"/>
<field name="name" select="1"/>
<field name="default_code" select="1"/>
<field groups="base.group_extended" name="variants" select="2"/>
<field groups="base.group_extended" name="ean13" select="2"/>
</group>
<group colspan="1" col="2">
<group colspan="2" col="2">
<separator string="Product Type" colspan="2"/>
<field name="sale_ok" select="2"/>
<field name="purchase_ok" select="2"/>
@ -166,13 +166,24 @@
</form>
</field>
</record>
<record id="product_category_list_view" model="ir.ui.view">
<field name="name">product.category.list</field>
<field name="model">product.category</field>
<field name="type">tree</field>
<field name="sequence">1</field>
<field name="arch" type="xml">
<tree string="Product Categories">
<field name="complete_name"/>
</tree>
</field>
</record>
<record id="product_category_tree_view" model="ir.ui.view">
<field name="name">product.category.tree</field>
<field name="model">product.category</field>
<field name="type">tree</field>
<field name="field_parent">child_id</field>
<field name="arch" type="xml">
<tree string="Products Categories">
<tree string="Product Categories">
<field name="complete_name"/>
</tree>
</field>

View File

@ -572,6 +572,7 @@
<field name="date" select="1"/>
<newline/>
<field name="address_id" select="2"/>
<field name="origin" select="2"/>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
@ -616,9 +617,8 @@
<field colspan="4" name="note" nolabel="1"/>
</page>
<page string="Others info">
<field name="origin" select="2"/>
<field name="active" select="2"/>
<field name="auto_picking"/>
<field name="active" select="2"/>
<newline/>
<field name="move_type"/>
</page>
@ -727,6 +727,7 @@
<field name="date" select="1"/>
<newline/>
<field name="address_id" select="2"/>
<field name="origin" select="2"/>
<notebook colspan="4">
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list">
@ -771,7 +772,6 @@
<field colspan="4" name="note" nolabel="1"/>
</page>
<page string="Others info">
<field name="origin" select="2"/>
<field name="active" select="2"/>
<field name="auto_picking"/>
<newline/>

View File

@ -49,7 +49,7 @@ def _get_returns(self, cr, uid, data, context):
pick=pick_obj.browse(cr, uid, [data['id']])[0]
res={}
fields.clear()
arch_lst=['<?xml version="1.0"?>', '<form string="Return lines">', '<label string="Indicate here the quantity of the return line." colspan="4"/>']
arch_lst=['<?xml version="1.0"?>', '<form string="Return lines">', '<label string="Provide the quantities of the returned products." colspan="4"/>']
for m in [line for line in pick.move_lines]:
quantity=m.product_qty
arch_lst.append('<field name="return%s"/>\n<newline/>' % (m.id,))
@ -60,7 +60,7 @@ def _get_returns(self, cr, uid, data, context):
new_invoice_state='2binvoiced'
else:
new_invoice_state=pick.invoice_state
fields['invoice_state']={'string':'Invoice state', 'type':'selection', 'default':make_default(new_invoice_state), 'selection':[('2binvoiced', 'to be invoiced'), ('none', 'None')]}
fields['invoice_state']={'string':'Invoice state', 'type':'selection', 'default':make_default(new_invoice_state), 'required':True, 'selection':[('2binvoiced', 'to be invoiced'), ('none', 'None')]}
arch_lst.append('</form>')
arch.string='\n'.join(arch_lst)
return res