Skip to content

Commit

Permalink
[ADD] from v14: _get_invoiceable_stage method & fsm_order_ids field t…
Browse files Browse the repository at this point in the history
…o invoice line
  • Loading branch information
SMaciasOSI authored and brian10048 committed Dec 18, 2024
1 parent 33df383 commit 24e4b4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fieldservice_account/models/fsm_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@ class FSMStage(models.Model):
_inherit = "fsm.stage"

is_invoiceable = fields.Boolean(copy=False)

def _get_invoiceable_stage(self):
"""
override this method to define invoiceable stage
by other criteria
:return:
"""
return self.search(["is_invoiceable", "=", "True"])

Check warning on line 18 in fieldservice_account/models/fsm_stage.py

View check run for this annotation

Codecov / codecov/patch

fieldservice_account/models/fsm_stage.py#L18

Added line #L18 was not covered by tests
3 changes: 3 additions & 0 deletions fieldservice_account/views/account_move.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
<field name="fsm_order_ids" nolabel="1" />
</group>
</xpath>
<xpath expr="//tree//field[@name='price_total']" position="after">
<field name="fsm_order_ids" widget="many2many_tags" optional="hide" />
</xpath>
</field>
</record>
<!-- Invoice Search View -->
Expand Down

0 comments on commit 24e4b4b

Please sign in to comment.