[IMP] delivery: small improvement on rml
[IMP] procurement: typo corrected [FIX] sale: error occured when people invoiced a line of a sale order then tried to invoice the whole sale order. Now it raises an error because they are supposed to finish the billing process of that SO by line [IMP] sale: small improvements in view [IMP] sale_crm: lots of improvments * made it use the onchange defined on sale.order.line * corrected view that displayed error client side because of unknown args passed in context + added the note tab * fix the sale.order.line creation in order to give also the price_unit and qty (and all other field of a sale.order.line, actually) * removed unecessary attributes on sale.order.make.line [IMP] sale_journal: created menu structure + removed widget selection not compatible with domain [FIX] sale_layout: corrected rml (total net, taxes, total taxes included were missing + 'your reference' as wrongly filled [IMP] sale_layout: removed the inheritance of tree view for lines and added a domain=[('layout_type','=','article')] on the menuitem sales \ billing \ lines to invoice [IMP] project: duplicating a task doesn't copy the active field, which is also replaced by a function fields with store=true bzr revid: qdp-launchpad@tinyerp.com-20100718194357-eqip22swh8as90n9
This commit is contained in:
parent
6a25ae18f5
commit
bc0937dd75
|
@ -114,7 +114,7 @@
|
|||
<blockTable colWidths="287.0,254.0" repeatRows="1" style="Tableau1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Invoiced to</para>
|
||||
<para style="terp_default_Bold_9">[[ o.sale_id and o.sale_id.partner_invoice_id and 'Invoiced to' or '' ]]</para>
|
||||
<para style="terp_default_9">[[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.partner_id.name or '']]</para>
|
||||
<para style="terp_default_9">[[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.name or '']]</para>
|
||||
<para style="terp_default_9">[[ o.sale_id and o.sale_id.partner_invoice_id and o.sale_id.partner_invoice_id.street or '']]</para>
|
||||
|
|
|
@ -319,7 +319,7 @@ class procurement_order(osv.osv):
|
|||
move_obj = self.pool.get('stock.move')
|
||||
for procurement in self.browse(cr, uid, ids):
|
||||
if procurement.product_qty <= 0.00:
|
||||
raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity of Procurement Order(s), it should not be less than 1!'))
|
||||
raise osv.except_osv(_('Data Insufficient !'), _('Please check the Quantity in Procurement Order(s), it should not be less than 1!'))
|
||||
if procurement.product_id.type in ('product', 'consu'):
|
||||
if not procurement.move_id:
|
||||
source = procurement.location_id.id
|
||||
|
|
|
@ -337,6 +337,7 @@ class task(osv.osv):
|
|||
def copy_data(self, cr, uid, id, default={}, context=None):
|
||||
default = default or {}
|
||||
default['work_ids'] = []
|
||||
default['active'] = True
|
||||
return super(task, self).copy_data(cr, uid, id, default, context)
|
||||
|
||||
def _check_dates(self, cr, uid, ids, context=None):
|
||||
|
@ -353,8 +354,17 @@ class task(osv.osv):
|
|||
return False
|
||||
return True
|
||||
|
||||
def _is_template(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = {}
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
res[task.id] = True
|
||||
if task.project_id:
|
||||
if task.project_id.active == False or task.project_id.state == 'template':
|
||||
res[task.id] = False
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the task without removing it. This is basically used for the management of templates of projects and tasks."),
|
||||
'active': fields.function(_is_template, method=True, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."),
|
||||
'name': fields.char('Task Summary', size=128, required=True),
|
||||
'description': fields.text('Description'),
|
||||
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'),
|
||||
|
|
|
@ -473,7 +473,9 @@ class sale_order(osv.osv):
|
|||
for o in self.browse(cr, uid, ids):
|
||||
lines = []
|
||||
for line in o.order_line:
|
||||
if (line.state in states) and not line.invoiced:
|
||||
if line.invoiced:
|
||||
raise osv.except_osv(_('Error !'), _('The Sale Order already has some lines invoiced. You should continue the billing process by line.'))
|
||||
elif (line.state in states):
|
||||
lines.append(line.id)
|
||||
created_lines = self.pool.get('sale.order.line').invoice_line_create(cr, uid, lines)
|
||||
if created_lines:
|
||||
|
@ -830,11 +832,11 @@ class sale_order_line(osv.osv):
|
|||
'notes': fields.text('Notes'),
|
||||
'th_weight': fields.float('Weight', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'state': fields.selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('done', 'Done'),('cancel', 'Cancelled'),('exception', 'Exception')], 'State', required=True, readonly=True,
|
||||
help='* The \'Draft\' state is set automatically when sale order in draft state. \
|
||||
\n* The \'Confirmed\' state is set automatically when sale order in confirm state. \
|
||||
\n* The \'Exception\' state is set automatically when sale order is set as exception. \
|
||||
\n* The \'Done\' state is set automatically when sale order is set as done. \
|
||||
\n* The \'Cancelled\' state is set automatically when user cancel sale order.'),
|
||||
help='* The \'Draft\' state is set when the related sale order in draft state. \
|
||||
\n* The \'Confirmed\' state is set when the related sale order is confirmed. \
|
||||
\n* The \'Exception\' state is set when the related sale order is set as exception. \
|
||||
\n* The \'Done\' state is set when the sale order line has been picked. \
|
||||
\n* The \'Cancelled\' state is set when a user cancel the sale order related.'),
|
||||
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
|
||||
'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', string='Salesman'),
|
||||
'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
|
|
|
@ -404,7 +404,7 @@
|
|||
string="Create Invoice"
|
||||
type="object"
|
||||
icon="terp-document-new"
|
||||
attrs="{'invisible': ['|',('state', '!=', 'confirmed'),('invoiced', '=', 1)]}"/>
|
||||
attrs="{'invisible': ['|',('state', 'in', ('draft','cancel')),('invoiced', '=', 1)]}"/>
|
||||
<button name="button_cancel"
|
||||
string="Cancel" type="object"
|
||||
icon="gtk-cancel"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<newline />
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button special="cancel" string="Close" icon="gtk-cancel"/>
|
||||
<button name="open_invoice" string="Open Invoice" type="object" icon="gtk-open"/>
|
||||
</group>
|
||||
</form>
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
from mx.DateTime import now
|
||||
import time
|
||||
import decimal_precision as dp
|
||||
|
||||
|
@ -100,7 +99,7 @@ class crm_make_sale(osv.osv_memory):
|
|||
raise osv.except_osv(_('Data Insufficient!'),_('Customer has no addresses defined!'))
|
||||
|
||||
vals = {
|
||||
'origin': 'Opportunity:%s' % str(case.id),
|
||||
'origin': 'Opportunity: %s' % str(case.id),
|
||||
'section_id': case.section_id and case.section_id.id or False,
|
||||
'shop_id': make.shop_id.id,
|
||||
'partner_id': partner_id,
|
||||
|
@ -108,8 +107,7 @@ class crm_make_sale(osv.osv_memory):
|
|||
'partner_invoice_id': partner_addr['invoice'],
|
||||
'partner_order_id': partner_addr['contact'],
|
||||
'partner_shipping_id': partner_addr['delivery'],
|
||||
'order_policy': 'manual',
|
||||
'date_order': now(),
|
||||
'date_order': time.strftime('%Y-%m-%d'),
|
||||
'fiscal_position': fpos,
|
||||
}
|
||||
|
||||
|
@ -121,14 +119,21 @@ class crm_make_sale(osv.osv_memory):
|
|||
vals['project_id'] = make.analytic_account.id
|
||||
new_id = sale_obj.create(cr, uid, vals)
|
||||
for line in make.sale_order_line:
|
||||
value = sale_line_obj.product_id_change(cr, uid, [], pricelist,
|
||||
line.product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
|
||||
value['product_id'] =line.product_id.id
|
||||
value = {}
|
||||
value['order_id'] = new_id
|
||||
value['tax_id'] = [(6,0,line['tax_id'])]
|
||||
value['name'] = line.name
|
||||
value['delay'] = line.delay
|
||||
value['product_id'] =line.product_id and line.product_id.id or False
|
||||
value['price_unit'] = line.price_unit
|
||||
value['tax_id'] = line.tax_id and [(6,0,map(lambda x: x.id,line.tax_id))] or False
|
||||
value['type'] = line.type
|
||||
value['product_uom_qty']=line.product_uom_qty
|
||||
value['discount']=line.discount
|
||||
value['product_uom']=line.product_uom.id
|
||||
value['product_uos_qty']=line.product_uos_qty
|
||||
value['product_uos']=line.product_uos and line.product_uos.id or False
|
||||
value['product_packaging'] = line.product_packaging and line.product_packaging.id or False
|
||||
value['discount']=line.discount
|
||||
value['notes']=line.notes
|
||||
sale_line_obj.create(cr, uid, value)
|
||||
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
|
||||
new_ids.append(new_id)
|
||||
|
@ -149,7 +154,6 @@ class crm_make_sale(osv.osv_memory):
|
|||
'view_id': False,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': new_ids and new_ids[0]
|
||||
|
||||
}
|
||||
else:
|
||||
value = {
|
||||
|
@ -165,8 +169,8 @@ class crm_make_sale(osv.osv_memory):
|
|||
|
||||
_columns = {
|
||||
'shop_id': fields.many2one('sale.shop', 'Shop', required=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer', required=True, help='Use this partner if there is no partner on the Opportunity'),
|
||||
'sale_order_line': fields.one2many('sale.order.make.line', 'order_line', 'Product Line', readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer', required=True),
|
||||
'sale_order_line': fields.one2many('sale.order.make.line', 'opportunity_order_id', 'Product Line'),
|
||||
'analytic_account': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
'close': fields.boolean('Close Case', help='Check this to close the case after having created the sale order.'),
|
||||
}
|
||||
|
@ -180,140 +184,33 @@ crm_make_sale()
|
|||
|
||||
class sale_order_make_line(osv.osv_memory):
|
||||
|
||||
|
||||
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
|
||||
def product_id_change(self, cr, uid, ids, product, qty=0,
|
||||
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
|
||||
lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False):
|
||||
lang=False, update_tax=True, packaging=False, flag=False):
|
||||
if not partner_id:
|
||||
raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.'))
|
||||
warning = {}
|
||||
product_uom_obj = self.pool.get('product.uom')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
product_obj = self.pool.get('product.product')
|
||||
if partner_id:
|
||||
lang = partner_obj.browse(cr, uid, partner_id).lang
|
||||
context = {'lang': lang, 'partner_id': partner_id}
|
||||
|
||||
if not product:
|
||||
return {'value': {'th_weight': 0, 'product_packaging': False,
|
||||
'product_uos_qty': qty}, 'domain': {'product_uom': [],
|
||||
'product_uos': []}}
|
||||
|
||||
if not date_order:
|
||||
date_order = time.strftime('%Y-%m-%d')
|
||||
|
||||
result = {}
|
||||
product_obj = product_obj.browse(cr, uid, product, context=context)
|
||||
if not packaging and product_obj.packaging:
|
||||
packaging = product_obj.packaging[0].id
|
||||
result['product_packaging'] = packaging
|
||||
|
||||
if packaging:
|
||||
default_uom = product_obj.uom_id and product_obj.uom_id.id
|
||||
pack = self.pool.get('product.packaging').browse(cr, uid, packaging, context=context)
|
||||
q = product_uom_obj._compute_qty(cr, uid, uom, pack.qty, default_uom)
|
||||
# qty = qty - qty % q + q
|
||||
if qty and (q and not (qty % q) == 0):
|
||||
ean = pack.ean
|
||||
qty_pack = pack.qty
|
||||
type_ul = pack.ul
|
||||
warn_msg = _("You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: ") % (qty)
|
||||
warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
|
||||
warning = {
|
||||
'title': _('Picking Information !'),
|
||||
'message': warn_msg
|
||||
}
|
||||
result['product_uom_qty'] = qty
|
||||
|
||||
uom2 = False
|
||||
if uom:
|
||||
uom2 = product_uom_obj.browse(cr, uid, uom)
|
||||
if product_obj.uom_id.category_id.id != uom2.category_id.id:
|
||||
uom = False
|
||||
|
||||
if uos:
|
||||
if product_obj.uos_id:
|
||||
uos2 = product_uom_obj.browse(cr, uid, uos)
|
||||
if product_obj.uos_id.category_id.id != uos2.category_id.id:
|
||||
uos = False
|
||||
else:
|
||||
uos = False
|
||||
if product_obj.description_sale:
|
||||
result['notes'] = product_obj.description_sale
|
||||
fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
|
||||
if update_tax: #The quantity only have changed
|
||||
result['delay'] = (product_obj.sale_delay or 0.0)
|
||||
partner = partner_obj.browse(cr, uid, partner_id)
|
||||
result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
|
||||
result.update({'type': product_obj.procure_method})
|
||||
|
||||
if not flag:
|
||||
result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context)[0][1]
|
||||
domain = {}
|
||||
if (not uom) and (not uos):
|
||||
result['product_uom'] = product_obj.uom_id.id
|
||||
if product_obj.uos_id:
|
||||
result['product_uos'] = product_obj.uos_id.id
|
||||
result['product_uos_qty'] = qty * product_obj.uos_coeff
|
||||
uos_category_id = product_obj.uos_id.category_id.id
|
||||
else:
|
||||
result['product_uos'] = False
|
||||
result['product_uos_qty'] = qty
|
||||
uos_category_id = False
|
||||
domain = {'product_uom':
|
||||
[('category_id', '=', product_obj.uom_id.category_id.id)],
|
||||
'product_uos':
|
||||
[('category_id', '=', uos_category_id)]}
|
||||
|
||||
elif uos and not uom: # only happens if uom is False
|
||||
result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id
|
||||
result['product_uom_qty'] = qty_uos / product_obj.uos_coeff
|
||||
elif uom: # whether uos is set or not
|
||||
default_uom = product_obj.uom_id and product_obj.uom_id.id
|
||||
q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom)
|
||||
if product_obj.uos_id:
|
||||
result['product_uos'] = product_obj.uos_id.id
|
||||
result['product_uos_qty'] = qty * product_obj.uos_coeff
|
||||
else:
|
||||
result['product_uos'] = False
|
||||
result['product_uos_qty'] = qty
|
||||
|
||||
if not uom2:
|
||||
uom2 = product_obj.uom_id
|
||||
return {'value': result, 'domain': domain, 'warning': warning}
|
||||
date_order = time.strftime('%Y-%m-%d')
|
||||
part = self.pool.get('res.partner').browse(cr, uid, partner_id)
|
||||
pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False
|
||||
fiscal_position = part.property_account_position and part.property_account_position.id or False
|
||||
return self.pool.get('sale.order.line').product_id_change(cr, uid, ids, pricelist, product, qty, uom, qty_uos, uos, name, partner_id, lang, update_tax, date_order, packaging, fiscal_position, flag)
|
||||
|
||||
def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,
|
||||
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
|
||||
lang=False, update_tax=True, date_order=False):
|
||||
res = self.product_id_change(cursor, user, ids, pricelist, product,
|
||||
qty=qty, uom=uom, qty_uos=qty_uos, uos=uos, name=name,
|
||||
partner_id=partner_id, lang=lang, update_tax=update_tax,
|
||||
date_order=date_order)
|
||||
if 'product_uom' in res['value']:
|
||||
del res['value']['product_uom']
|
||||
if not uom:
|
||||
res['value']['price_unit'] = 0.0
|
||||
return res
|
||||
|
||||
_name = 'sale.order.make.line'
|
||||
_description = 'Sale Order Line'
|
||||
_description = 'Opportunity Sale Order Line'
|
||||
_columns = {
|
||||
'order_line': fields.many2one('crm.make.sale', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
|
||||
'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
|
||||
'name': fields.char('Description', size=256, required=True, select=True, readonly=True, ),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),
|
||||
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, ),
|
||||
'opportunity_order_id': fields.many2one('crm.make.sale', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
|
||||
'name': fields.char('Description', size=256, required=True, select=True, ),
|
||||
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer"),
|
||||
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
|
||||
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, ),
|
||||
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_uos_qty': fields.float('Quantity (UoS)', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price')),
|
||||
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes'),
|
||||
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True),
|
||||
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, ),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, ),
|
||||
'product_uos_qty': fields.float('Quantity (UoS)'),
|
||||
'product_uos': fields.many2one('product.uom', 'Product UoS'),
|
||||
'product_packaging': fields.many2one('product.packaging', 'Packaging'),
|
||||
'discount': fields.float('Discount (%)', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'discount': fields.float('Discount (%)', digits=(16, 2)),
|
||||
'notes': fields.text('Notes'),
|
||||
}
|
||||
_order = 'sequence, id'
|
||||
|
|
|
@ -21,25 +21,21 @@
|
|||
<notebook>
|
||||
<page string="Order Line">
|
||||
<field colspan="4"
|
||||
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
|
||||
context="partner_id=parent.partner_id,shop=parent.shop_id"
|
||||
name="product_id"
|
||||
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging, parent.fiscal_position, False)"
|
||||
on_change="product_id_change(product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, product_packaging, False)"
|
||||
/>
|
||||
<field
|
||||
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
|
||||
name="product_uom_qty"
|
||||
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, True)"
|
||||
/>
|
||||
<field groups="product.group_uos" name="product_uos_qty"/>
|
||||
<field name="product_uom"
|
||||
on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
|
||||
<group colspan="2">
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" nolabel="1"/>
|
||||
</group>
|
||||
<group colspan="2" groups="product.group_uos">
|
||||
<field name="product_uos_qty"/>
|
||||
<field name="product_uos" nolabel="1"/></group>
|
||||
<field
|
||||
name="product_packaging"
|
||||
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
|
||||
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, False)"
|
||||
domain="[('product_id','=',product_id)]"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount"/>
|
||||
|
@ -49,6 +45,9 @@
|
|||
<separator colspan="5" string="Taxes"/>
|
||||
<field colspan="4" name="tax_id" nolabel="1" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="notes" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
<tree string="Sales order lines">
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem id="menu_sale_journal_config" name="Sale Journals"
|
||||
parent="base.menu_base_config" sequence="5"/>
|
||||
|
||||
<!-- sale journal invoice Type's Form view -->
|
||||
|
||||
<record model="ir.ui.view" id="view_sale_journal_invoice_type_form">
|
||||
|
@ -40,7 +43,7 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- <menuitem name="Invoicing Methods" id="menu_definition_journal_invoice_type" parent="sale.menu_shop_configuration" action="action_definition_journal_invoice_type"/> -->
|
||||
<menuitem name="Invoicing Methods" id="menu_definition_journal_invoice_type" parent="menu_sale_journal_config" action="action_definition_journal_invoice_type"/>
|
||||
|
||||
<!-- sale journal Form view -->
|
||||
|
||||
|
@ -138,7 +141,8 @@
|
|||
<field name="search_view_id" ref="view_sale_journal_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_definition_journal" name="Sales Journals" parent="product.prod_config_main" action="action_definition_journal" sequence="70" />
|
||||
|
||||
<menuitem id="menu_definition_journal" name="Sales Journals" parent="menu_sale_journal_config" action="action_definition_journal" sequence="70" />
|
||||
|
||||
<!-- Inherit sales order form view -->
|
||||
|
||||
|
@ -151,7 +155,7 @@
|
|||
<field name="origin" position="after">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Journal" colspan="4"/>
|
||||
<field name="journal_id" select="1" widget="selection"/>
|
||||
<field name="journal_id" select="1"/>
|
||||
<field name="invoice_type_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
</field>
|
||||
|
|
|
@ -31,6 +31,27 @@
|
|||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_final">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,2" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/>
|
||||
<lineStyle kind="LINEABOVE" colorName="#000000" start="3,2" stop="3,2"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table_note">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
|
||||
|
||||
<blockTableStyle id="Table6">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
|
@ -233,7 +254,7 @@
|
|||
<blockTable colWidths="132.0,134.0,135.0,135.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.name ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.client_order_ref ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.date_order ]]</para>
|
||||
|
@ -345,8 +366,72 @@
|
|||
<para style="P31">Price</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
|
||||
</blockTable>
|
||||
</section>
|
||||
<blockTable colWidths="387.0,56.0,73.0,21.0" style="Table_final">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">Net Total :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed ) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.pricelist_id.currency_id.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">Taxes :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax ) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ o.pricelist_id.currency_id.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Total :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total ) ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ o.pricelist_id.currency_id.name ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="533.0" style="Table_note">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format(o.note or '') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ format((o.partner_id.property_payment_term and o.partner_id.property_payment_term.note) or '') ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</story>
|
||||
</document>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<data>
|
||||
<record id="sale.action_order_line_tree2" model="ir.actions.act_window">
|
||||
<field name="domain">[('layout_type','=', 'article')]</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_order_line_form2_inherit_1">
|
||||
<field name="name">sale.order.line.form2.inherit_1</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
|
@ -15,20 +17,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_order_line_tree_inherit_1">
|
||||
<field name="name">sale.order.line.tree.inherit_1</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="inherit_id" ref="sale.view_order_line_tree"/>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/tree/field[@name='name']" position="before">
|
||||
<field name="sequence" string="Seq."/>
|
||||
<field name="layout_type"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_order_form_inherit_1">
|
||||
<field name="name">sale.order.form.inherit_1</field>
|
||||
<field name="model">sale.order</field>
|
||||
|
|
Loading…
Reference in New Issue