Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a permission error on SO and PO duplication #3

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class PurchaseOrderLine(models.Model):
qty_invoiced_forced = fields.Float(
string="Forced Billed Qty",
help= "Qty already invoiced but not related to existing supplier invoices in Odoo (for history data import purposes)",
digits='Product Unit of Measure',
groups= "base.group_system")
digits='Product Unit of Measure')


@api.depends('invoice_lines.move_id.state', 'invoice_lines.quantity', 'qty_received', 'product_uom_qty', 'order_id.state', 'qty_invoiced_forced')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<field name="qty_invoiced_forced"
string="Billed Forced"
column_invisible="parent.state not in ('purchase', 'done')"
optional="hide"/>
optional="hide"
groups="base.group_system"/>
</xpath>
</field>
</record>
Expand Down
3 changes: 1 addition & 2 deletions s6r_sale_invoiced_forced_qty/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class SaleOrderLine(models.Model):
qty_invoiced_forced = fields.Float(
string="Forced Invoiced Quantity",
help= "Qty already invoiced but not related to existing invoices in Odoo (for history data import purposes)",
digits='Product Unit of Measure',
groups= "base.group_system")
digits='Product Unit of Measure')


@api.depends('invoice_lines.move_id.state', 'invoice_lines.quantity', 'qty_invoiced_forced')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
decoration-bf="(not display_type and invoice_status == 'to invoice')"
string="Invoiced Forced"
column_invisible="parent.state != 'sale'"
optional="hide"/>
optional="hide"
groups="base.group_system"/>
</xpath>
</field>
</record>
Expand Down