[MERGE] merge from dev3
bzr revid: ara@tinyerp.com-20110117091244-zcbgnnujzh0a992c
This commit is contained in:
commit
db2b558de3
|
@ -558,6 +558,7 @@
|
|||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<field name="currency" invisible="1"/>
|
||||
<field name='company_id' widget="selection" groups="base.group_multi_company" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Transaction" name="statement_line_ids">
|
||||
|
@ -2572,7 +2573,7 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
|
|||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" />
|
||||
<field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]" groups="analytic.group_analytic_accounting" />
|
||||
<field name="amount"/>
|
||||
</tree>
|
||||
<form string="Statement lines">
|
||||
|
@ -2582,7 +2583,7 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
|
|||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" />
|
||||
<field name="analytic_account_id" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]" groups="analytic.group_analytic_accounting" />
|
||||
<field name="amount"/>
|
||||
<field name="sequence"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
|
|
|
@ -146,7 +146,7 @@ class res_users(osv.osv):
|
|||
'user_id': user_id}, context=context)
|
||||
except:
|
||||
# Tolerate a missing shortcut. See product/product.py for similar code.
|
||||
logging.getLogger('orm').warning('Skipped Products shortcut for user "%s"', data.get('name','<new'))
|
||||
logging.getLogger('orm').debug('Skipped meetings shortcut for user "%s"', data.get('name','<new'))
|
||||
|
||||
return user_id
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import tools
|
|||
import binascii
|
||||
import email
|
||||
from email.header import decode_header
|
||||
from email.utils import parsedate
|
||||
import base64
|
||||
import re
|
||||
from tools.translate import _
|
||||
|
@ -111,6 +112,11 @@ class mailgate_thread(osv.osv):
|
|||
if attach is None:
|
||||
attach = []
|
||||
|
||||
if email_date:
|
||||
edate = parsedate(email_date)
|
||||
if edate is not None:
|
||||
email_date = time.strftime('%Y-%m-%d %H:%M:%S', edate)
|
||||
|
||||
# The mailgate sends the ids of the cases and not the object list
|
||||
|
||||
if all(isinstance(case_id, (int, long)) for case_id in cases):
|
||||
|
|
|
@ -90,4 +90,13 @@ class product_product(osv.osv):
|
|||
for bom in bom_obj.browse(cr, uid, bom_ids, context=context):
|
||||
_compute_price(bom)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({
|
||||
'bom_ids': []
|
||||
})
|
||||
return super(product_product, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
|
||||
product_product()
|
||||
|
|
|
@ -299,8 +299,11 @@ class pos_order(osv.osv):
|
|||
@param name: Names of fields.
|
||||
@return: pricelist ID
|
||||
"""
|
||||
pricelist = self.pool.get('product.pricelist').search(cr, uid, [('name', '=', 'Public Pricelist')], context=context)
|
||||
return pricelist and pricelist[0] or False
|
||||
res = self.pool.get('sale.shop').search(cr, uid, [], context=context)
|
||||
if res:
|
||||
shop = self.pool.get('sale.shop').browse(cr, uid, res[0], context=context)
|
||||
return shop.pricelist_id and shop.pricelist_id.id or False
|
||||
return False
|
||||
|
||||
def _journal_default(self, cr, uid, context=None):
|
||||
""" To get default pricelist for the order
|
||||
|
@ -1246,4 +1249,4 @@ class stock_picking(osv.osv):
|
|||
|
||||
stock_picking()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -126,7 +126,8 @@ class project(osv.osv):
|
|||
'priority': fields.integer('Sequence', help="Gives the sequence order when displaying the list of projects"),
|
||||
'warn_manager': fields.boolean('Warn Manager', help="If you check this field, the project manager will receive a request each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
|
||||
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's member. Not used in any computation, just for information purpose, but a user has to be member of a project to add a the to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
|
||||
help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'tasks': fields.one2many('project.task', 'project_id', "Project tasks"),
|
||||
'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
|
||||
store = {
|
||||
|
|
|
@ -363,7 +363,7 @@ class purchase_order(osv.osv):
|
|||
_('There is no purchase journal defined for this company: "%s" (id:%d)') % (o.company_id.name, o.company_id.id))
|
||||
inv = {
|
||||
'name': o.partner_ref or o.name,
|
||||
'reference': "P%dPO%d" % (o.partner_id.id, o.id),
|
||||
'reference': o.partner_ref or o.name,
|
||||
'account_id': a,
|
||||
'type': 'in_invoice',
|
||||
'partner_id': o.partner_id.id,
|
||||
|
@ -440,7 +440,7 @@ class purchase_order(osv.osv):
|
|||
if order_line.product_id.product_tmpl_id.type in ('product', 'consu'):
|
||||
dest = order.location_id.id
|
||||
move = self.pool.get('stock.move').create(cr, uid, {
|
||||
'name': 'PO:'+order_line.name,
|
||||
'name': order.name + ': ' +(order_line.name or ''),
|
||||
'product_id': order_line.product_id.id,
|
||||
'product_qty': order_line.product_qty,
|
||||
'product_uos_qty': order_line.product_qty,
|
||||
|
|
|
@ -158,7 +158,7 @@ class purchase_line_invoice(osv.osv_memory):
|
|||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.invoice',
|
||||
'view_id': False,
|
||||
'context': "{'type':'in_invoice'}",
|
||||
'context': "{'type':'in_invoice', 'journal_type': 'purchase'}",
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
purchase_line_invoice()
|
||||
|
|
|
@ -403,7 +403,7 @@ class sale_order(osv.osv):
|
|||
'name': order.client_order_ref or '',
|
||||
'origin': order.name,
|
||||
'type': 'out_invoice',
|
||||
'reference': "P%dSO%d" % (order.partner_id.id, order.id),
|
||||
'reference': order.client_order_ref or order.name,
|
||||
'account_id': a,
|
||||
'partner_id': order.partner_id.id,
|
||||
'journal_id': journal_ids[0],
|
||||
|
|
|
@ -272,7 +272,7 @@ class stock_location(osv.osv):
|
|||
context['compute_child'] = False
|
||||
|
||||
if not product_ids:
|
||||
product_ids = product_obj.search(cr, uid, [])
|
||||
product_ids = product_obj.search(cr, uid, [], context={'active_test': False})
|
||||
|
||||
products = product_obj.browse(cr, uid, product_ids, context=context)
|
||||
products_by_uom = {}
|
||||
|
|
|
@ -49,5 +49,14 @@
|
|||
<field name="code">DDU</field>
|
||||
<field name="name">DELIVERED DUTY UNPAID</field>
|
||||
</record>
|
||||
<record id="incoterm_DAT" model="stock.incoterms">
|
||||
<field name="code">DAT</field>
|
||||
<field name="name">Delivered At Terminal</field>
|
||||
</record>
|
||||
<record id="incoterm_DAP" model="stock.incoterms">
|
||||
<field name="code">DAP</field>
|
||||
<field name="name">Delivered At Place</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1779,6 +1779,8 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_incoterms_tree" id="menu_action_incoterm_open" parent="menu_warehouse_config" sequence="7"/>
|
||||
|
||||
<act_window
|
||||
context="{'location': active_id}"
|
||||
domain="[('type','<>','service')]"
|
||||
|
|
Loading…
Reference in New Issue