[IMP] merge note and name for PO, SO, Invoice Lines

bzr revid: fp@openerp.com-20120714211827-fe8e1mbz4cu37ayc
This commit is contained in:
Fabien Pinckaers 2012-07-14 23:18:27 +02:00
parent 6eaa79227e
commit 04d0b232ea
4 changed files with 14 additions and 18 deletions

View File

@ -164,8 +164,8 @@ class purchase_order(osv.osv):
'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, change_default=True),
'dest_address_id':fields.many2one('res.partner', 'Customer Address (Direct Delivery)',
states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},
help="Put an address if you want to deliver directly from the supplier to the customer." \
"In this case, it will remove the warehouse link and set the customer location."
help="Put an address if you want to deliver directly from the supplier to the customer. " \
"Otherwise, keep empty to deliver to your own company."
),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}),
'location_id': fields.many2one('stock.location', 'Destination', required=True, domain=[('usage','<>','view')]),
@ -796,7 +796,7 @@ class purchase_order_line(osv.osv):
return False
_columns = {
'name': fields.char('Description', size=256, required=True),
'name': fields.text('Description', required=True),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
'date_planned': fields.date('Scheduled Date', required=True, select=True),
'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),

View File

@ -221,9 +221,11 @@
<field name="amount_untaxed"/>
<field name="amount_tax"/>
<div class="oe_subtotal_footer_separator oe_inline" colspan="2">
<button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute" class="oe_inline oe_left"/>
<field name="amount_total"/>
<label name="amount_total"/>
<button name="button_dummy"
states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
</div>
<field name="amount_total" nolabel="1"/>
</group>
<div class="oe_clear"/>
<label for="notes"/>
@ -231,24 +233,19 @@
</page>
<page string="Delivery &amp; Invoicing">
<group>
<group string="Delivery">
<group>
<field name="dest_address_id" string="Customer Address" on_change="onchange_dest_address_id(dest_address_id)"/>
<field name="minimum_planned_date"/>
<field name="location_id" groups="stock.group_locations"/>
<field name="shipped" groups="base.group_no_one"/>
</group>
<group>
<field name="validator" groups="base.group_no_one"/>
<field name="date_approve"/>
</group>
</group>
<group string="Invoicing">
<group>
<field name="invoice_method"/>
<field name="invoiced"/>
</group>
<group>
<field name="fiscal_position"/>
<!-- we do not need these fields anymore, the information is in open chatter -->
<field name="validator" groups="base.group_no_one"/>
<field name="date_approve" groups="base.group_no_one"/>
</group>
</group>
<separator string="Invoices"/>

View File

@ -887,7 +887,7 @@ class sale_order(osv.osv):
'move_type': order.picking_policy,
'sale_id': order.id,
'partner_id': order.partner_shipping_id.id,
'note': '\n'.join(line.name.split('\n')[1:]),
'note': order.note,
'invoice_state': (order.order_policy=='picking' and '2binvoiced') or 'none',
'company_id': order.company_id.id,
}

View File

@ -475,7 +475,6 @@
<group>
<group>
<field name="product_id" readonly="1"/>
<field name="name" groups="base.group_no_one"/>
<label name="product_uom_qty"/>
<div>
<field name="product_uom_qty" readonly="1" class="oe_inline"/>
@ -490,8 +489,8 @@
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
</group>
</group>
<separator string="Notes" groups="base.group_sale_notes_subtotal"/>
<field name="notes" groups="base.group_sale_notes_subtotal"/>
<label for="name"/>
<field name="name"/>
</sheet>
</form>
</field>