Accept Merge Request #1967: (feature/制造功能优化 -> develop)
Merge Request: 调整报告样式;调整样式 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1967?initial=true
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
<field name="model">mrp.production</field>
|
<field name="model">mrp.production</field>
|
||||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[@name='button_box']" position="inside">
|
<xpath expr="//button[@name='action_view_mo_delivery']" position="before">
|
||||||
<button class="oe_stat_button" name="action_view_pr_mp" type="object" icon="fa-dollar"
|
<button class="oe_stat_button" name="action_view_pr_mp" type="object" icon="fa-credit-card"
|
||||||
attrs="{'invisible': [('pr_mp_count', '=', 0)]}">
|
attrs="{'invisible': [('pr_mp_count', '=', 0)]}">
|
||||||
<div class="o_field_widget o_stat_info">
|
<div class="o_field_widget o_stat_info">
|
||||||
<span class="o_stat_value">
|
<span class="o_stat_value">
|
||||||
|
|||||||
@@ -112,3 +112,9 @@ class QualityReportController(http.Controller):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
return request.not_found()
|
return request.not_found()
|
||||||
|
|
||||||
|
@http.route('/quality/report/not_published', type='http', auth='public')
|
||||||
|
def get_not_published_report(self, **kw):
|
||||||
|
"""提供未发布报告的控制器"""
|
||||||
|
return "报告尚未发布"
|
||||||
|
|
||||||
|
|||||||
@@ -461,7 +461,8 @@ class QualityCheck(models.Model):
|
|||||||
if self.report_number_id:
|
if self.report_number_id:
|
||||||
print(f"{base_url}/quality/report/{self.report_number_id.id}")
|
print(f"{base_url}/quality/report/{self.report_number_id.id}")
|
||||||
return f"{base_url}/quality/report/{self.report_number_id.id}"
|
return f"{base_url}/quality/report/{self.report_number_id.id}"
|
||||||
return False
|
else:
|
||||||
|
return f"{base_url}/quality/report/not_published"
|
||||||
|
|
||||||
def upload_factory_report(self):
|
def upload_factory_report(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -16,13 +16,24 @@
|
|||||||
|
|
||||||
<!-- 二维码和报告编号 -->
|
<!-- 二维码和报告编号 -->
|
||||||
<div style="position: absolute; top: 0; right: 0; text-align: right;">
|
<div style="position: absolute; top: 0; right: 0; text-align: right;">
|
||||||
<img t-att-src="'/report/barcode/QR/%s' % o.get_report_url()" style="width:100px;height:100px"/>
|
<t t-if="o.report_number_id">
|
||||||
<div style="font-size: 14px; margin-top: 5px;">
|
<img t-att-src="'/report/barcode/QR/%s' % o.get_report_url()" style="width:100px;height:100px"/>
|
||||||
报告编号:<span t-if="o.report_number_id" t-field="o.report_number_name"/><span t-else="">ceshi</span>
|
<div style="font-size: 14px; margin-top: 5px;">
|
||||||
</div>
|
报告编号:<span t-field="o.report_number_id"/>
|
||||||
<div style="font-size: 12px; margin-top: 5px;">
|
</div>
|
||||||
扫描二维码查看PDF报告
|
<div style="font-size: 12px; margin-top: 5px;">
|
||||||
</div>
|
扫描二维码查看PDF报告
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
<t t-else="">
|
||||||
|
<img t-att-src="'/report/barcode/QR/%s' % o.get_report_url()" style="width:100px;height:100px"/>
|
||||||
|
<div style="font-size: 14px; margin-top: 5px;">
|
||||||
|
报告编号:<span>ceshi</span>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 12px; margin-top: 5px;">
|
||||||
|
扫描二维码查看PDF报告
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user