bzr revid: fp@tinyerp.com-20080903153631-62bibtlpb4hznwxi
This commit is contained in:
Fabien Pinckaers 2008-09-03 17:36:31 +02:00
parent 363585ed40
commit 63cd43dca4
2 changed files with 29 additions and 27 deletions

View File

@ -90,6 +90,7 @@ class purchase_order(osv.osv):
res={}
purchase_obj=self.browse(cr, uid, ids, context=context)
for purchase in purchase_obj:
res[purchase.id] = False
if purchase.order_line:
min_date=purchase.order_line[0].date_planned
for line in purchase.order_line:
@ -165,7 +166,7 @@ class purchase_order(osv.osv):
'invoiced':fields.boolean('Invoiced & Paid', readonly=True, select=True),
'invoiced_rate': fields.function(_invoiced_rate, method=True, string='Invoiced', type='float'),
'invoice_method': fields.selection([('manual','Manual'),('order','From order'),('picking','From picking')], 'Invoicing Control', required=True),
'minimum_planned_date':fields.function(_minimum_planned_date, method=True,store=True, string='Minimum Planned Date', type='date', help="Minimum schedule date of all products."),
'minimum_planned_date':fields.function(_minimum_planned_date, method=True,store=True, string='Planned Date', type='date', help="Minimum schedule date of all products."),
'amount_untaxed': fields.function(_amount_untaxed, method=True, string='Untaxed Amount'),
'amount_tax': fields.function(_amount_tax, method=True, string='Taxes'),
'amount_total': fields.function(_amount_total, method=True, string='Total'),

View File

@ -3,19 +3,19 @@
<data>
<menuitem icon="terp-purchase" id="menu_purchase_root" name="Purchase Management"/>
<record model="ir.ui.view" id="purchase_order_calendar">
<field name="name">purchase.order.calendar</field>
<field name="model">purchase.order</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
<field name="name"/>
<field name="amount_total"/>
<field name="partner_id"/>
</calendar>
</field>
</record>
<record model="ir.ui.view" id="purchase_order_calendar">
<field name="name">purchase.order.calendar</field>
<field name="model">purchase.order</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Calendar View" date_start="minimum_planned_date" color="partner_id">
<field name="name"/>
<field name="amount_total"/>
<field name="partner_id"/>
</calendar>
</field>
</record>
<record id="purchase_order_form" model="ir.ui.view">
<field name="name">purchase.order.form</field>
@ -23,16 +23,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Purchase Order">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="shipped" select="2"/>
<field name="invoiced" select="2"/>
<newline/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
<field name="origin" select="2"/>
<field name="date_order" select="2"/>
<field name="minimum_planned_date"/>
</group>
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="shipped" select="2"/>
<field name="invoiced" select="2"/>
<newline/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)"/>
<field name="origin" select="2"/>
<field name="date_order" select="2"/>
</group>
<notebook colspan="4">
<page string="Purchase Order">
<field name="partner_id" on_change="onchange_partner_id(partner_id)" select="1" domain="[('supplier','=', 1)]"/>
@ -61,13 +60,14 @@
</group>
</page>
<page string="Delivery &amp; Invoices">
<separator string="Delivery" colspan="2"/>
<separator string="Invoice Control" colspan="2"/>
<separator string="Delivery" colspan="2"/>
<separator string="Invoice Control" colspan="2"/>
<field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
<field name="invoice_method"/>
<field name="minimum_planned_date"/>
<field name="location_id"/>
<newline/>
<separator string="Purchase Control" colspan="4"/>
<separator string="Purchase Control" colspan="4"/>
<field name="validator"/>
<field name="date_approve"/>
</page>
@ -134,6 +134,7 @@
<tree string="Purchase Order">
<field name="name"/>
<field name="date_order"/>
<field name="minimum_planned_date"/>
<field name="partner_id"/>
<field name="location_id"/>
<field name="invoiced_rate" widget="progressbar"/>