[MERGE] forward port of branch saas-3 up to 30674c3
This commit is contained in:
commit
a175ed6b2f
|
@ -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>
|
||||
|
|
|
@ -109,7 +109,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)])
|
||||
|
@ -157,7 +158,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 * (1-(line.discount or 0.0)/100.0), line.qty, product=line.product_id, partner=line.order_id.partner_id or False)
|
||||
|
|
|
@ -306,7 +306,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>
|
||||
|
|
|
@ -510,6 +510,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:
|
||||
|
|
|
@ -397,7 +397,7 @@ class YamlInterpreter(object):
|
|||
onchange_spec = model._onchange_spec(self.cr, SUPERUSER_ID, view_info, context=self.context)
|
||||
# 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().
|
||||
|
@ -458,7 +458,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:
|
||||
|
|
Loading…
Reference in New Issue