Skip to content

Commit

Permalink
Merge PR #73 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by andhit-r
  • Loading branch information
ssi-bot committed Jul 30, 2024
2 parents ac9e5ae + 35c9d49 commit 1505cec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions ssi_service/models/service_contract_fix_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def _select(self):
a.price_unit AS price_unit,
a.uom_id AS uom_id,
SUM(a.quantity) AS quantity,
MAX(a.sequence) AS sequence,
SUM(a.price_subtotal) AS amount_untaxed,
SUM(a.price_tax) AS amount_tax,
SUM(a.price_total) AS amount_total
Expand Down
5 changes: 4 additions & 1 deletion ssi_service/models/service_fix_item_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
class ServiceFixItemMixin(models.AbstractModel):
_name = "service.fix_item_mixin"
_description = "Service Fix Item Mixin"
_order = "id"
_order = "service_id, sequence, id"
_auto = False

service_id = fields.Many2one(
string="Service Object",
comodel_name="service.mixin",
ondelete="cascade",
)
sequence = fields.Integer(
string="Sequence",
)
product_id = fields.Many2one(
string="Product",
comodel_name="product.product",
Expand Down
1 change: 1 addition & 0 deletions ssi_service/views/service_contract_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
colspan="1"
col="2"
>
<field name="sequence" />
<field
name="product_id"
domain="['|',('id','in',parent.fix_item_allowed_product_ids),('categ_id','in',parent.fix_item_allowed_product_categ_ids)]"
Expand Down
1 change: 1 addition & 0 deletions ssi_service_quotation/models/service_quotation_fix_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def _select(self):
a.name AS name,
a.price_unit AS price_unit,
a.uom_id AS uom_id,
MAX(a.sequence) AS sequence,
SUM(a.quantity) AS quantity,
SUM(a.price_subtotal) AS amount_untaxed,
SUM(a.price_tax) AS amount_tax,
Expand Down
1 change: 1 addition & 0 deletions ssi_service_quotation/views/service_quotation_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
colspan="1"
col="2"
>
<field name="sequence" />
<field
name="product_id"
domain="['|',('id','in',parent.fix_item_allowed_product_ids),('categ_id','in',parent.fix_item_allowed_product_categ_ids)]"
Expand Down

0 comments on commit 1505cec

Please sign in to comment.