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'), ('payable','Payable'),
('view','View'), ('view','View'),
('consolidation','Consolidation'), ('consolidation','Consolidation'),
('income','Income'),
('expense','Expense'),
('tax','Tax'),
('cash','Cash'),
#('asset','Asset'),
#('equity','Equity'),
('closed','Closed'), ('closed','Closed'),
], 'Internal Type', required=True,), ], 'Internal Type', required=True,),
'user_type': fields.many2one('account.account.type', 'Account Type'), 'user_type': fields.many2one('account.account.type', 'Account Type'),
'parent_id': fields.many2one('account.account','Parent', ondelete='cascade'), '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): if ('account_id' in vals):
account = account_obj.browse(cr, uid, vals['account_id']) account = account_obj.browse(cr, uid, vals['account_id'])
if journal.type_control_ids: if journal.type_control_ids:
type = account.type type = account.user_type
for t in journal.type_control_ids: for t in journal.type_control_ids:
if type==t.code: if type==t.code:
ok = True ok = True

View File

@ -120,7 +120,7 @@
id="account_analytic_instance_model_open"/> id="account_analytic_instance_model_open"/>
<menuitem <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" id="menu_account_analytic_plan_instance_action"
action="account_analytic_plan_instance_action"/> action="account_analytic_plan_instance_action"/>

View File

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

View File

@ -253,7 +253,7 @@ class product_template(osv.osv):
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True), 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True),
'list_price': fields.float('Sale Price', digits=(16, int(config['price_accuracy']))), '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']))), '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': fields.float('Gross weight'),
'weight_net': fields.float('Net weight'), 'weight_net': fields.float('Net weight'),
'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True), '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 eval="7" name="priority"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Product"> <form string="Product">
<group colspan="3" col="4"> <group colspan="2" col="4">
<separator string="Product Description" colspan="4"/> <separator string="Product Description" colspan="4"/>
<field name="name" select="1"/> <field name="name" select="1"/>
<field name="default_code" select="1"/> <field name="default_code" select="1"/>
<field groups="base.group_extended" name="variants" select="2"/> <field groups="base.group_extended" name="variants" select="2"/>
<field groups="base.group_extended" name="ean13" select="2"/> <field groups="base.group_extended" name="ean13" select="2"/>
</group> </group>
<group colspan="1" col="2"> <group colspan="2" col="2">
<separator string="Product Type" colspan="2"/> <separator string="Product Type" colspan="2"/>
<field name="sale_ok" select="2"/> <field name="sale_ok" select="2"/>
<field name="purchase_ok" select="2"/> <field name="purchase_ok" select="2"/>
@ -166,13 +166,24 @@
</form> </form>
</field> </field>
</record> </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"> <record id="product_category_tree_view" model="ir.ui.view">
<field name="name">product.category.tree</field> <field name="name">product.category.tree</field>
<field name="model">product.category</field> <field name="model">product.category</field>
<field name="type">tree</field> <field name="type">tree</field>
<field name="field_parent">child_id</field> <field name="field_parent">child_id</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Products Categories"> <tree string="Product Categories">
<field name="complete_name"/> <field name="complete_name"/>
</tree> </tree>
</field> </field>

View File

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

View File

@ -49,7 +49,7 @@ def _get_returns(self, cr, uid, data, context):
pick=pick_obj.browse(cr, uid, [data['id']])[0] pick=pick_obj.browse(cr, uid, [data['id']])[0]
res={} res={}
fields.clear() 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]: for m in [line for line in pick.move_lines]:
quantity=m.product_qty quantity=m.product_qty
arch_lst.append('<field name="return%s"/>\n<newline/>' % (m.id,)) 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' new_invoice_state='2binvoiced'
else: else:
new_invoice_state=pick.invoice_state 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_lst.append('</form>')
arch.string='\n'.join(arch_lst) arch.string='\n'.join(arch_lst)
return res return res