[MERGE] forward port branch saas-14 up to a119373b5b
This commit is contained in:
@@ -1010,9 +1010,8 @@ class Meeting(models.Model):
|
|||||||
else:
|
else:
|
||||||
sort_fields[field] = self[field]
|
sort_fields[field] = self[field]
|
||||||
if isinstance(self[field], models.BaseModel):
|
if isinstance(self[field], models.BaseModel):
|
||||||
name_get = self[field].name_get()
|
name_get = self[field].mapped('display_name')
|
||||||
if len(name_get) and len(name_get[0]) >= 2:
|
sort_fields[field] = name_get and name_get[0] or ''
|
||||||
sort_fields[field] = name_get[0][1]
|
|
||||||
if r_date:
|
if r_date:
|
||||||
sort_fields['sort_start'] = r_date.strftime(VIRTUALID_DATETIME_FORMAT)
|
sort_fields['sort_start'] = r_date.strftime(VIRTUALID_DATETIME_FORMAT)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -658,7 +658,7 @@
|
|||||||
<field name="name">Project's tasks</field>
|
<field name="name">Project's tasks</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form,calendar,graph,kanban</field>
|
<field name="view_mode">tree,form,calendar,graph,kanban</field>
|
||||||
<field name="domain">[('project_id', 'child_of', [active_id])]</field>
|
<field name="domain">[('project_id', '=', active_id)]</field>
|
||||||
<field name="context">{'project_id':active_id}</field>
|
<field name="context">{'project_id':active_id}</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ class SaleOrder(models.Model):
|
|||||||
_inherit = "sale.order"
|
_inherit = "sale.order"
|
||||||
|
|
||||||
website_order_line = fields.One2many(
|
website_order_line = fields.One2many(
|
||||||
'sale.order.line', 'order_id',
|
'sale.order.line',
|
||||||
string='Order Lines displayed on Website', readonly=True,
|
compute='_compute_website_order_line',
|
||||||
|
string='Order Lines displayed on Website',
|
||||||
help='Order Lines to be displayed on the website. They should not be used for computation purpose.',
|
help='Order Lines to be displayed on the website. They should not be used for computation purpose.',
|
||||||
)
|
)
|
||||||
cart_quantity = fields.Integer(compute='_compute_cart_info', string='Cart Quantity')
|
cart_quantity = fields.Integer(compute='_compute_cart_info', string='Cart Quantity')
|
||||||
@@ -23,6 +24,10 @@ class SaleOrder(models.Model):
|
|||||||
payment_tx_id = fields.Many2one('payment.transaction', string='Transaction', copy=False)
|
payment_tx_id = fields.Many2one('payment.transaction', string='Transaction', copy=False)
|
||||||
only_services = fields.Boolean(compute='_compute_cart_info', string='Only Services')
|
only_services = fields.Boolean(compute='_compute_cart_info', string='Only Services')
|
||||||
|
|
||||||
|
@api.one
|
||||||
|
def _compute_website_order_line(self):
|
||||||
|
self.website_order_line = self.order_line
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
@api.depends('website_order_line.product_uom_qty', 'website_order_line.product_id')
|
@api.depends('website_order_line.product_uom_qty', 'website_order_line.product_id')
|
||||||
def _compute_cart_info(self):
|
def _compute_cart_info(self):
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ class SaleOrder(models.Model):
|
|||||||
has_delivery = fields.Boolean(
|
has_delivery = fields.Boolean(
|
||||||
compute='_compute_has_delivery', string='Has delivery',
|
compute='_compute_has_delivery', string='Has delivery',
|
||||||
help="Has an order line set for delivery", store=True)
|
help="Has an order line set for delivery", store=True)
|
||||||
website_order_line = fields.One2many(
|
|
||||||
'sale.order.line', 'order_id',
|
@api.one
|
||||||
string='Order Lines displayed on Website', readonly=True,
|
def _compute_website_order_line(self):
|
||||||
domain=[('is_delivery', '=', False)],
|
super(SaleOrder, self)._compute_website_order_line()
|
||||||
help='Order Lines to be displayed on the website. They should not be used for computation purpose.')
|
self.website_order_line = self.website_order_line.filtered(lambda l: not l.is_delivery)
|
||||||
|
|
||||||
@api.depends('order_line.price_unit', 'order_line.tax_id', 'order_line.discount', 'order_line.product_uom_qty')
|
@api.depends('order_line.price_unit', 'order_line.tax_id', 'order_line.discount', 'order_line.product_uom_qty')
|
||||||
def _compute_amount_delivery(self):
|
def _compute_amount_delivery(self):
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Running the server
|
|||||||
Maximum allowed virtual memory per worker. If the limit is exceeded,
|
Maximum allowed virtual memory per worker. If the limit is exceeded,
|
||||||
the worker is killed and recycled at the end of the current request.
|
the worker is killed and recycled at the end of the current request.
|
||||||
|
|
||||||
Defaults to 2048MB.
|
Defaults to 2048MiB.
|
||||||
|
|
||||||
.. option:: --limit-memory-hard <limit>
|
.. option:: --limit-memory-hard <limit>
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ Running the server
|
|||||||
immediately killed without waiting for the end of the current request
|
immediately killed without waiting for the end of the current request
|
||||||
processing.
|
processing.
|
||||||
|
|
||||||
Defaults to 2560MB.
|
Defaults to 2560MiB.
|
||||||
|
|
||||||
.. option:: --limit-time-cpu <limit>
|
.. option:: --limit-time-cpu <limit>
|
||||||
|
|
||||||
|
|||||||
@@ -266,10 +266,12 @@ class configmanager(object):
|
|||||||
help="Specify the number of workers, 0 disable prefork mode.",
|
help="Specify the number of workers, 0 disable prefork mode.",
|
||||||
type="int")
|
type="int")
|
||||||
group.add_option("--limit-memory-soft", dest="limit_memory_soft", my_default=2048 * 1024 * 1024,
|
group.add_option("--limit-memory-soft", dest="limit_memory_soft", my_default=2048 * 1024 * 1024,
|
||||||
help="Maximum allowed virtual memory per worker, when reached the worker be reset after the current request (default 671088640 aka 640MB).",
|
help="Maximum allowed virtual memory per worker, when reached the worker be "
|
||||||
|
"reset after the current request (default 2048MiB).",
|
||||||
type="int")
|
type="int")
|
||||||
group.add_option("--limit-memory-hard", dest="limit_memory_hard", my_default=2560 * 1024 * 1024,
|
group.add_option("--limit-memory-hard", dest="limit_memory_hard", my_default=2560 * 1024 * 1024,
|
||||||
help="Maximum allowed virtual memory per worker, when reached, any memory allocation will fail (default 805306368 aka 768MB).",
|
help="Maximum allowed virtual memory per worker, when reached, any memory "
|
||||||
|
"allocation will fail (default 2560MiB).",
|
||||||
type="int")
|
type="int")
|
||||||
group.add_option("--limit-time-cpu", dest="limit_time_cpu", my_default=60,
|
group.add_option("--limit-time-cpu", dest="limit_time_cpu", my_default=60,
|
||||||
help="Maximum allowed CPU time per request (default 60).",
|
help="Maximum allowed CPU time per request (default 60).",
|
||||||
|
|||||||
Reference in New Issue
Block a user