[MERGE] forward port of branch 9.0 up to 5419485

This commit is contained in:
Christophe Simonis
2016-06-03 11:29:49 +02:00
10 changed files with 32 additions and 9 deletions
@@ -98,7 +98,8 @@ class AccountInvoiceRefund(models.TransientModel):
'invoice_line_ids': invoice_lines,
'tax_line_ids': tax_lines,
'date': date,
'name': description
'name': description,
'origin': inv.origin
})
for field in ('partner_id', 'account_id', 'currency_id',
'payment_term_id', 'journal_id'):
+2 -2
View File
@@ -413,8 +413,8 @@
<t t-if="error.moreinfo" t-raw="info(error.moreinfo)"/>
</t>
<t t-extend="ListView.buttons">
<t t-if='widget.options.import_enabled' t-jquery="button.o_list_button_add" t-operation="after">
<button type="button" class="btn btn-sm btn-default o_list_button_import">
<t t-jquery="button.o_list_button_add" t-operation="after">
<button t-if='widget.options.import_enabled' type="button" class="btn btn-sm btn-default o_list_button_import">
Import
</button>
</t>
Binary file not shown.
@@ -6,6 +6,7 @@
<field name="model">product.template</field>
<field name="priority">3</field>
<field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="groups_id" eval="[(4, ref('mrp.group_mrp_user'))]"/>
<field name="arch" type="xml">
<div name="standard_price_uom" position="after">
<button name="%(action_view_compute_price_wizard)d"
@@ -19,4 +20,3 @@
</record>
</data>
</openerp>
+2 -1
View File
@@ -337,8 +337,9 @@ class WebsiteForum(http.Controller):
question = post.parent_id if post.parent_id else post
if kwargs.get('comment') and post.forum_id.id == forum.id:
# TDE FIXME: check that post_id is the question or one of its answers
body = tools.mail.plaintext2html(kwargs['comment'])
post.with_context(mail_create_nosubscribe=True).message_post(
body=kwargs.get('comment'),
body=body,
message_type='comment',
subtype='mt_comment')
return werkzeug.utils.redirect("/forum/%s/question/%s" % (slug(forum), slug(question)))
+1 -1
View File
@@ -1082,7 +1082,7 @@
</div>
<div t-attf-class="form-group #{error.get('shipping_state_id') and 'has-error' or ''} col-lg-6">
<label class="control-label label-optional" for="shipping_state_id">State / Province</label>
<select name="shipping_state_id" class="form-control" t-att-readonly=" 'readonly' if shipping_id &gt;= 0 else ''">
<select name="shipping_state_id" class="form-control" t-att-disabled=" 'disabled' if shipping_id &gt;= 0 else ''">
<option value="">State / Province...</option>
<t t-foreach="states or []" t-as="state">
<option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == checkout.get('shipping_state_id')"><t t-esc="state.name"/></option>
+11
View File
@@ -0,0 +1,11 @@
China, 2016-04-29
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,
Xudong Yang fanderous@gmail.com https://github.com/Wizr
+11
View File
@@ -0,0 +1,11 @@
France, 2015-10-30
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,
Laurent Bélorgey lb@lalieutenante.com https://github.com/lbelorgey
+1 -1
View File
@@ -309,9 +309,9 @@ Default values are defined as parameters on fields, either a value::
or a function called to compute the default value, which should return that
value::
a_field = fields.Char(default=compute_default_value)
def compute_default_value(self):
return self.get_value()
a_field = fields.Char(default=compute_default_value)
Computed fields
---------------
+1 -2
View File
@@ -577,12 +577,11 @@ class res_partner(osv.Model, format_address):
if isinstance(ids, (int, long)):
ids = [ids]
res = []
types_dict = dict(self.fields_get(cr, uid, context=context)['type']['selection'])
for record in self.browse(cr, uid, ids, context=context):
name = record.name or ''
if record.parent_id and not record.is_company:
if not name and record.type in ['invoice', 'delivery', 'other']:
name = types_dict[record.type]
name = dict(self.fields_get(cr, uid, ['type'], context=context)['type']['selection'])[record.type]
name = "%s, %s" % (record.parent_name, name)
if context.get('show_address_only'):
name = self._display_address(cr, uid, record, without_company=True, context=context)