[MERGE] forward port branch saas-14 up to cafe56da80
This commit is contained in:
@@ -36,6 +36,8 @@ var KioskMode = Widget.extend(BarcodeHandlerMixin, {
|
||||
self.$el.html(QWeb.render("HrAttendanceKioskMode", {widget: self}));
|
||||
self.start_clock();
|
||||
});
|
||||
// Make a RPC call every day to keep the session alive
|
||||
self._interval = window.setInterval(this._callServer.bind(this), (60*60*1000*24));
|
||||
return self._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
@@ -60,8 +62,15 @@ var KioskMode = Widget.extend(BarcodeHandlerMixin, {
|
||||
|
||||
destroy: function () {
|
||||
clearInterval(this.clock_start);
|
||||
clearInterval(this._interval);
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
_callServer: function () {
|
||||
// Make a call to the database to avoid the auto close of the session
|
||||
return Session.rpc('/web/webclient/version_info', {})
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
core.action_registry.add('hr_attendance_kiosk_mode', KioskMode);
|
||||
|
||||
@@ -88,7 +88,7 @@ class PurchaseReport(models.Model):
|
||||
join res_partner partner on s.partner_id = partner.id
|
||||
left join product_product p on (l.product_id=p.id)
|
||||
left join product_template t on (p.product_tmpl_id=t.id)
|
||||
LEFT JOIN ir_property ip ON (ip.name='standard_price' AND ip.res_id=CONCAT('product.template,',t.id) AND ip.company_id=s.company_id)
|
||||
LEFT JOIN ir_property ip ON (ip.name='standard_price' AND ip.res_id=CONCAT('product.product,',p.id) AND ip.company_id=s.company_id)
|
||||
left join product_uom u on (u.id=l.product_uom)
|
||||
left join product_uom u2 on (u2.id=t.uom_id)
|
||||
left join stock_picking_type spt on (spt.id=s.picking_type_id)
|
||||
|
||||
@@ -180,7 +180,9 @@ class Partner(models.Model):
|
||||
[('contact', 'Contact'),
|
||||
('invoice', 'Invoice address'),
|
||||
('delivery', 'Shipping address'),
|
||||
('other', 'Other address')], string='Address Type',
|
||||
('other', 'Other address'),
|
||||
("private", "Private Address"),
|
||||
], string='Address Type',
|
||||
default='contact',
|
||||
help="Used to select automatically the right address according to the context in sales and purchases documents.")
|
||||
street = fields.Char()
|
||||
|
||||
@@ -327,6 +327,50 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Special restricted view for private address, with limited "named" info that
|
||||
can be traced back to the employee -->
|
||||
<record id="res_partner_view_form_private" model="ir.ui.view">
|
||||
<field name="name">res.partner.view.form.private</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority" eval="300"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Private Address Form">
|
||||
<sheet>
|
||||
<field name="type" invisible="1"/>
|
||||
<label for="name" class="oe_editonly"/>
|
||||
<field name="name" required="0"/>
|
||||
<group>
|
||||
<group>
|
||||
<label for="street" string="Address"/>
|
||||
<div>
|
||||
<div class="o_address_format" name="div_address">
|
||||
<field name="street" placeholder="Street..." class="o_address_street"/>
|
||||
<field name="street2" placeholder="Street 2..." class="o_address_street"/>
|
||||
<field name="city" placeholder="City" class="o_address_city"/>
|
||||
<field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}' context="{'country_id': country_id, 'zip': zip}"/>
|
||||
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
|
||||
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="phone" widget="phone"/>
|
||||
<field name="mobile" widget="phone"/>
|
||||
<field name="email"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Bank Accounts">
|
||||
<field name="bank_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="acc_number"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_res_partner_filter" model="ir.ui.view">
|
||||
<field name="name">res.partner.select</field>
|
||||
<field name="model">res.partner</field>
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
<field name="groups_id" eval="[(4,ref('base.group_partner_manager'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="group_private_addresses" model="res.groups">
|
||||
<field name="name">Access to Private Addresses</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
A group dedicated to the portal users, making groups
|
||||
restrictions more convenient.
|
||||
@@ -133,6 +137,37 @@
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<!-- Security restriction for private addresses -->
|
||||
<record id="res_partner_rule_private_employee" model="ir.rule">
|
||||
<field name="name">res.partner.rule.private.employee</field>
|
||||
<field name="model_id" ref="base.model_res_partner"/>
|
||||
<field name="domain_force">
|
||||
[('type', '!=', 'private')]
|
||||
</field>
|
||||
<field name="groups" eval="[
|
||||
(4, ref('base.group_user')),
|
||||
]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
<!-- Relex previous rule for group_private_addresses -->
|
||||
<record id="res_partner_rule_private_group" model="ir.rule">
|
||||
<field name="name">res.partner.rule.private.group</field>
|
||||
<field name="model_id" ref="base.model_res_partner"/>
|
||||
<field name="domain_force">
|
||||
[('type', '=', 'private')]
|
||||
</field>
|
||||
<field name="groups" eval="[
|
||||
(4, ref('base.group_private_addresses'))
|
||||
]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user