[MERGE] forward port of branch 7.0 up to e151e8f
This commit is contained in:
commit
30674c3ed6
|
@ -12,14 +12,14 @@
|
|||
<field name="amount" position="after">
|
||||
<newline/>
|
||||
<field name="allow_check" invisible="1"/>
|
||||
<field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="6"/>
|
||||
<field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',True)]}" nolabel="1" colspan="6"/>
|
||||
<newline/>
|
||||
</field>
|
||||
<field name="number" position="replace">
|
||||
<field name="number" attrs="{'readonly':[('allow_check','!=',1)]}" />
|
||||
<field name="number" attrs="{'readonly':[('allow_check','!=',True)]}" />
|
||||
</field>
|
||||
<button name="proforma_voucher" position="after">
|
||||
<button name="print_check" icon="gtk-print" string="Print Check" type="object" attrs="{'invisible':['|',('allow_check','!=',1),('state','!=','posted') ]}" class="oe_highlight"/>
|
||||
<button name="print_check" icon="gtk-print" string="Print Check" type="object" attrs="{'invisible':['|',('allow_check','!=',True),('state','!=','posted') ]}" class="oe_highlight"/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -230,7 +230,7 @@ class event_event(osv.osv):
|
|||
'seats_max': type_info.default_registration_max,
|
||||
}
|
||||
values.update(dic)
|
||||
return values
|
||||
return {'value' : values}
|
||||
|
||||
def onchange_start_date(self, cr, uid, ids, date_begin=False, date_end=False, context=None):
|
||||
res = {'value':{}}
|
||||
|
|
|
@ -107,7 +107,8 @@ class pos_details(report_sxw.rml_parse):
|
|||
statement_line_obj = self.pool.get("account.bank.statement.line")
|
||||
pos_order_obj = self.pool.get("pos.order")
|
||||
user_ids = form['user_ids'] or self._get_all_users()
|
||||
pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',user_ids)])
|
||||
company_id = self.pool['res.users'].browse(self.cr, self.uid, self.uid).company_id.id
|
||||
pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',user_ids), ('company_id', '=', company_id)])
|
||||
data={}
|
||||
if pos_ids:
|
||||
st_line_ids = statement_line_obj.search(self.cr, self.uid, [('pos_statement_id', 'in', pos_ids)])
|
||||
|
@ -155,7 +156,8 @@ class pos_details(report_sxw.rml_parse):
|
|||
account_tax_obj = self.pool.get('account.tax')
|
||||
user_ids = form['user_ids'] or self._get_all_users()
|
||||
pos_order_obj = self.pool.get('pos.order')
|
||||
pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',user_ids)])
|
||||
company_id = self.pool['res.users'].browse(self.cr, self.uid, self.uid).company_id.id
|
||||
pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',user_ids), ('company_id', '=', company_id)])
|
||||
for order in pos_order_obj.browse(self.cr, self.uid, pos_ids):
|
||||
for line in order.lines:
|
||||
line_taxes = account_tax_obj.compute_all(self.cr, self.uid, line.product_id.taxes_id, line.price_unit, line.qty, product=line.product_id, partner=line.order_id.partner_id or False)
|
||||
|
|
|
@ -293,7 +293,7 @@
|
|||
<field name="name">project.project.gantt</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt date_delay="planned_hours" date_start="date_start" progress="progress_rate" string="Projects">
|
||||
<gantt date_start="date_start" date_stop="date" progress="progress_rate" string="Projects">
|
||||
</gantt>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -438,6 +438,8 @@ class ConnectionPool(object):
|
|||
for i, (cnx, used) in enumerate(self._connections):
|
||||
if not used:
|
||||
self._connections.pop(i)
|
||||
if not cnx.closed:
|
||||
cnx.close()
|
||||
self._debug('Removing old connection at index %d: %r', i, cnx.dsn)
|
||||
break
|
||||
else:
|
||||
|
|
|
@ -391,7 +391,7 @@ class YamlInterpreter(object):
|
|||
fg = view_info['fields']
|
||||
# gather the default values on the object. (Can't use `fields´ as parameter instead of {} because we may
|
||||
# have references like `base.main_company´ in the yaml file and it's not compatible with the function)
|
||||
defaults = default and model._add_missing_default_values(self.cr, SUPERUSER_ID, {}, context=self.context) or {}
|
||||
defaults = default and model._add_missing_default_values(self.cr, self.uid, {}, context=self.context) or {}
|
||||
|
||||
# copy the default values in record_dict, only if they are in the view (because that's what the client does)
|
||||
# the other default values will be added later on by the create().
|
||||
|
@ -445,7 +445,7 @@ class YamlInterpreter(object):
|
|||
|
||||
# Evaluation args
|
||||
args = map(lambda x: eval(x, ctx), match.group(2).split(','))
|
||||
result = getattr(model, match.group(1))(self.cr, SUPERUSER_ID, [], *args)
|
||||
result = getattr(model, match.group(1))(self.cr, self.uid, [], *args)
|
||||
for key, val in (result or {}).get('value', {}).items():
|
||||
if key in fg:
|
||||
if key not in fields:
|
||||
|
|
Loading…
Reference in New Issue