添加功能
This commit is contained in:
@@ -827,9 +827,9 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
id_el.set("name", "log_ids")
|
||||
id_el.set("invisible", "1")
|
||||
invisible += " or not log_ids or not is_back"
|
||||
# if button.name == "结束":
|
||||
# invisible += " or True"
|
||||
invisible += " or work_end"
|
||||
|
||||
if button.name != "打印":
|
||||
invisible += " or work_end"
|
||||
|
||||
if model == 'purchase.order':
|
||||
invisible = invisible.replace("询价", "draft")
|
||||
|
||||
@@ -144,10 +144,11 @@ class PropertyRentalWizard(models.Model):
|
||||
('due_date', '<=', last_day_of_month)
|
||||
], limit=1)
|
||||
if record.contract_sort not in ['guanggao', 'guanzi', 'room']:
|
||||
matched_breakdowns = record.management_breakdown_ids.filtered(lambda b:
|
||||
b.start_data <= last_day_of_month and
|
||||
b.end_data >= first_day_of_month
|
||||
)[:1]
|
||||
matched_breakdowns = record.management_breakdown_ids.filtered(
|
||||
lambda b:
|
||||
b.start_data <= last_day_of_month and
|
||||
(not b.end_data or b.end_data >= first_day_of_month)
|
||||
)[:1]
|
||||
original_amount = matched_breakdowns.management_monthly_amount
|
||||
else:
|
||||
original_amount = manage_amount
|
||||
|
||||
@@ -37,6 +37,12 @@ class InheritPurchaseOrder(models.Model):
|
||||
for order in order_ids:
|
||||
order.button_cancel()
|
||||
|
||||
@api.onchange('category_id')
|
||||
def _onchange_category_id(self):
|
||||
for record in self:
|
||||
if record.pay_line_ids:
|
||||
for line in record.pay_line_ids:
|
||||
line.category_id = record.category_id.id
|
||||
|
||||
def end_approval(self):
|
||||
self.button_confirm()
|
||||
|
||||
Reference in New Issue
Block a user