[MERGE] forward port branch 9.0 up to a53063606a

This commit is contained in:
Christophe Simonis
2017-02-01 18:16:15 +01:00
19 changed files with 99 additions and 43 deletions
+2 -2
View File
@@ -515,7 +515,7 @@ class AccountInvoice(models.Model):
self.date_due = self.date_due or self.date_invoice self.date_due = self.date_due or self.date_invoice
else: else:
pterm = self.payment_term_id pterm = self.payment_term_id
pterm_list = pterm.with_context(currency_id=self.currency_id.id).compute(value=1, date_ref=date_invoice)[0] pterm_list = pterm.with_context(currency_id=self.company_id.currency_id.id).compute(value=1, date_ref=date_invoice)[0]
self.date_due = max(line[0] for line in pterm_list) self.date_due = max(line[0] for line in pterm_list)
@api.multi @api.multi
@@ -782,7 +782,7 @@ class AccountInvoice(models.Model):
name = inv.name or '/' name = inv.name or '/'
if inv.payment_term_id: if inv.payment_term_id:
totlines = inv.with_context(ctx).payment_term_id.with_context(currency_id=inv.currency_id.id).compute(total, date_invoice)[0] totlines = inv.with_context(ctx).payment_term_id.with_context(currency_id=company_currency.id).compute(total, date_invoice)[0]
res_amount_currency = total_currency res_amount_currency = total_currency
ctx['date'] = date_invoice ctx['date'] = date_invoice
for i, t in enumerate(totlines): for i, t in enumerate(totlines):
@@ -80,6 +80,13 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record> </record>
<record id="invoice_analysis_comp_rule" model="ir.rule">
<field name="name">Invoice Analysis multi-company</field>
<field name="model_id" ref="model_account_invoice_report"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="account_fiscal_position_comp_rule" model="ir.rule"> <record id="account_fiscal_position_comp_rule" model="ir.rule">
<field name="name">Account fiscal Mapping company rule</field> <field name="name">Account fiscal Mapping company rule</field>
<field name="model_id" ref="model_account_fiscal_position"/> <field name="model_id" ref="model_account_fiscal_position"/>
+1 -1
View File
@@ -276,7 +276,7 @@ class HrExpense(models.Model):
#convert eml into an osv-valid format #convert eml into an osv-valid format
lines = map(lambda x:(0, 0, expense._prepare_move_line(x)), move_lines) lines = map(lambda x:(0, 0, expense._prepare_move_line(x)), move_lines)
move.write({'line_ids': lines}) move.with_context(dont_create_taxes=True).write({'line_ids': lines})
move.post() move.post()
expense.write({'account_move_id': move.id, 'state': 'post'}) expense.write({'account_move_id': move.id, 'state': 'post'})
if expense.payment_mode == 'company_account': if expense.payment_mode == 'company_account':
+1 -1
View File
@@ -79,7 +79,7 @@
<field name="quantity" class="oe_inline"/> <field name="quantity" class="oe_inline"/>
<field name="product_uom_id" widget="selection" class="oe_inline" groups="product.group_uom"/> <field name="product_uom_id" widget="selection" class="oe_inline" groups="product.group_uom"/>
</div> </div>
<field name="tax_ids" widget="many2many_tags" groups="account.group_account_user"/> <field name="tax_ids" widget="many2many_tags" groups="account.group_account_user" domain="[('type_tax_use', '=', 'purchase')]"/>
</group><group> </group><group>
<field name="date"/> <field name="date"/>
<field name="accounting_date"/> <field name="accounting_date"/>
@@ -32,6 +32,7 @@ var LivechatButton = Widget.extend({
this.channel = null; this.channel = null;
this.chat_window = null; this.chat_window = null;
this.messages = []; this.messages = [];
this.server_url = server_url;
}, },
willStart: function () { willStart: function () {
@@ -203,10 +204,11 @@ var LivechatButton = Widget.extend({
this.options.default_username; this.options.default_username;
// Compute the avatar_url // Compute the avatar_url
msg.avatar_src = this.server_url;
if (msg.author_id && msg.author_id[0]) { if (msg.author_id && msg.author_id[0]) {
msg.avatar_src = "/web/image/res.partner/" + msg.author_id[0] + "/image_small"; msg.avatar_src += "/web/image/res.partner/" + msg.author_id[0] + "/image_small";
} else { } else {
msg.avatar_src = "/mail/static/src/img/smiley/avatar.jpg"; msg.avatar_src += "/mail/static/src/img/smiley/avatar.jpg";
} }
if (options && options.prepend) { if (options && options.prepend) {
+1 -1
View File
@@ -12,7 +12,7 @@
<field name="name">Plantilla de cuentas de Guatemala (sencilla)</field> <field name="name">Plantilla de cuentas de Guatemala (sencilla)</field>
<field name="bank_account_code_prefix">1.0.01.0</field> <field name="bank_account_code_prefix">1.0.01.0</field>
<field name="cash_account_code_prefix">1.0.02.0</field> <field name="cash_account_code_prefix">1.0.02.0</field>
<field name="code_digits">6</field> <field name="code_digits">9</field>
<field name="currency_id" ref="base.QTQ"/> <field name="currency_id" ref="base.QTQ"/>
<field name="transfer_account_id" ref="transfer_account_id"/> <field name="transfer_account_id" ref="transfer_account_id"/>
</record> </record>
-1
View File
@@ -87,7 +87,6 @@ class mrp_production(osv.osv):
'product_uom': sub_product.product_uom.id, 'product_uom': sub_product.product_uom.id,
'location_id': source, 'location_id': source,
'location_dest_id': production.location_dest_id.id, 'location_dest_id': production.location_dest_id.id,
'move_dest_id': production.move_prod_id.id,
'production_id': production.id, 'production_id': production.id,
'origin': production.name, 'origin': production.name,
'subproduct_id': sub_product.id 'subproduct_id': sub_product.id
+9 -2
View File
@@ -675,6 +675,8 @@ exports.PosModel = Backbone.Model.extend({
flushed.always(function(ids){ flushed.always(function(ids){
pushed.resolve(); pushed.resolve();
}); });
return flushed;
}); });
return pushed; return pushed;
}, },
@@ -775,6 +777,11 @@ exports.PosModel = Backbone.Model.extend({
var self = this; var self = this;
var timeout = typeof options.timeout === 'number' ? options.timeout : 7500 * orders.length; var timeout = typeof options.timeout === 'number' ? options.timeout : 7500 * orders.length;
// Keep the order ids that are about to be sent to the
// backend. In between create_from_ui and the success callback
// new orders may have been added to it.
var order_ids_to_sync = _.pluck(orders, 'id');
// we try to send the order. shadow prevents a spinner if it takes too long. (unless we are sending an invoice, // we try to send the order. shadow prevents a spinner if it takes too long. (unless we are sending an invoice,
// then we want to notify the user that we are waiting on something ) // then we want to notify the user that we are waiting on something )
var posOrderModel = new Model('pos.order'); var posOrderModel = new Model('pos.order');
@@ -789,8 +796,8 @@ exports.PosModel = Backbone.Model.extend({
timeout: timeout timeout: timeout
} }
).then(function (server_ids) { ).then(function (server_ids) {
_.each(orders, function (order) { _.each(order_ids_to_sync, function (order_id) {
self.db.remove_order(order.id); self.db.remove_order(order_id);
}); });
self.set('failed',false); self.set('failed',false);
return server_ids; return server_ids;
+25 -25
View File
@@ -111,7 +111,7 @@
<data noupdate="1"> <data noupdate="1">
<record id="project_project_data" model="project.project"> <record forcecreate="False" id="project_project_data" model="project.project">
<field name="name">Start here to discover Odoo</field> <field name="name">Start here to discover Odoo</field>
<field name="privacy_visibility">followers</field> <field name="privacy_visibility">followers</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
@@ -124,25 +124,25 @@
<field name="alias_parent_model_id" ref="model_project_project"/> <field name="alias_parent_model_id" ref="model_project_project"/>
</record> </record>
<record id="project_stage_data_0" model="project.task.type"> <record forcecreate="False" id="project_stage_data_0" model="project.task.type">
<field name="sequence">1</field> <field name="sequence">1</field>
<field name="name">New</field> <field name="name">New</field>
<field name="project_ids" eval="[(4, ref('project_project_data'))]"/> <field name="project_ids" eval="[(4, ref('project_project_data'))]"/>
</record> </record>
<record id="project_stage_data_1" model="project.task.type"> <record forcecreate="False" id="project_stage_data_1" model="project.task.type">
<field name="sequence">2</field> <field name="sequence">2</field>
<field name="name">Basic</field> <field name="name">Basic</field>
<field name="project_ids" eval="[(4, ref('project_project_data'))]"/> <field name="project_ids" eval="[(4, ref('project_project_data'))]"/>
</record> </record>
<record id="project_stage_data_2" model="project.task.type"> <record forcecreate="False" id="project_stage_data_2" model="project.task.type">
<field name="sequence">3</field> <field name="sequence">3</field>
<field name="name">Advanced</field> <field name="name">Advanced</field>
<field name="project_ids" eval="[(4, ref('project_project_data'))]"/> <field name="project_ids" eval="[(4, ref('project_project_data'))]"/>
</record> </record>
<record id="project_task_data_0" model="project.task"> <record forcecreate="False" id="project_task_data_0" model="project.task">
<field name="sequence">1</field> <field name="sequence">1</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
@@ -153,7 +153,7 @@
<field name="stage_id" ref="project_stage_data_0"/> <field name="stage_id" ref="project_stage_data_0"/>
</record> </record>
<record id="project_task_data_1" model="project.task"> <record forcecreate="False" id="project_task_data_1" model="project.task">
<field name="sequence">2</field> <field name="sequence">2</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
@@ -163,7 +163,7 @@
<field name="stage_id" ref="project_stage_data_0"/> <field name="stage_id" ref="project_stage_data_0"/>
</record> </record>
<record id="project_task_data_5" model="project.task"> <record forcecreate="False" id="project_task_data_5" model="project.task">
<field name="sequence">3</field> <field name="sequence">3</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
@@ -173,7 +173,7 @@
<field name="stage_id" ref="project_stage_data_0"/> <field name="stage_id" ref="project_stage_data_0"/>
</record> </record>
<record id="project_task_data_2" model="project.task"> <record forcecreate="False" id="project_task_data_2" model="project.task">
<field name="sequence">4</field> <field name="sequence">4</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
@@ -183,7 +183,7 @@
<field name="stage_id" ref="project_stage_data_0"/> <field name="stage_id" ref="project_stage_data_0"/>
</record> </record>
<record id="project_task_data_4" model="project.task"> <record forcecreate="False" id="project_task_data_4" model="project.task">
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
<field name="project_id" ref="project.project_project_data"/> <field name="project_id" ref="project.project_project_data"/>
@@ -192,7 +192,7 @@
<field name="stage_id" ref="project_stage_data_2"/> <field name="stage_id" ref="project_stage_data_2"/>
</record> </record>
<record id="msg_task_4" model="mail.message"> <record forcecreate="False" id="msg_task_4" model="mail.message">
<field name="subject">Converse with your customers and colleagues</field> <field name="subject">Converse with your customers and colleagues</field>
<field name="model">project.task</field> <field name="model">project.task</field>
<field name="author_id" ref="base.partner_root"/> <field name="author_id" ref="base.partner_root"/>
@@ -202,12 +202,12 @@
<field name="subtype_id" ref="mail.mt_comment"/> <field name="subtype_id" ref="mail.mt_comment"/>
</record> </record>
<record id="project_tag_data" model="project.tags"> <record forcecreate="False" id="project_tag_data" model="project.tags">
<field name="name">NeedAssistance</field> <field name="name">NeedAssistance</field>
<field name="color" eval="5"/> <field name="color" eval="5"/>
</record> </record>
<record id="project_task_data_6" model="project.task"> <record forcecreate="False" id="project_task_data_6" model="project.task">
<field name="sequence">3</field> <field name="sequence">3</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
@@ -219,7 +219,7 @@
<field name="tag_ids" eval="[(6,0,[ref('project.project_tag_data')])]"/> <field name="tag_ids" eval="[(6,0,[ref('project.project_tag_data')])]"/>
</record> </record>
<record id="project_task_data_12" model="project.task"> <record forcecreate="False" id="project_task_data_12" model="project.task">
<field name="sequence">4</field> <field name="sequence">4</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
@@ -230,7 +230,7 @@
<field name="stage_id" ref="project_stage_data_1"/> <field name="stage_id" ref="project_stage_data_1"/>
</record> </record>
<record id="project_task_data_13" model="project.task"> <record forcecreate="False" id="project_task_data_13" model="project.task">
<field name="sequence">5</field> <field name="sequence">5</field>
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
@@ -240,7 +240,7 @@
<field name="stage_id" ref="project_stage_data_1"/> <field name="stage_id" ref="project_stage_data_1"/>
</record> </record>
<record id="project_task_data_8" model="project.task"> <record forcecreate="False" id="project_task_data_8" model="project.task">
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
<field name="project_id" ref="project.project_project_data"/> <field name="project_id" ref="project.project_project_data"/>
@@ -249,7 +249,7 @@
<field name="description">Click on the bar in the upper right corner</field> <field name="description">Click on the bar in the upper right corner</field>
</record> </record>
<record id="msg_task_data_8_attach" model="ir.attachment"> <record forcecreate="False" id="msg_task_data_8_attach" model="ir.attachment">
<field name="name">planner_icon.png</field> <field name="name">planner_icon.png</field>
<field name="datas_fname">planner_icon.png</field> <field name="datas_fname">planner_icon.png</field>
<field name="datas" type="base64" file="project/static/src/img/planner_icon.png"></field> <field name="datas" type="base64" file="project/static/src/img/planner_icon.png"></field>
@@ -257,7 +257,7 @@
<field name="res_id" ref="project_task_data_8"/> <field name="res_id" ref="project_task_data_8"/>
</record> </record>
<record id="msg_task_data_8" model="mail.message"> <record forcecreate="False" id="msg_task_data_8" model="mail.message">
<field name="subject">How to open the implementation guide ?</field> <field name="subject">How to open the implementation guide ?</field>
<field name="model">project.task</field> <field name="model">project.task</field>
<field name="res_id" ref="project_task_data_8"/> <field name="res_id" ref="project_task_data_8"/>
@@ -268,11 +268,11 @@
<field name="attachment_ids" eval="[(6, 0, [ref('msg_task_data_8_attach')])]"/> <field name="attachment_ids" eval="[(6, 0, [ref('msg_task_data_8_attach')])]"/>
</record> </record>
<record id="project_task_data_8" model="project.task"> <record forcecreate="False" id="project_task_data_8" model="project.task">
<field name="displayed_image_id" ref="msg_task_data_8_attach"/> <field name="displayed_image_id" ref="msg_task_data_8_attach"/>
</record> </record>
<record id="project_task_data_7" model="project.task"> <record forcecreate="False" id="project_task_data_7" model="project.task">
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
<field name="project_id" ref="project.project_project_data"/> <field name="project_id" ref="project.project_project_data"/>
@@ -281,7 +281,7 @@
<field name="description">Click on the gear icon on the column, to archive the stage, with all the tasks in it. You can also archive one card only, by clicking on the button in the task form view.</field> <field name="description">Click on the gear icon on the column, to archive the stage, with all the tasks in it. You can also archive one card only, by clicking on the button in the task form view.</field>
</record> </record>
<record id="project_task_data_9" model="project.task"> <record forcecreate="False" id="project_task_data_9" model="project.task">
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
<field name="project_id" ref="project.project_project_data"/> <field name="project_id" ref="project.project_project_data"/>
@@ -290,7 +290,7 @@
<field name="description">Click on the last column to create a stage. The name depends on the process. For example, in a customer service process, a stage name may be 'Backlog', 'Waiting Customer Feedback' or 'Done'.</field> <field name="description">Click on the last column to create a stage. The name depends on the process. For example, in a customer service process, a stage name may be 'Backlog', 'Waiting Customer Feedback' or 'Done'.</field>
</record> </record>
<record id="project_task_data_11" model="project.task"> <record forcecreate="False" id="project_task_data_11" model="project.task">
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
<field name="project_id" ref="project.project_project_data"/> <field name="project_id" ref="project.project_project_data"/>
@@ -299,7 +299,7 @@
<field name="date_deadline" eval="datetime.now()+timedelta(days=30)"/> <field name="date_deadline" eval="datetime.now()+timedelta(days=30)"/>
</record> </record>
<record id="project_task_data_14" model="project.task"> <record forcecreate="False" id="project_task_data_14" model="project.task">
<field name="user_id" ref="base.user_root"/> <field name="user_id" ref="base.user_root"/>
<field name="priority">0</field> <field name="priority">0</field>
<field name="project_id" ref="project.project_project_data"/> <field name="project_id" ref="project.project_project_data"/>
@@ -308,7 +308,7 @@
<field name="description">In the chatter, sending an email with an attachment will display the picture on the card. When there are several image attachments, you can choose which one you want to display.</field> <field name="description">In the chatter, sending an email with an attachment will display the picture on the card. When there are several image attachments, you can choose which one you want to display.</field>
</record> </record>
<record id="msg_task_data_14_attach" model="ir.attachment"> <record forcecreate="False" id="msg_task_data_14_attach" model="ir.attachment">
<field name="name">bird.jpg</field> <field name="name">bird.jpg</field>
<field name="datas_fname">bird.jpg</field> <field name="datas_fname">bird.jpg</field>
<field name="datas" type="base64" file="project/static/src/img/bird.jpg"></field> <field name="datas" type="base64" file="project/static/src/img/bird.jpg"></field>
@@ -316,7 +316,7 @@
<field name="res_id" ref="project_task_data_14"/> <field name="res_id" ref="project_task_data_14"/>
</record> </record>
<record id="msg_task_data_14" model="mail.message"> <record forcecreate="False" id="msg_task_data_14" model="mail.message">
<field name="subject">How to open the planner?</field> <field name="subject">How to open the planner?</field>
<field name="model">project.task</field> <field name="model">project.task</field>
<field name="res_id" ref="project_task_data_14"/> <field name="res_id" ref="project_task_data_14"/>
@@ -326,7 +326,7 @@
<field name="attachment_ids" eval="[(6, 0, [ref('msg_task_data_14_attach')])]"/> <field name="attachment_ids" eval="[(6, 0, [ref('msg_task_data_14_attach')])]"/>
</record> </record>
<record id="project_task_data_14" model="project.task"> <record forcecreate="False" id="project_task_data_14" model="project.task">
<field name="displayed_image_id" ref="msg_task_data_14_attach"/> <field name="displayed_image_id" ref="msg_task_data_14_attach"/>
</record> </record>
+1 -1
View File
@@ -51,7 +51,7 @@ class ReportController(Controller):
#------------------------------------------------------ #------------------------------------------------------
# Misc. route utils # Misc. route utils
#------------------------------------------------------ #------------------------------------------------------
@route(['/report/barcode', '/report/barcode/<type>/<path:value>'], type='http', auth="user") @route(['/report/barcode', '/report/barcode/<type>/<path:value>'], type='http', auth="public")
def report_barcode(self, type, value, width=600, height=100, humanreadable=0): def report_barcode(self, type, value, width=600, height=100, humanreadable=0):
"""Contoller able to render barcode images thanks to reportlab. """Contoller able to render barcode images thanks to reportlab.
Samples: Samples:
+3 -3
View File
@@ -38,9 +38,9 @@ class SaleOrderLine(models.Model):
# nothing policy. A product can have several BoMs, we don't know which one was used when the # nothing policy. A product can have several BoMs, we don't know which one was used when the
# delivery was created. # delivery was created.
bom_delivered = {} bom_delivered = {}
for bom in self.product_id.product_tmpl_id.bom_ids: bom_id = self.env['mrp.bom']._bom_find(product_id=self.product_id.id, properties=self.property_ids.ids)
if bom.type != 'phantom': bom = self.env['mrp.bom'].browse(bom_id)
continue if bom and bom.type == 'phantom':
bom_delivered[bom.id] = False bom_delivered[bom.id] = False
product_uom_qty_bom = self.env['product.uom']._compute_qty_obj(self.product_uom, self.product_uom_qty, bom.product_uom) product_uom_qty_bom = self.env['product.uom']._compute_qty_obj(self.product_uom, self.product_uom_qty, bom.product_uom)
bom_exploded = self.env['mrp.bom']._bom_explode(bom, self.product_id, product_uom_qty_bom)[0] bom_exploded = self.env['mrp.bom']._bom_explode(bom, self.product_id, product_uom_qty_bom)[0]
@@ -36,7 +36,7 @@ class ProductChangeQuantity(models.TransientModel):
def onchange_location_id(self): def onchange_location_id(self):
# TDE FIXME: should'nt we use context / location ? # TDE FIXME: should'nt we use context / location ?
if self.location_id and self.product_id: if self.location_id and self.product_id:
availability = self.product_id._product_available() availability = self.product_id.with_context(compute_child=False)._product_available()
self.new_quantity = availability[self.product_id.id]['qty_available'] self.new_quantity = availability[self.product_id.id]['qty_available']
@api.onchange('product_id') @api.onchange('product_id')
@@ -206,6 +206,10 @@ var PivotView = View.extend({
this.do_push_state({}); this.do_push_state({});
return this.data_loaded.done(function () { return this.data_loaded.done(function () {
self.display_table(); self.display_table();
self.$buttons.find('.o_pivot_measures_list li').removeClass('selected');
self.active_measures.forEach(function (measure) {
self.$buttons.find('li[data-field="' + measure + '"]').addClass('selected');
});
_super(); _super();
}); });
}, },
@@ -177,6 +177,10 @@ var Translate = Widget.extend({
}, },
rte_changed: function (node) { rte_changed: function (node) {
var $node = $(node); var $node = $(node);
$node.find("p").each(function () { // remove <p/> element which might have been inserted because of copy-paste
var $p = $(this);
$p.after($p.html()).remove();
});
var trans = this.getTranlationObject($node[0]); var trans = this.getTranlationObject($node[0]);
$node.toggleClass('o_dirty', trans.value !== $node.html().replace(/[ \t\n\r]+/, ' ')); $node.toggleClass('o_dirty', trans.value !== $node.html().replace(/[ \t\n\r]+/, ' '));
}, },
+15
View File
@@ -0,0 +1,15 @@
Colombia, 2017-01-21
Nubark agrees to the terms of the Odoo Corporate Contributor License
Agreement v1.0.
I declare that I am authorized and able to make this agreement and sign this
declaration.
Signed,
Esteban Echeverry eecheverry@nubark.com https://github.com/nubark
List of contributors:
Esteban Echeverry eecheverry@nubark.com https://github.com/tebanep
+11
View File
@@ -0,0 +1,11 @@
Indonesia, 2017-01-25
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,
Hendrik hendrikwidjaja25@gmail.com https://github.com/hendrikw25
+1 -1
View File
@@ -34,7 +34,7 @@
<field name="transient" attrs="{'readonly': [('id', '!=', False)]}"/> <field name="transient" attrs="{'readonly': [('id', '!=', False)]}"/>
</group> </group>
<group> <group>
<field name="state" attrs="{'readonly': [('id', '!=', False)]}"/> <field name="state" readonly="1"/>
<field name="modules"/> <field name="modules"/>
</group> </group>
</group> </group>
+4 -1
View File
@@ -3855,6 +3855,8 @@ class BaseModel(object):
return True return True
if isinstance(ids, (int, long)): if isinstance(ids, (int, long)):
ids = [ids] ids = [ids]
if not context:
context = {}
result_store = self._store_get_values(cr, uid, ids, self._fields.keys(), context) result_store = self._store_get_values(cr, uid, ids, self._fields.keys(), context)
@@ -3930,7 +3932,8 @@ class BaseModel(object):
obj._store_set_values(cr, uid, rids, fields, context) obj._store_set_values(cr, uid, rids, fields, context)
# recompute new-style fields # recompute new-style fields
recs.recompute() if recs.env.recompute and context.get('recompute', True):
recs.recompute()
# auditing: deletions are infrequent and leave no trace in the database # auditing: deletions are infrequent and leave no trace in the database
_unlink.info('User #%s deleted %s records with IDs: %r', uid, self._name, ids) _unlink.info('User #%s deleted %s records with IDs: %r', uid, self._name, ids)
+5 -1
View File
@@ -568,9 +568,13 @@ class configmanager(object):
@property @property
def addons_data_dir(self): def addons_data_dir(self):
d = os.path.join(self['data_dir'], 'addons', release.series) add_dir = os.path.join(self['data_dir'], 'addons')
d = os.path.join(add_dir, release.series)
if not os.path.exists(d): if not os.path.exists(d):
try: try:
# bootstrap parent dir +rwx
if not os.path.exists(add_dir):
os.makedirs(add_dir, 0700)
# try to make +rx placeholder dir, will need manual +w to activate it # try to make +rx placeholder dir, will need manual +w to activate it
os.makedirs(d, 0500) os.makedirs(d, 0500)
except OSError: except OSError: