[MERGE] forward port branch saas-15 up to 063381e0f6

This commit is contained in:
Christophe Simonis
2017-08-28 14:02:35 +02:00
9 changed files with 41 additions and 13 deletions
@@ -117,6 +117,11 @@
.o_kanban_view .o_kanban_record .oe_kanban_list_many2many .o_field_many2manytags {
border: none;
}
// Override height of graph. min-height doesn't do the trick
.o_graph {
height: 500px;
}
}
}
}
@@ -201,6 +201,7 @@
<form string="Contribution">
<group>
<field name="name"/>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" class="oe_inline"/>
</group>
<newline/>
@@ -353,4 +354,4 @@
view_id="hr_salary_rule_list"
id="act_children_salary_rules"/>
</odoo>
</odoo>
+10 -6
View File
@@ -73,22 +73,26 @@ class AccountChartTemplate(models.Model):
@api.multi
def _process_accounts_translations(self, company_id, langs, field):
in_ids = self.env['account.account.template'].search([('chart_template_id', '=', self.id)], order='id')
out_ids = self.env['account.account'].search([('company_id', '=', company_id)], order='id')
in_ids, out_ids = self._get_template_from_model(company_id, 'account.account')
return self.process_translations(langs, field, in_ids, out_ids)
@api.multi
def _process_taxes_translations(self, company_id, langs, field):
in_ids = self.env['account.tax.template'].search([('chart_template_id', '=', self.id)], order='id')
out_ids = self.env['account.tax'].search([('company_id', '=', company_id)], order='id')
in_ids, out_ids = self._get_template_from_model(company_id, 'account.tax')
return self.process_translations(langs, field, in_ids, out_ids)
@api.multi
def _process_fiscal_pos_translations(self, company_id, langs, field):
in_ids = self.env['account.fiscal.position.template'].search([('chart_template_id', '=', self.id)], order='id')
out_ids = self.env['account.fiscal.position'].search([('company_id', '=', company_id)], order='id')
in_ids, out_ids = self._get_template_from_model(company_id, 'account.fiscal.position')
return self.process_translations(langs, field, in_ids, out_ids)
def _get_template_from_model(self, company_id, model):
out_data = self.env['ir.model.data'].search([('model', '=', model), ('name', '=like', str(company_id)+'\_%')])
out_ids = self.env[model].search([('id', 'in', out_data.mapped('res_id'))], order='id')
in_xml_id_names = [xml_id.partition(str(company_id) + '_')[-1] for xml_id in out_data.mapped('name')]
in_xml_ids = self.env['ir.model.data'].search([('model', '=', model+'.template'), ('name', 'in', in_xml_id_names)])
in_ids = self.env[model+'.template'].search([('id', 'in', in_xml_ids.mapped('res_id'))], order='id')
return (in_ids, out_ids)
class BaseLanguageInstall(models.TransientModel):
""" Install Language"""
@@ -1550,6 +1550,9 @@ exports.Orderline = Backbone.Model.extend({
if (!no_map_tax){
tax = self._map_tax_fiscal_position(tax);
}
if (!tax){
return;
}
if (tax.amount_type === 'group'){
var ret = self.compute_all(tax.children_tax_ids, price_unit, quantity, currency_rounding);
total_excluded = ret.total_excluded;
+1 -1
View File
@@ -57,7 +57,7 @@ class ReportProjectTaskUser(models.Model):
t.partner_id,
t.stage_id as stage_id,
t.kanban_state as state,
(extract('epoch' from (t.write_date-t.create_date)))/(3600*24) as closing_days,
(extract('epoch' from (NULLIF(t.date_end, t.write_date)-t.create_date)))/(3600*24) as closing_days,
(extract('epoch' from (t.date_start-t.create_date)))/(3600*24) as opening_days,
(extract('epoch' from (t.date_deadline-(now() at time zone 'UTC'))))/(3600*24) as delay_endings_days
"""
+2 -3
View File
@@ -302,9 +302,8 @@
<record id="ir_actions_server_project_sample" model="ir.actions.server">
<field name="name">Project: Activate Sample Project</field>
<field name="model_id" ref="project.model_project_project"/>
<field name="code">
action = model.activate_sample_project()
</field>
<field name="state">code</field>
<field name="code">action = model.activate_sample_project()</field>
</record>
<record id="open_view_project_all" model="ir.actions.act_window">
+1 -1
View File
@@ -152,7 +152,7 @@ class ProcurementOrder(models.Model):
qty_done = sum(self.move_ids.filtered(lambda move: move.state == 'done').mapped('product_uom_qty'))
qty_left = max(self.product_qty - qty_done, 0)
return {
'name': self.name,
'name': self.name[:2000],
'company_id': self.rule_id.company_id.id or self.rule_id.location_src_id.company_id.id or self.rule_id.location_id.company_id.id or self.company_id.id,
'product_id': self.product_id.id,
'product_uom': self.product_uom.id,
+6 -1
View File
@@ -117,7 +117,12 @@
<span t-if="pack_operation.package_id">:</span>
<span t-field="pack_operation.package_id"/>
<span t-field="pack_operation.ordered_qty"/>
<span t-field="pack_operation.product_uom_id"/>
<t t-if="pack_operation.linked_move_operation_ids">
<span t-field="pack_operation.linked_move_operation_ids[0].move_id.product_uom"></span>
</t>
<t t-else="1">
<span t-field="pack_operation.product_uom_id"></span>
</t>
</td>
<td class="text-right" t-if="pack_operation.state == 'done'">
<t t-if="pack_operation.ordered_qty != pack_operation.qty_done">
+11
View File
@@ -0,0 +1,11 @@
Vietnam, 2017-08-24
I hereby agree to the terms of the Odoo Individual Contributor License
Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this
declaration.
Signed,
Do Vuong Tien tiendv@trobz.com https://github.com/vuongtien2411