Skip to content

Commit

Permalink
fixup! fixup! fixup! [MIG] pos_place: Migration to 16.0 (from 12.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Oct 28, 2024
1 parent e7dd080 commit 935c643
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 36 deletions.
2 changes: 1 addition & 1 deletion pos_place/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"security/ir_rule.xml",
"security/res_groups.xml",
"security/ir.model.access.csv",
# "views/view_account_invoice.xml",
"views/view_account_move.xml",
"views/view_pos_config.xml",
"views/view_pos_place.xml",
"views/view_pos_order.xml",
Expand Down
2 changes: 1 addition & 1 deletion pos_place/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# from . import account_invoice
from . import account_move
from . import pos_place
from . import pos_config
from . import pos_order
4 changes: 2 additions & 2 deletions pos_place/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from odoo import fields, models


class AccountInvoice(models.Model):
_inherit = "account.invoice"
class AccountMove(models.Model):
_inherit = "account.move"

place_id = fields.Many2one(string="Place", comodel_name="pos.place")
4 changes: 1 addition & 3 deletions pos_place/security/ir_rule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="name">Point of Sale Places</field>
<field name="model_id" ref="model_pos_place" />
<field name="global" eval="True" />
<field name="domain_force">['|',
('company_id', '=', False),
('company_id', '=', user.company_id.id)]</field>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>

</odoo>
29 changes: 0 additions & 29 deletions pos_place/views/view_account_invoice.xml

This file was deleted.

33 changes: 33 additions & 0 deletions pos_place/views/view_account_move.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2022 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_account_move_tree" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree" />
<field name="arch" type="xml">
<field name="company_id" position="before">
<field
name="place_id"
groups="pos_place.group_pos_place_user"
optional="show"
/>
</field>
</field>
</record>

<record id="view_account_move_form" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<field name="partner_shipping_id" position="after">
<field name="place_id" groups="pos_place.group_pos_place_user" />
</field>
</field>
</record>

</odoo>

0 comments on commit 935c643

Please sign in to comment.