Skip to content

Commit

Permalink
Merge PR #264 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed May 8, 2023
2 parents adf03d1 + 5c6f9b3 commit 2cb1451
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ddmrp_coverage_days/models/stock_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
class Buffer(models.Model):
_inherit = "stock.buffer"

coverage_days = fields.Float(compute="_compute_coverage_days")
coverage_days = fields.Float(
compute="_compute_coverage_days", string="Days of Coverage"
)

def _compute_coverage_days(self):
for rec in self:
Expand Down
9 changes: 6 additions & 3 deletions ddmrp_coverage_days/views/stock_buffer_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
<field name="model">stock.buffer</field>
<field name="inherit_id" ref="ddmrp.stock_buffer_view_form" />
<field name="arch" type="xml">
<field name="main_supplier_id" position="after">
<field name="coverage_days" string="Days of Coverage" />
</field>
<xpath expr="//div[@name='net_flow_position_percent']" position="after">
<label for="coverage_days" />
<div name="coverage_days">
<field name="coverage_days" class="oe_inline" /> days
</div>
</xpath>
</field>
</record>
<record id="stock_buffer_view_tree" model="ir.ui.view">
Expand Down

0 comments on commit 2cb1451

Please sign in to comment.